Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #11559 > unrolled thread

why i cannot import djang?

Started bysmith jack <thinke365@gmail.com>
First post2011-08-16 22:50 +0800
Last post2011-08-16 17:41 -0700
Articles 3 — 3 participants

Back to article view | Back to comp.lang.python


Contents

  why i cannot import djang? smith jack <thinke365@gmail.com> - 2011-08-16 22:50 +0800
    Re: why i cannot import djang? John Gordon <gordon@panix.com> - 2011-08-16 16:12 +0000
    Re: why i cannot import djang? Tim Roberts <timr@probo.com> - 2011-08-16 17:41 -0700

#11559 — why i cannot import djang?

Fromsmith jack <thinke365@gmail.com>
Date2011-08-16 22:50 +0800
Subjectwhy i cannot import djang?
Message-ID<mailman.66.1313506232.27778.python-list@python.org>
this package is already in the site-packages directory, but i cannot
import it , it's really confusing ...

[toc] | [next] | [standalone]


#11574

FromJohn Gordon <gordon@panix.com>
Date2011-08-16 16:12 +0000
Message-ID<j2e4sp$knh$1@reader1.panix.com>
In reply to#11559
In <mailman.66.1313506232.27778.python-list@python.org> smith jack <thinke365@gmail.com> writes:

> this package is already in the site-packages directory, but i cannot
> import it , it's really confusing ...

Is it in the site-packages directory for the particular version of
python you're using?

For example, my system has both python2.3 and python2.5 installed, and
they both have their own site-packages directories:

/usr/lib/python2.3/site-packages
/usr/lib/python2.5/site-packages

A package installed for only one version of python won't be importable
if you're running a different python version.

(If you don't know which version you're running, the version number
should be displayed when you start up a python shell, like this:

  command prompt> python
  Python 2.3.4 (#1, Apr 15 2011, 17:38:51)
  [GCC 3.4.6 20060404 (Red Hat 3.4.6-11)] on linux2
  Type "help", "copyright", "credits" or "license" for more information.
  >>>

-- 
John Gordon                   A is for Amy, who fell down the stairs
gordon@panix.com              B is for Basil, assaulted by bears
                                -- Edward Gorey, "The Gashlycrumb Tinies"

[toc] | [prev] | [next] | [standalone]


#11638

FromTim Roberts <timr@probo.com>
Date2011-08-16 17:41 -0700
Message-ID<0f3m47dsv6amck9jl578a4ps7fbcg1nibm@4ax.com>
In reply to#11559
smith jack <thinke365@gmail.com> wrote:
>
>this package is already in the site-packages directory, but i cannot
>import it , it's really confusing ...

The package is called "django".  The name you put in the subject line is
wrong.  Does your code use the right spelling?
-- 
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web