我正在尝试在开发模式下本地安装软件包。运行install命令时,出现以下错误:
>> pip install -e .
Defaulting to user installation because normal site-packages is not writeable
Obtaining file:///Users/myuser/repos/pgcli
Installing build dependencies ... error
ERROR: Command errored out with exit status 1:
command: /Users/myuser/virtual_envs/pgcli/usr/local/bin/python /Library/Python/3.7/site-packages/pip install --ignore-installed --no-user --prefix /private/var/folders/n3/sgkb54ts5714xp2plx4xm_x80000gn/T/pip-build-env-z2i4jg2h/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.8.0' wheel
cwd: None
Complete output (8 lines):
Collecting setuptools>=40.8.0
Using cached setuptools-46.1.1-py3-none-any.whl (582 kB)
Collecting wheel
Using cached wheel-0.34.2-py2.py3-none-any.whl (26 kB)
Installing collected packages: setuptools, wheel
ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/Library/Python/3.7/site-packages/easy_install.py'
Consider using the `--user` option or check the permissions.
----------------------------------------
ERROR: Command errored out with exit status 1: /Users/myuser/virtual_envs/pgcli/usr/local/bin/python /Library/Python/3.7/site-packages/pip install --ignore-installed --no-user --prefix /private/var/folders/n3/sgkb54ts5714xp2plx4xm_x80000gn/T/pip-build-env-z2i4jg2h/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.8.0' wheel Check the logs for full command output.
需要注意的几件事:
--user
不应(实际上也不会)进行任何更改。我确实有easy_install,但是它不在指定的位置:
>> ls /Library/Python/3.7/site-packages/easy*
ls: /Library/Python/3.7/site-packages/easy*: No such file or directory
>> file "$(which easy_install)"
/Users/myuser/virtual_envs/pgcli/usr/local/bin/easy_install: a /Users/myuser/virtual_envs/pgcli/usr/local/bin/python script text executable, ASCII text
>> deactivate
>> which easy_install
/usr/bin/easy_install
我想念什么?我该如何工作?
其他信息: