gpt4 book ai didi

python - 选择安装 python 模块的位置

转载 作者:太空宇宙 更新时间:2023-11-03 19:07:03 25 4
gpt4 key购买 nike

我有旧版本的 PyML 7.10,我想安装新版本 7.11。

为此,我下载了 PyML 并运行 setup.py。

但是,当我运行时

sudo python setup.py install

结果是:

running install
running build
running build_py
running build_ext
running install_lib
running install_egg_info
Removing /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PyML-0.7.11-py2.7.egg-info
Writing /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PyML-0.7.11-py2.7.egg-info

这看起来不错,但正在运行

print PyML.__file__

告诉我 python 在文件夹中查找 PyML

/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PyML/

不是

/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PyML-0.7.11-py2.7.egg-info根据setup.py,它是在哪里编写的

因此我想将安装路径更改为 /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PyML/

我该怎么做?

最佳答案

它已经安装在那里了。 .egg-info 文件只是为 setuptools 提供有关软件包的更多信息,例如版本、要求等,不应从那里移动。

关于python - 选择安装 python 模块的位置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14452998/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com