Python 从Github下载的模块未导入
我正试图在Github上创建我自己的python包,这样我就可以在任何机器上安装它。它正在安装,执行Python 从Github下载的模块未导入,python,git,python-3.x,python-module,python-packaging,Python,Git,Python 3.x,Python Module,Python Packaging,我正试图在Github上创建我自己的python包,这样我就可以在任何机器上安装它。它正在安装,执行pip3冻结时模块在那里,但存在导入错误 我搜索了“pip中模块的导入错误”,没有找到专门解决此问题的相关文章 以下是我的终端命令: >>>sudo -H pip3 install git+git://github.com/iethan/machine_learning.git Collecting git+git://github.com/iethan/machine_lear
pip3冻结时模块在那里,但存在导入错误
我搜索了“pip中模块的导入错误”,没有找到专门解决此问题的相关文章
以下是我的终端命令:
>>>sudo -H pip3 install git+git://github.com/iethan/machine_learning.git
Collecting git+git://github.com/iethan/machine_learning.git
Cloning git://github.com/iethan/machine_learning.git to /private/tmp/pip-kupvue2i-build
Installing collected packages: machine-learning
Running setup.py install for machine-learning ... done
Successfully installed machine-learning-0.0.1
当我尝试导入时,出现一个错误:
Traceback (most recent call last):
File "test_staging.py", line 1, in <module>
import machine_learning
ImportError: No module named 'machine_learning'
应该是:
packages=['MachineLearning',
'MachineLearning.get_data',
"MachineLearning.pre_processing",
"MachineLearning.train_test_optimize"],
您有:安装收集的软件包:机器学习
然后:导入机器学习
尝试将模块重命名为machinelearning。
我认为您混淆了一些特殊字符。模块名为。但是它缺少init.py。软件包中似乎有太多的bug,尚未准备好安装
packages=['MachineLearning',
'MachineLearning.get_data',
"MachineLearning.pre_processing",
"MachineLearning.train_test_optimize"],