mkvirtualenv instalar python macos virtualenv virtualenvwrapper osx-elcapitan

python - mkvirtualenv - No se puede instalar virtualenvwrapper en OSX 10.11 El Capitán



virtualenv python (3)

El comando se ejecutó con éxito para mí, pero cuando voy a /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages Pero no se encuentra virtualenvwrapper.sh. Creo que si no se encuentra virtualenvwrapper.sh, no podemos ejecutar env virtual. ¿Alguna idea?

Recientemente limpié mi Mac y reinstalé OSX El Capitan beta pública 3. Instalé pip con sudo easy_install pip e instalé virtualenv con sudo pip install virtualenv y no tuve ningún problema.

Ahora, cuando intento sudo pip install virtualenvwrapper , obtengo lo siguiente:

Users-Air:~ User$ sudo pip install virtualenvwrapper The directory ''/Users/User/Library/Caches/pip/http'' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo''s -H flag. The directory ''/Users/User/Library/Caches/pip/http'' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo''s -H flag. Collecting virtualenvwrapper Downloading virtualenvwrapper-4.6.0-py2.py3-none-any.whl Requirement already satisfied (use --upgrade to upgrade): virtualenv in /Library/Python/2.7/site-packages (from virtualenvwrapper) Requirement already satisfied (use --upgrade to upgrade): virtualenv-clone in /Library/Python/2.7/site-packages (from virtualenvwrapper) Collecting stevedore (from virtualenvwrapper) Downloading stevedore-1.7.0-py2.py3-none-any.whl Requirement already satisfied (use --upgrade to upgrade): pbr<2.0,>=1.3 in /Library/Python/2.7/site-packages (from stevedore->virtualenvwrapper) Requirement already satisfied (use --upgrade to upgrade): argparse in /Library/Python/2.7/site-packages (from stevedore->virtualenvwrapper) Collecting six>=1.9.0 (from stevedore->virtualenvwrapper) Downloading six-1.9.0-py2.py3-none-any.whl Installing collected packages: six, stevedore, virtualenvwrapper Found existing installation: six 1.4.1 DEPRECATION: Uninstalling a distutils installed project (six) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project. Uninstalling six-1.4.1: Exception: Traceback (most recent call last): File "/Library/Python/2.7/site-packages/pip-7.1.0-py2.7.egg/pip/basecommand.py", line 223, in main status = self.run(options, args) File "/Library/Python/2.7/site-packages/pip-7.1.0-py2.7.egg/pip/commands/install.py", line 299, in run root=options.root_path, File "/Library/Python/2.7/site-packages/pip-7.1.0-py2.7.egg/pip/req/req_set.py", line 640, in install requirement.uninstall(auto_confirm=True) File "/Library/Python/2.7/site-packages/pip-7.1.0-py2.7.egg/pip/req/req_install.py", line 726, in uninstall paths_to_remove.remove(auto_confirm) File "/Library/Python/2.7/site-packages/pip-7.1.0-py2.7.egg/pip/req/req_uninstall.py", line 125, in remove renames(path, new_path) File "/Library/Python/2.7/site-packages/pip-7.1.0-py2.7.egg/pip/utils/__init__.py", line 314, in renames shutil.move(old, new) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 302, in move copy2(src, real_dst) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 131, in copy2 copystat(src, dst) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 103, in copystat os.chflags(dst, st.st_flags) OSError: [Errno 1] Operation not permitted: ''/tmp/pip-tTNnKQ-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six-1.4.1-py2.7.egg-info''

Como el problema parece estar en el paquete six , al intentar manualmente desinstalarlo con sudo pip uninstall six resultados en el mismo error. La salida sugiere utilizar el indicador -H también, pero aún así recibo el mismo error:

Users-Air:~ User$ sudo -H pip install virtualenvwrapper Collecting virtualenvwrapper Downloading virtualenvwrapper-4.6.0-py2.py3-none-any.whl Requirement already satisfied (use --upgrade to upgrade): virtualenv in /Library/Python/2.7/site-packages (from virtualenvwrapper) Requirement already satisfied (use --upgrade to upgrade): virtualenv-clone in /Library/Python/2.7/site-packages (from virtualenvwrapper) Collecting stevedore (from virtualenvwrapper) Downloading stevedore-1.7.0-py2.py3-none-any.whl Requirement already satisfied (use --upgrade to upgrade): pbr<2.0,>=1.3 in /Library/Python/2.7/site-packages (from stevedore->virtualenvwrapper) Requirement already satisfied (use --upgrade to upgrade): argparse in /Library/Python/2.7/site-packages (from stevedore->virtualenvwrapper) Collecting six>=1.9.0 (from stevedore->virtualenvwrapper) Downloading six-1.9.0-py2.py3-none-any.whl Installing collected packages: six, stevedore, virtualenvwrapper Found existing installation: six 1.4.1 DEPRECATION: Uninstalling a distutils installed project (six) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project. Uninstalling six-1.4.1: Exception: Traceback (most recent call last): File "/Library/Python/2.7/site-packages/pip-7.1.0-py2.7.egg/pip/basecommand.py", line 223, in main status = self.run(options, args) File "/Library/Python/2.7/site-packages/pip-7.1.0-py2.7.egg/pip/commands/install.py", line 299, in run root=options.root_path, File "/Library/Python/2.7/site-packages/pip-7.1.0-py2.7.egg/pip/req/req_set.py", line 640, in install requirement.uninstall(auto_confirm=True) File "/Library/Python/2.7/site-packages/pip-7.1.0-py2.7.egg/pip/req/req_install.py", line 726, in uninstall paths_to_remove.remove(auto_confirm) File "/Library/Python/2.7/site-packages/pip-7.1.0-py2.7.egg/pip/req/req_uninstall.py", line 125, in remove renames(path, new_path) File "/Library/Python/2.7/site-packages/pip-7.1.0-py2.7.egg/pip/utils/__init__.py", line 314, in renames shutil.move(old, new) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 302, in move copy2(src, real_dst) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 131, in copy2 copystat(src, dst) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 103, in copystat os.chflags(dst, st.st_flags) OSError: [Errno 1] Operation not permitted: ''/tmp/pip-fwQzor-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six-1.4.1-py2.7.egg-info''

He deshabilitado sudo nvram boot-args="rootless=0" con sudo nvram boot-args="rootless=0" , y esto no ha tenido ningún efecto. ¡Cualquier ayuda sería apreciada!


Puede instalar manualmente las dependencias que no existen en una instalación en stock 10.11, luego instale los otros paquetes con --no-deps para ignorar las dependencias. De esa manera saltará six (y argparse que también está ya instalado). Esto funciona en mi instalación 10.11 beta 6:

sudo pip install pbr sudo pip install --no-deps stevedore sudo pip install --no-deps virtualenvwrapper

Y no hay necesidad de deshabilitar rootless.


sudo pip install virtualenvwrapper --ignore-installed six

Tambien funciona