so i am using django and the django_registration module.
When i visit a page, I get this error:
zipimport: can not open file C:\development\python\lib\site-packages\django_registration-0.7-py2.7.egg
with
Python Path:
[‘C:\development\PyCharm\helpers\pycharm’,‘C:\development\python\lib\site-packages\setuptools-0.6c11-py2.7.egg’,
…
‘C:\development\python\lib\site-packages\django_registration-0.7-py2.7.egg’,
…]
Where you’ll notice the fourth line is referring to the 0.7 version!
The problem is, i am not using that version of django_registration. I am using the 0.8 version. What had happened was that, on my windows machine, i used the easy_install django_registration command, which got me version 0.7, but only as an egg file. It didn’t make a directory or anything like that.
So i removed that by using easy_install -m django_registration
For good measure, i deleted the django_registration_0.7.egg file (or whatever it was called, that name isn’t precise)
Then i went and manually downloaded the 0.8 version of django_registration from the main django_registration page:
https://bitbucket.org/ubernostrum/django-registration/downloads
And then ran the python build and install commands. However, now my python seems to think it is using version 0.7!
So, i suppose the questions are:
how do i find where this python path is being set?
how do I tell django to use 0.8, not 0.7?
Incidentally, I don’t have any funky “pythonpath” environment variables set, and i’m on windows 7
Ugh.
I think the situation resolved itself, but boy did it take time.
the problem was that, for whatever reason, easy-install wasn’t picking up the 0.8 version, but the 0.7 version. I waited a few weeks – i had other things to do than dig through the python classpath – and then re-easy-install’d the app.
This time, easy-install picked up that there was a 0.8 version, wiped the 0.7 version from wherever, and yay! all is well.
In case you want to do this super-manually though, try reading this stackoverflow item, which was of some use:
Can we shed some definitive light on how python packaging and import works?