我的印象是只在Mac上使用系统python时才需要--user
。
但是,在制作一个venv并试图简单地安装pip时,我遇到了系统特权类型的错误,这些错误通常在使用没有--user
的系统点时发生。
pip install tensorflow --user
为什么在Venv上会发生这种错误?我认为应该将所有东西安装到venv的垃圾箱里?似乎--user
仍然修复它,我发现解决了pip安装它的问题,但是感觉不对。
在mac上使用python开发的正确方法是什么?我认为venvs就是答案。
pip install librosa --upgrade
Collecting librosa Requirement not upgraded as not directly required: audioread>=2.0.0 in
/Users/snow_linux/anaconda/envs/fastai_py27/lib/python2.7/site-packages
(from librosa) (2.1.5) Requirement not upgraded as not directly
required: decorator>=3.0.0 in
/Users/snow_linux/anaconda/envs/fastai_py27/lib/python2.7/site-packages
(from librosa) (4.1.2) Requirement not upgraded as not directly
required: six>=1.3 in
/Users/snow_linux/anaconda/envs/fastai_py27/lib/python2.7/site-packages
(from librosa) (1.11.0) Requirement not upgraded as not directly
required: scipy>=0.14.0 in
/Users/snow_linux/anaconda/envs/fastai_py27/lib/python2.7/site-packages
(from librosa) (0.19.1) Requirement not upgraded as not directly
required: numpy>=1.8.0 in
/Users/snow_linux/anaconda/envs/fastai_py27/lib/python2.7/site-packages
(from librosa) (1.13.3) Requirement not upgraded as not directly
required: joblib>=0.7.0 in
/Users/snow_linux/anaconda/envs/fastai_py27/lib/python2.7/site-packages
(from librosa) (0.11) Requirement not upgraded as not directly
required: resampy>=0.2.0 in
/Users/snow_linux/anaconda/envs/fastai_py27/lib/python2.7/site-packages
(from librosa) (0.2.0) Collecting scikit-learn!=0.19.0,>=0.14.0 (from
librosa) Downloading
https://files.pythonhosted.org/packages/de/d3/47c2c9842d61042f3c5f082f677dbe05899b077272105906a3249fe8c5da/scikit_learn-0.19.1-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (8.0MB)
100% |████████████████████████████████| 8.0MB 2.0MB/s Requirement not upgraded as not directly required: numba>=0.32 in
/Users/snow_linux/anaconda/envs/fastai_py27/lib/python2.7/site-packages
(from resampy>=0.2.0->librosa) (0.37.0) Requirement not upgraded as
not directly required: llvmlite>=0.22.0.dev0 in
/Users/snow_linux/anaconda/envs/fastai_py27/lib/python2.7/site-packages
(from numba>=0.32->resampy>=0.2.0->librosa) (0.22.0) Requirement not
upgraded as not directly required: enum34 in
/Users/snow_linux/anaconda/envs/fastai_py27/lib/python2.7/site-packages
(from numba>=0.32->resampy>=0.2.0->librosa) (1.1.6)
Requirement not upgraded as not directly required: funcsigs in /Users/snow_linux/anaconda/envs/fastai_py27/lib/python2.7/site-packages (from numba>=0.32->resampy>=0.2.0->librosa) (1.0.2)
Requirement not upgraded as not directly required: singledispatch in
/Users/snow_linux/anaconda/envs/fastai_py27/lib/python2.7/site-packages
(from numba>=0.32->resampy>=0.2.0->librosa) (3.4.0.3)
Installing collected packages: scikit-learn, librosa
Found existing installation: scikit-learn 0.19.0 Cannot uninstall 'scikit-learn'.
It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.