Virtualenv broken after messing with matplotlib / EPD

I hit my head against the wall, trying to get virtualenv on Mac OS X (Snow Leopard), playing nicely with matplotlib and / or Enthought Python Distribution, and after a few useful tips I think I "I broke my setup after mine ability to repair them. I am now at a point where virtualenv is no longer working; I would appreciate it if someone could help me handle the following stack trace:

~ $ virtualenv foo The --no-site-packages flag is deprecated; it is now the default behavior. Traceback (most recent call last): File "/Library/Frameworks/EPD64.framework/Versions/Current/bin/virtualenv", line 9, in <module> load_entry_point('virtualenv==1.7', 'console_scripts', 'virtualenv')() File "/Library/Frameworks/EPD64.framework/Versions/7.1/lib/python2.7/site-packages/virtualenv.py", line 928, in main never_download=options.never_download) File "/Library/Frameworks/EPD64.framework/Versions/7.1/lib/python2.7/site-packages/virtualenv.py", line 1029, in create_environment site_packages=site_packages, clear=clear)) File "/Library/Frameworks/EPD64.framework/Versions/7.1/lib/python2.7/site-packages/virtualenv.py", line 1143, in install_python mkdir(lib_dir) File "/Library/Frameworks/EPD64.framework/Versions/7.1/lib/python2.7/site-packages/virtualenv.py", line 399, in mkdir os.makedirs(path) File "/Library/Frameworks/EPD64.framework/Versions/7.1/lib/python2.7/os.py", line 150, in makedirs makedirs(head, mode) File "/Library/Frameworks/EPD64.framework/Versions/7.1/lib/python2.7/os.py", line 157, in makedirs mkdir(name, mode) OSError: [Errno 20] Not a directory: 'foo/lib' 
+4
source share
1 answer

It looks like some of your previous actions (or general β€œhacking” foo) left the foo file in ~ dir .... for example. I can reproduce the error with:

 ( phil@ute ::~) touch foo ( phil@ute ::~) virtualenv foo " .... same output you saw ending with:" OSError: [Errno 20] Not a directory: 'foo/lib' 

Delete this file (or try virtualenv not_so_foo ) and you should be fine.

+5
source

Source: https://habr.com/ru/post/1395151/


All Articles