通过Jupyter笔记本从GitHub安装模块
我第一次尝试从GitHub安装某些东西,但在这里和谷歌搜索后找不到简单的解决方案。通过Jupyter笔记本从GitHub安装模块
我使用Jupyter笔记本电脑,并试图安装该模块:
https://github.com/Expt-David/NumSchrodingerEq
我试着写这里面的笔记本:
!pip install git+git://github.com/Expt-David/NumSchrodingerEq.git
,但我发现了以下错误:
Collecting git+git://github.com/Expt-David/NumSchrodingerEq.git
Cloning git://github.com/Expt-David/NumSchrodingerEq.git to c:\users\greatg~1\appdata\local\temp\pip-1w_dpw43-build
Error [WinError 2] The system cannot find the file specified while executing command git clone -q git://github.com/Expt-David/NumSchrodingerEq.git C:\Users\GREATG~1\AppData\Local\Temp\pip-1w_dpw43-build
Cannot find command 'git'
You are using pip version 8.1.2, however version 9.0.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
ED IT
似乎再次和手动安装混帐删除路径和编辑自己工作过这个问题,但现在我越来越:
Collecting git+https://github.com/Expt-David/NumSchrodingerEq.git
Cloning https://github.com/Expt-David/NumSchrodingerEq.git to c:\users\greatg~1\appdata\local\temp\pip-zpuki8tu-build
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "d:\anaconda3\lib\tokenize.py", line 454, in open
buffer = _builtin_open(filename, 'rb')
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\GREATG~1\\AppData\\Local\\Temp\\pip-zpuki8tu-build\\setup.py'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\GREATG~1\AppData\Local\Temp\pip-zpuki8tu-build\
而且我已经安装和更新setuptools的。
我在做什么错?
谢谢!
确保您从会话中运行Jupyter Notebook,其中PATH包含Git安装的路径。
在我的情况下,问题是我必须的路径,在Windows上的我的道路环境中定义的git的方式。
the function find_command declared in
pip.util
fails in handle paths with quote, like:
PATH=...;c:\python27\scripts;"c:\Program Files\git\cmd";C:\Tcl\bin;...
when it appends the
git.exe
filename to check its existence it keeps the " symbol and the check fails.
这应固定在最新版本的点子,但再次,仔细检查你的%PATH%
。
如果还是失败,请尝试使用简化路径,并安装在一个较短的路径的Git没有空间:
- 使用latest Git for Windows(解压缩的Git 2.13
PortableGit-2.13.2-64-bit.7z.exe
你想要的任何地方,例如在C:\Git2.13.2
) - 设置简化的
PATH
。
关于PATH
问题,类型(在CMD
):
set PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\
set GH=C:\Git2.13.2
set PATH=%GH%\bin;%GH%\usr\bin;%GH%\mingw64\bin;%PATH%
添加到PATH
您所需要的蟒蛇/ PIP。
然后再试一次。
对于你的第二个错误信息,认为 “pip installation error “No such file or directory: setup.py
””,并仔细检查你的Python版本:pip
是蟒蛇2。pip3
是python 3.
我试过了,不起作用 – ValientProcess
@ValientProcess你的PATH是什么样子的?你能从命令行输入'git version'吗? – VonC
路径没问题(没有“),但现在我得到另一个错误\ Command”python setup.py egg_info“失败,错误代码1在C:\ Users \ GREATG〜1 \ AppData \ Local \ Temp \ pip -zpuki8tu-build \ – ValientProcess
你的系统上没有安装git。安装git。错误是指定它:'无法找到命令'git'' – idjaw
在您的系统上安装命中,如果已经将其添加到路径 –
我安装了git桌面(用于Windows),但仍然出现该错误。我应该将它导入笔记本吗? – ValientProcess