[英]import python module from github to jupyter notebook
我究竟做錯了什么?
這沒有幫助: 通過 Jupyter notebook 從 GitHub 安裝模塊
我只想導入這個 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.
您通常會克隆包含所有文件的根存儲庫,但該存儲庫似乎也不是 Python 包。 您收到錯誤的原因是pip
通過托管所有 python 包的PyPi
工作,並且提到的存儲庫不在那里托管。 但是,在您的情況下,您可以克隆存儲庫或復制,將rational_quadratic.py
下載到您的項目目錄並導入模塊。 這篇文章可能會有所幫助。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.