2016-09-20 1 views
1

je tente d'installer virtualenvwrapper sur Mac et obtenir la prise python classique 22:virtualenvwrapper sur OSError Installation Mac-: [Errno 1] Opération non autorisée:

C02QPBHWFVH3MBP:~ ckc3153$ pip install virtualenvwrapper 
Collecting virtualenvwrapper 
    Using cached virtualenvwrapper-4.7.2.tar.gz 
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) 
    Using cached stevedore-1.17.1-py2.py3-none-any.whl 
Requirement already satisfied (use --upgrade to upgrade): pbr>=1.6 in /Library/Python/2.7/site-packages (from stevedore->virtualenvwrapper) 
Collecting six>=1.9.0 (from stevedore->virtualenvwrapper) 
    Using cached six-1.10.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-8.1.2-py2.7.egg/pip/basecommand.py", line 215, in main 
    status = self.run(options, args) 
    File "/Library/Python/2.7/site-packages/pip-8.1.2-py2.7.egg/pip/commands/install.py", line 317, in run 
    prefix=options.prefix_path, 
    File "/Library/Python/2.7/site-packages/pip-8.1.2-py2.7.egg/pip/req/req_set.py", line 736, in install 
    requirement.uninstall(auto_confirm=True) 
    File "/Library/Python/2.7/site-packages/pip-8.1.2-py2.7.egg/pip/req/req_install.py", line 742, in uninstall 
    paths_to_remove.remove(auto_confirm) 
    File "/Library/Python/2.7/site-packages/pip-8.1.2-py2.7.egg/pip/req/req_uninstall.py", line 115, in remove 
    renames(path, new_path) 
    File "/Library/Python/2.7/site-packages/pip-8.1.2-py2.7.egg/pip/utils/__init__.py", line 267, 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: '/var/folders/yq/9qfrf1td5t5fk8xyp0536v340000gn/T/pip-5lWnj3-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six-1.4.1-py2.7.egg-info' 

C02QPBHWFVH3MBP:~ ckc3153$ pip uninstall six 
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: 
    /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six-1.4.1-py2.7.egg-info 
Proceed (y/n)? y 
Exception: 
Traceback (most recent call last): 
    File "/Library/Python/2.7/site-packages/pip-8.1.2-py2.7.egg/pip/basecommand.py", line 215, in main 
    status = self.run(options, args) 
    File "/Library/Python/2.7/site-packages/pip-8.1.2-py2.7.egg/pip/commands/uninstall.py", line 76, in run 
    requirement_set.uninstall(auto_confirm=options.yes) 
    File "/Library/Python/2.7/site-packages/pip-8.1.2-py2.7.egg/pip/req/req_set.py", line 336, in uninstall 
    req.uninstall(auto_confirm=auto_confirm) 
    File "/Library/Python/2.7/site-packages/pip-8.1.2-py2.7.egg/pip/req/req_install.py", line 742, in uninstall 
    paths_to_remove.remove(auto_confirm) 
    File "/Library/Python/2.7/site-packages/pip-8.1.2-py2.7.egg/pip/req/req_uninstall.py", line 115, in remove 
    renames(path, new_path) 
    File "/Library/Python/2.7/site-packages/pip-8.1.2-py2.7.egg/pip/utils/__init__.py", line 267, 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: '/var/folders/yq/9qfrf1td5t5fk8xyp0536v340000gn/T/pip-SGBRs3-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six-1.4.1-py2.7.egg-info' 

Pip ne peut pas désinstaller six, mais peut » t installer wrapper avec six là. Désinstaller six à la main échoue de la même manière.

Répondre

1
  1. utilisez la commande sudo pip install virtualenvwrapper.
  2. tapez le mot de passe de l'utilisateur actuel.
+0

ne permet pas le problème, et les gens disent qu'il est dangereux, c'est pourquoi mac ne sudo pip plus – codyc4321

+0

le message d'erreur pour que celui-ci est le même que – codyc4321

+0

essayer de faites cela 'pip install --ignore-installed six'. référence https://github.com/pypa/pip/issues/3165 –

8

Référez-this réponse

sudo pip install virtualenvwrapper --ignore-installed six