Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Taggit installation problems #37

Closed
beechnut opened this issue Jun 15, 2013 · 5 comments
Closed

Taggit installation problems #37

beechnut opened this issue Jun 15, 2013 · 5 comments

Comments

@beechnut
Copy link
Collaborator

I'm on OS X 10.7 Lion, and when I run python manage.py migrate after sourcing into virtualenv and running pip install -r requirements.txt, I have trouble with taggit:

django.core.exceptions.ImproperlyConfigured: ImportError taggit: No module named taggit

Thad and I had problems with this at the hackathon, but we got around them by removing taggit from the dependencies since we didn't really need them at the time.

Does anyone know a solution to this?

File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/Users/matt/Documents/repos/peacecorps/environment/lib/python2.7/site-packages/django/core/management/__init__.py", line 453, in execute_from_command_line
    utility.execute()
  File "/Users/matt/Documents/repos/peacecorps/environment/lib/python2.7/site-packages/django/core/management/__init__.py", line 392, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/Users/matt/Documents/repos/peacecorps/environment/lib/python2.7/site-packages/django/core/management/__init__.py", line 272, in fetch_command
    klass = load_command_class(app_name, subcommand)
  File "/Users/matt/Documents/repos/peacecorps/environment/lib/python2.7/site-packages/django/core/management/__init__.py", line 77, in load_command_class
    module = import_module('%s.management.commands.%s' % (app_name, name))
  File "/Users/matt/Documents/repos/peacecorps/environment/lib/python2.7/site-packages/django/utils/importlib.py", line 35, in import_module
    __import__(name)
  File "/Users/matt/Documents/repos/peacecorps/environment/lib/python2.7/site-packages/south/management/commands/__init__.py", line 10, in <module>
    import django.template.loaders.app_directories
  File "/Users/matt/Documents/repos/peacecorps/environment/lib/python2.7/site-packages/django/template/loaders/app_directories.py", line 25, in <module>
    raise ImproperlyConfigured('ImportError %s: %s' % (app, e.args[0]))
django.core.exceptions.ImproperlyConfigured: ImportError taggit: No module named taggit
@esoergel
Copy link
Owner

Is taggit installed? If you run pip freeze, it'll show the python libraries installed (it should be called django-taggit). Also try pip install django-taggit. You'll also need to syncdb (python manage.py syncdb) before migrating, particularly if you're creating a new database.

@beechnut
Copy link
Collaborator Author

Okay, everything installed and migrated properly. Here's what I did:

virtualenv --no-site-packages environment
source environment/bin/activate
pip install django-taggit # explicitly, even though it's in requirements.txt
pip install -r requirements.txt
python manage.py syncdb
python manage.py migrate

@beechnut
Copy link
Collaborator Author

Then I ran into a braces error, so I ran:

curl -O http://python-distribute.org/distribute_setup.py
python distribute_setup.py
pip install django-braces

and now we're all good.

@esoergel
Copy link
Owner

I think I've seen that same error, before. Did you get a message that says
"No module named pkg_resources" or something? I've followed the
instructions on this stack overflow
threadhttp://stackoverflow.com/questions/7446187/no-module-named-pkg-resourcesa
few times. Not sure what causes it.

On Mon, Jun 17, 2013 at 9:18 PM, beechnut notifications@github.com wrote:

Then I ran into a braces error, so I ran:

curl -O http://python-distribute.org/distribute_setup.py
python distribute_setup.py
pip install django-braces

and now we're all good.


Reply to this email directly or view it on GitHubhttps://github.com//issues/37#issuecomment-19585537
.

@esoergel
Copy link
Owner

Oh, nm, I just read the second answer on that thread:

It also happened to me. I think the problem will happen if the
requirements.txt contains a "distribute" entry while the virtualenv uses
setuptools. Pip will try to patch setuptools to make room for distribute,
but unfortunately it will fail half way.

mkvirtualenv yourenv --distribute

should do the trick to prep venv to use distribute rather than setuptools.

-Ethan

On Mon, Jun 17, 2013 at 10:02 PM, Ethan Soergel esoergel@gmail.com wrote:

I think I've seen that same error, before. Did you get a message that
says "No module named pkg_resources" or something? I've followed the
instructions on this stack overflow threadhttp://stackoverflow.com/questions/7446187/no-module-named-pkg-resourcesa few times. Not sure what causes it.

On Mon, Jun 17, 2013 at 9:18 PM, beechnut notifications@github.comwrote:

Then I ran into a braces error, so I ran:

curl -O http://python-distribute.org/distribute_setup.py
python distribute_setup.py
pip install django-braces

and now we're all good.


Reply to this email directly or view it on GitHubhttps://github.com//issues/37#issuecomment-19585537
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants