我在做什么错了?
这无济于事:Installing module from GitHub through Jupyter notebook
我只想导入此python模块。只是一个。在
!pip install git+http://github.com/peterroelants/peterroelants.github.io/tree/master/notebooks/gaussian_process/rational_quadratic.git
Collecting git+http://github.com/peterroelants/peterroelants.github.io/tree/master/notebooks/gaussian_process/rational_quadratic.git
Cloning http://github.com/peterroelants/peterroelants.github.io/tree/master/notebooks/gaussian_process/rational_quadratic.git to /private/var/folders/xq/0txkbk490zl1y5wp5vd3bhhnpw3bp9/T/pip-req-build-pzltmobn
Running command git clone -q http://github.com/peterroelants/peterroelants.github.io/tree/master/notebooks/gaussian_process/rational_quadratic.git /private/var/folders/xq/0txkbk490zl1y5wp5vd3bhhnpw3bp9/T/pip-req-build-pzltmobn
fatal: repository 'http://github.com/peterroelants/peterroelants.github.io/tree/master/notebooks/gaussian_process/rational_quadratic.git/' not found
ERROR: Command errored out with exit status 128: git clone -q http://github.com/peterroelants/peterroelants.github.io/tree/master/notebooks/gaussian_process/rational_quadratic.git /private/var/folders/xq/0txkbk490zl1y5wp5vd3bhhnpw3bp9/T/pip-req-build-pzltmobn Check the logs for full command output.
答案 0 :(得分:0)
您通常会克隆包括所有文件的根存储库,但是该存储库似乎也不是Python软件包。收到错误消息的原因是因为pip
通过PyPi
可以工作,它托管了所有python软件包,并且提到的存储库未托管在该仓库中。但是,根据您的情况,您可以克隆存储库或进行复制,将rational_quadratic.py
下载到项目目录并导入模块。
This post也许可以提供帮助。