2015-08-19 44 views
51

Recentemente ho cancellato il mio Mac e reinstallato OSX El Capitan beta pubblica 3. Ho installato pip con sudo easy_install pip e installato virtualenv con sudo pip install virtualenv e non ho avuto problemi.Impossibile installare virtualenvwrapper su OSX 10.11 El Capitan

Ora, quando cerco di sudo pip install virtualenvwrapper, ricevo il seguente:

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' 

Poiché la questione sembra essere con il pacchetto six, cercando manualmente per disinstallarlo con sudo pip uninstall six risultati nella stesso errore. L'uscita suggerisce di usare il flag -H pure, ma ho ancora ottenere praticamente lo stesso errore:

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' 

devo radici disabile con sudo nvram boot-args="rootless=0", e questo ha avuto alcun effetto. Qualsiasi aiuto sarebbe apprezzato!

+0

https://github.com/pypa/pip/issues/3165 – Nithin

risposta

81

È possibile installare manualmente le dipendenze che non esistono su un supporto 10.11 di installazione, quindi installare gli altri pacchetti con --no-deps per ignorare le dipendenze. In questo modo salterà lo six (e lo argparse anch'esso già installato). Funziona sulla mia installazione 10.11 beta 6:

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

E nessuna necessità di disabilitare rootless.

+0

non funziona sulla versione 10.11.1 –

+0

Ho appena provato su 10.11.1 e ha funzionato perfettamente bene. –

+0

Che ha funzionato il 10.12.1. Grazie! – aribo

61
sudo pip install virtualenvwrapper --ignore-installed six 

Funziona anche

+0

funziona su 10.12.6 – ehacinom

0

Il comando ha funzionato con successo per me, ma quando vado a /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages Ma virtualenvwrapper.sh non si trova. Credo che se virtualenvwrapper.sh non viene trovato, non possiamo eseguire virtual env. Qualche idea?

+0

'find/Library -name virtualenvwrapper.sh' – boatcoder

Problemi correlati