今天,我发现setup.py包也会产生这个问题。
我有一个分类器< 3的设置
setup(
name='data_reader',
version='0.1',
description='data_reader by Mithril ',
long_description=long_description,
author='Mithril',
classifiers=[
'Development Status :: 1 - Beta',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Intended Audience :: Developers',
'Operating System :: OS Independent',
"License :: GPLv3",
'Topic :: Internet :: WWW/HTTP',
'Topic :: Software Development :: Libraries :: Tools',
'Topic :: Software Development :: Libraries :: Python Modules',
],
)
我在conda env中使用python 3.7,我发现
pip install .
# or
pip install git+https://github.com/eromoe/data_reader
全部成功,但导入data_reader raise未找到。
经过一些测试,挖掘后只改变分类器
classifiers=[
'Development Status :: 1 - Beta',
"Programming Language :: Python :: 3",
'Intended Audience :: Developers',
'Operating System :: OS Independent',
"License :: GPLv3",
'Topic :: Internet :: WWW/HTTP',
'Topic :: Software Development :: Libraries :: Tools',
'Topic :: Software Development :: Libraries :: Python Modules',
],
重新安装,导入恢复正常!