On Mon, Jul 8, 2013 at 2:34 PM, Yves S. Garret
<[email protected]> wrote:
> On Monday, July 8, 2013 4:31:47 PM UTC-4, Yves S. Garret wrote:
>>
>> On Monday, July 8, 2013 4:03:12 PM UTC-4, [email protected] wrote:
>>>
>>> On Mon, Jul 8, 2013 at 2:00 PM, Yves S. Garret
>>> <[email protected]> wrote:
>>> > On Monday, July 8, 2013 2:28:58 PM UTC-4, [email protected] wrote:
>>> >>
>>> >> On Mon, Jul 8, 2013 at 12:10 PM, Yves S. Garret
>>> >> <[email protected]> wrote:
>>> >> > I've gone through the entire django install steps and when I fired
>>> >> > up my
>>> >> > Python shell
>>> >> > (python 2.7.5, to be exact) and did import django, this is what I
>>> >> > got:
>>> >> >
>>> >> >>>> import django
>>> >> > Traceback (most recent call last):
>>> >> >   File "<stdin>", line 1, in <module>
>>> >> > ImportError: No module named django
>>> >> >
>>> >> > sudo python setup.py install should have done it, yes?  If not, what
>>> >> > am
>>> >> > I
>>> >> > missing?
>>> >>
>>> >> What platform are you on? On my Mac when I was running 10.5 I had to
>>> >> create this symlink:
>>> >>
>>> >> ln -s /usr/local/lib/python2.6/dist-packages/django
>>> >>
>>> >>
>>> >> /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/django
>>> >>
>>> >> But I did not have to do that with 10.8 - there the install just
>>> >> worked.
>>> >>
>>> >> On CentOS I also had to create a symlink:
>>> >>
>>> >> ln -s /usr/lib/python2.6/dist-packages/django
>>> >> /usr/lib/python2.6/site-packages/django
>>> >>
>>> >> Those are the only 2 platforms I have experience with, so if you're on
>>> >> something else I can't help.
>>> >>
>>> >> You could try:
>>> >>
>>> >> import sys
>>> >> print sys.path
>>> >>
>>> >> and see where it's searching.
>>> >
>>> >
>>> > I'm running CentOS 6.3.
>>> >
>>> > This is what happens when I print sys.path.
>>> >
>>> >>>> import sys
>>> >>>> print sys.path
>>> > ['', '/home/user', '/home/user/Downloads/Cython/Cython-0.19.1',
>>> > '/usr/local/lib/python27.zip', '/usr/local/lib/python2.7',
>>> > '/usr/local/lib/python2.7/plat-linux2',
>>> > '/usr/local/lib/python2.7/lib-tk',
>>> > '/usr/local/lib/python2.7/lib-old',
>>> > '/usr/local/lib/python2.7/lib-dynload',
>>> > '/usr/local/lib/python2.7/site-packages']
>>>
>>> Try creating the symlink. Assuming django is in
>>> /usr/local/lib/python2.7/dist-packages/django:
>>>
>>> sudo ln -s /usr/local/lib/python2.7/dist-packages/django
>>> /usr/local/lib/python2.7/site-packages/django
>>
>>
>> I just checked, it's not in the path that you described.  The directory
>> dist-packages is not there, but there is a distutils directory.
>>
>> How would I find the location where django is installed?
>
>
> Ok, I just found the path, it's located here:
> /usr/lib/python2.6/site-packages
>
> My version of CentOS is hosted in Azure Windows virtual environment.

I don't know anything about anything related to windows, but it seems
you're running python 2.7 and django was installed for 2.6.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to