当我运行命令时
pip install virtualenv
我得到:
Installing virtualenv script to /usr/local/share/python
但我的默认设置virtualenv
在不同的地方:
which virtualenv
usr/local/bin/virtualenv
我想默认pip
安装到usr/local/bin
目录。任何帮助将不胜感激。
If you want to manually decide where you want packages to reside, you could always download the source distribution to a directory of your choice with the following:
pip install -d <path_to_my_directory>
But when you install, I think you probably want to put the executable console scripts (as defined in the package's setup.py file; like virtualenv for example) in a directory included in your $PATH environmental variable.
You can specify this manually by doing the following:
sudo python setup.py install --install-scripts /usr/bin/
orsudo python setup.py install --install-scripts /usr/local/bin/
Let me know if you have any other questions...
/usr/local/bin
用于可执行程序。 /usr/local/share
是存储独立于架构的数据。
因此,在您的情况下,您默认安装在 中/usr/local
,其中可执行程序位于 /usr/local/bin 中,与架构无关的数据位于 中/usr/local/share
,配置文件位于 中/usr/local/etc
,等等。
您可以检查Filesystem_Hierarchy_Standard以获取有关该主题的概述。