I’ve been trucking along pretty well with the Hello Web app book but have run into an issue. I really missed the boat regarding virtualenv and have been doing my work outside of the virtual environment. I finally learned what I was doing wrong but now, when I run the virtual environment my app stops working. If I leave the vitural environment everything runs fine. Is there some way to make the virtual environment work with my current code base?? Ugh…
Working outside virtual environment
Sounds like you have something installed globally that doesn’t exist in your virtualenv. What error are you getting?
Hi Tracy – in brief, I run “python manage.py runserver” and get ImportError: No module named registration.
Incidentally, I received my books today!! Yea!!!
Thank you!
– Doug
Welp…never mind. I fixed it myself. Should this happen to anyone else, I did the following:
-
Inside of the the myhellowebapp directory run:
$ source venv/bin/activate
-
Still inside the myhellowebapp directory run:
$ easy_install -Z django-registration
-
Run the server
$ python manage.py runserver
Good luck!
And thanks for the feedback…that helped a lot with clueing me where to start.
Is there a reason you used easy-install rather than pip (which I say to use in the book)? Just making sure there wasn’t a bug with pip and wanted to mention pip for people who might run into this thread. :)