Reputation: 1
I am using Python 2.7 and pip to install Django on Windows 8 and encountered an Errno22. I typed "python -m pip install Django==1.7" and get
...
...
File "D:\Python27\lib\site-packages\pip\util.py", line 508, in unzip_file
fp = open(fn, 'wb')
IOError: [Errno 22] invalid mode ('wb') or filename: 'c:\\users\\[username]~1\\appda
ta\\local\\temp\\pip_build_[username]\\django\\django/contrib/admin/locale/l
t/LC_MESSAGES/django.mo'
Looks like it's a typical backslash problem of pip on Windows. I tried to modify the code in util.py but with in vain. This is an Administrator command prompt so privilege should not be the cause. Any ideas how to resolve this?
Upvotes: 0
Views: 434
Reputation: 9636
You are unnecessarily adding an extra parameter: python -m pip install Django==1.7
It should be:
python pip install Django==1.7
Upvotes: 1