2017-07-02 14 views
0

初めてGitHubから何かをインストールしようとしましたが、ここやGoogleで検索してから簡単な解決策を見つけることができませんでした。GitHubからJupyterノートブック経由でモジュールをインストール

私は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

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のがインストールされ、更新しました:IT

は、パスを削除し、自分自身がその問題のために働いて編集し、再び、手動でのgitをインストールしたが、今私は取得していようです。

私は間違っていますか?

ありがとうございます!

+1

あなたのシステムにgitがインストールされていません。 gitをインストールします。エラーは次のように指定しています: 'コマンド 'git'を見つけることができません – idjaw

+0

システムにヒットをインストールしていれば、それをパスに追加してください。 –

+0

git desktop(Windows用)をインストールしましたが、私は何とかノートにそれをインポートする必要がありますか? – ValientProcess

答えて

1

PATHにGitインストールへのパスが含まれているセッションからJupyterノートブックを実行していることを確認してください。

そしてcheck out pip issue 2109:私の場合は

問題は、私は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:

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に追加します。
もう一度やり直してください。


あなたの2番目のエラーメッセージについては、 "pip installation error “No such file or directory: setup.py" を検討し、とPythonのバージョンをダブルチェック:pipは、Python 2用です。pip3はPython 3用です。

+0

私はそれを試して、動作しません – ValientProcess

+0

@ValientProcess PATHはどのように見えるのですか?コマンドラインから 'git version'と打てますか? – VonC

+0

パスは大丈夫です( "なし")。しかし、\ Command "python setup.py egg_info"のエラーがC:\ Users \ GREATG〜1 \ AppData \ Local \ Temp \ pipのエラーコード1で失敗しました。 -zpuki8tu-build \ – ValientProcess

関連する問題