安装pipenv时报错

在mac os Mojave 10.14.1上 执行 pip install pipenv 安装时出现报错

Found existing installation: setuptools 18.5
    Uninstalling setuptools-18.5:
Could not install packages due to an EnvironmentError: [('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.pyc', '/private/var/folders/jp/1_r_vgv94l38skb31950chzh0000gn/T/pip-uninstall-6HgPtT/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.pyc', "[Errno 1] Operation not permitted: '/private/var/folders/jp/1_r_vgv94l38skb31950chzh0000gn/T/pip-uninstall-6HgPtT/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.pyc'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/__init__.py', '/private/var/folders/jp/1_r_vgv94l38skb31950chzh0000gn/T/pip-uninstall-6HgPtT/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/__init__.py', "[Errno 1] Operation not permitted: '/private/var/folders/jp/1_r_vgv94l38skb31950chzh0000gn/T/pip-uninstall-6HgPtT/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/__init__.py'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.py', '/private/var/folders/jp/1_r_vgv94l38skb31950chzh0000gn/T/pip-uninstall-6HgPtT/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.py', "[Errno 1] Operation not permitted: '/private/var/folders/jp/1_r_vgv94l38skb31950chzh0000gn/T/pip-uninstall-6HgPtT/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.py'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/__init__.pyc', '/private/var/folders/jp/1_r_vgv94l38skb31950chzh0000gn/T/pip-uninstall-6HgPtT/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/__init__.pyc', "[Errno 1] Operation not permitted: '/private/var/folders/jp/1_r_vgv94l38skb31950chzh0000gn/T/pip-uninstall-6HgPtT/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/__init__.pyc'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib', '/private/var/folders/jp/1_r_vgv94l38skb31950chzh0000gn/T/pip-uninstall-6HgPtT/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib', "[Errno 1] Operation not permitted: '/private/var/folders/jp/1_r_vgv94l38skb31950chzh0000gn/T/pip-uninstall-6HgPtT/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib'")]

解决方法是 改用

sudo pip install pipenv --upgrade --ignore-installed

你可能感兴趣的:(安装pipenv时报错)