pip安装后出现ModuleNotFoundError -e

我有如下的setup.py代码:

from setuptools import setups,PEP420PackageFinder

setup(
   name='abc',packages=PEP420PackageFinder.find(include=['abc.*'],exclude=['abc.score_pipeline.x'])

)

文件路径如下:

/current/
/current/setup.py
/current/abc/score_pipeline/x
/current/abc/score_pipeline/y
/current/abc/score_pipeline/y/lalala

/current/下,我跑了pip install -e,没有问题。 然后在脚本中我想from abc.score_pipeline.y import lalala,但它抱怨No Module named abc.score_pipeline;我想我可以导入abc,但不能导入abc.score_pipeline

为什么我不能导入abc.score_pipeline?确实对此感到困惑,并被如此看似简单的相对路径问题所困扰。 谢谢!

fly_x 回答:pip安装后出现ModuleNotFoundError -e

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3162732.html

大家都在问