PIP无法从unignts.txt安装所有软件包
我创建并维护一个软件包 seg-metrics 。但是我发现当我使用pip install seg-metrics
安装它时,我无法安装其所有依赖项,即使我已经将所有必要的依赖项都包含到 insuert.txt 。
您能告诉我为什么以及如何解决它吗?
您可以尝试将其复制到自己的PC中。
- conda create -n test_env python = 3.8 pip#安装pip and
- pip install section seg-metrics#安装软件包
- pip列表#显示了已安装的软件包,您可以看到seg-metrics,但是您看不到以下依赖项,例如:simpleitk and Medutils 。可以通过以下命令来验证这。
- python#输入python解释器
- 导入seg_metrics.seg_metrics在此处发生SM#错误!
I created and maintain a package seg-metrics. But I found that I can not install all of its dependencies when I use pip install seg-metrics
to install it, even though I have already included all necessary dependencies into the requirements.txt.
Can you tell me why and how to solve it?
You can try to reproduce it into your own pc.
- conda create -n test_env python=3.8 pip # install pip as well
- pip install seg-metrics # install the package
- pip list # shown the installed package, you can see seg-metrics, but you can not see the dependencies like: SimpleITK and medutils. This can be verified by the following commands.
- python # enter the python interpreter
- import seg_metrics.seg_metrics as sm # Error occured here !!!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
多亏了@phd,我发现我应该在
setup.py
中设置install_requires
。之后,这个问题已解决。Thanks to @phd, I found that I should set
install_requires
insetup.py
. After that, this issue was fixed.