Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/macos/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 在mac上安装VirtualEnvrapper-操作错误:[Errno 1]不允许:_Python_Macos_Python 2.7_Virtualenv_Virtualenvwrapper - Fatal编程技术网

Python 在mac上安装VirtualEnvrapper-操作错误:[Errno 1]不允许:

Python 在mac上安装VirtualEnvrapper-操作错误:[Errno 1]不允许:,python,macos,python-2.7,virtualenv,virtualenvwrapper,Python,Macos,Python 2.7,Virtualenv,Virtualenvwrapper,我尝试在Mac上安装VirtualNVRapper,并获得经典的python catch 22: C02QPBHWFVH3MBP:~ ckc3153$ pip install virtualenvwrapper Collecting virtualenvwrapper Using cached virtualenvwrapper-4.7.2.tar.gz Requirement already satisfied (use --upgrade to upgrade): virtualenv

我尝试在Mac上安装VirtualNVRapper,并获得经典的python catch 22:

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无法卸载six,但无法安装有six的包装器。手动卸载six也会以同样的方式失败

  • 使用
    sudopip安装virtualenvwrapper
    命令
  • 键入当前用户的密码
  • 使用
    sudopip安装virtualenvwrapper
    命令
  • 键入当前用户的密码
  • 参考答案

    参考答案


    不起作用,人们说这很危险,这就是为什么mac不再允许sudo pip尝试执行此
    pip安装--忽略已安装的六个
    。引用不起作用,人们说它很危险,这就是为什么mac不再允许sudo pip尝试执行此
    pip安装--忽略已安装的六个
    。参考
    
    sudo pip install virtualenvwrapper --ignore-installed six