Python-进口本地建造的Python轮
拜托,谁能提出为什么我不能导入我的 python library ?
我要做的步骤:
- 转到
beautify_table
文件夹 - 运行
python setup.py sdist bdist_wheel
- run
pip install intermant install intermant install intermant intermife intermify_table-0.table-0.1-py3-none-anone.whl
- 运行
python
(jupyter笔记本或终端中) - 在python i运行
import
import abletify_table
- 我得到错误:
no Module no Module note beautify_table
在以下机器:
- Windows 10,Python 3.9.5
- MacOS 12.1,Python 3.8.6
那怎么样?我想念什么?
编辑:
现在,我能够import abotify_table
在python控制台内(在VENV中),但是当我无法incode> import emotify_table
我想运行的其他模块中包括。
#module_I_want_to_run.py
import beautify_table
命令:Python Module_i_want_to_run.py
错误:modulenotfoundError:no note noce
Please, can anyone suggest why I am not able to import my python library?
Steps I do:
- Go to
beautify_table
folder - Run
python setup.py sdist bdist_wheel
- Run
pip install dist/beautify_table-0.1-py3-none-any.whl
- Run
python
(either jupyter notebook or in terminal) - In python I run
import beautify_table
- I get an error:
No module named beautify_table
Tried on following machines:
- Windows 10, python 3.9.5
- macOS 12.1, python 3.8.6
How is that? What am I missing?
EDIT:
Now I am able to to import beautify_table
inside python console (while being inside venv), however I am not able to import beautify_table
when included in other module I want to run.
#module_I_want_to_run.py
import beautify_table
Command: python module_I_want_to_run.py
Error:ModuleNotFoundError: No module named 'beautify_table'
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的存储库有多个问题!
App
,请使用beautify_table
作为文件夹名称。 您会得到这个否则,当我检查
pip Freeze
时,导入app
要使用您的资源,您的需求不会提及pandas < /code>在setup.py中。更喜欢使用
sumplast.txt
快乐编码的参考!
Your repository is having multiple issues!
app
, usebeautify_table
as the folder name. Otherwise you get thisWhen I check
pip freeze
I see you pakage is installed but, I have doimport app
to use your resourcespandas
in setup.py. Prefer using arequirements.txt
Happy coding!