Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7012689
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T22:17:17+00:00 2026-05-27T22:17:17+00:00

I am using a Virtualenv on my Django install and have loaded in Pycrypto

  • 0

I am using a Virtualenv on my Django install and have loaded in Pycrypto using

pip install pycrypto

after sourcing my environment.

When I try to import Crypto into my model, I get an import error, however if load the shell using

manage.py shell

it does load in, with out an issue.

I am pretty sure that django is running from the virtualenv as is it running 1.3.1 which more current than what is installed on the path and I have installed South via pip which is working.

I have also tried to install Pycrypto using

setup.py install

Any thoughts on how I fix/debug this?

Thanks

Edit:
I am relatively new to Django and Python so it could be something simple

Edit 2:
Hey Issac,

Is there any way that you can find all the modules getting loaded in?

I don’t understand why it wouldn’t work in browser but would work in the interactive shell? I am not saying that it can’t, i just don’t know if/how that could happen.

The import error as requested:

ImportError at /
No module named Crypto
Request Method: GET
Request URL:    http://*/
Django Version: 1.3.1
Exception Type: ImportError
Exception Value:    
No module named Crypto
Exception Location: /home/*************/project/app/models.py in <module>, line 1
Python Executable:  /home/*************/env/bin/python
Python Version: 2.6.6
Python Path:    
['/usr/local/dh/passenger/lib/phusion_passenger/wsgi',
 '/home/*************/env/lib/python2.6/site-packages/distribute-0.6.10-py2.6.egg',
 '/home/*************/env/lib/python2.6/site-packages/pip-0.7.2-py2.6.egg',
 '/home/*************/env/src/django-debug-toolbar',
 '/home/*************/env/lib/python2.6',
 '/home/*************/env/lib/python2.6/plat-linux2',
 '/home/*************/env/lib/python2.6/lib-tk',
 '/home/*************/env/lib/python2.6/lib-old',
 '/home/*************/env/lib/python2.6/lib-dynload',
 '/usr/lib/python2.6',
 '/usr/lib64/python2.6',
 '/usr/lib/python2.6/plat-linux2',
 '/usr/lib/python2.6/lib-tk',
 '/usr/lib64/python2.6/lib-tk',
 '/home/*************/env/lib/python2.6/site-packages',
 '/home/*************',
 '/home/*************/project']
Server time:    Tue, 3 Jan 2012 20:08:19 +1100
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T22:17:18+00:00Added an answer on May 27, 2026 at 10:17 pm

    Just before the line which causes the import error insert this code:

    import sys
    assert False, sys.path
    

    Compare both results.

    In the shell (where you can import the module). You can do this:

    import Crypto
    assert False, Crypto.__file__
    

    Is the directory of this result in sys.path of your webserver?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using pip in a virtualenv and have installed a package from a git
I'm writing a Django application that is using pip & virtualenv to manage its
I'm using pip with virtualenv --no-site-packages --distribute and am trying to upgrade Django. pip
I'm using python and virtualenv/pip. I have a module installed via pip called test_utils
I am running Django in a virtual environment (using virtualenv), and I'm trying to
I can't seem to get pip to uninstall a package when using the environment
i'm creating a django application inside a virtualenv. I have a directory structure like
I tried installing django-utils from source code from github and using pip. The installation
I am trying to follow the instructions here: http://honza.ca/2011/06/install-ruby-gems-into-virtualenv However, I cannot find the
Is it possible to install psycopg2 into a virtualenv when PostgreSQL isn't installed on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.