2016-10-11 4 views
0

enter image description here要件:

Wameedhs-MacBook-Air:Desktop wameedh$ cd 
Wameedhs-MacBook-Air:~ wameedh$ export PYTHONPATH=. 
Wameedhs-MacBook-Air:~ wameedh$ python ~/Downloads/get-pip.py 
Collecting pip 
    Using cached pip-8.1.2-py2.py3-none-any.whl 
Collecting wheel 
    Using cached wheel-0.29.0-py2.py3-none-any.whl 
Installing collected packages: pip, wheel 
Exception: 
Traceback (most recent call last): 
    File "/var/folders/7x/jx8z1sg941vfxf3p7tznf8ch0000gn/T/tmpZqkyAz/pip.zip/pip/basecommand.py", line 215, in main 
    status = self.run(options, args) 
    File "/var/folders/7x/jx8z1sg941vfxf3p7tznf8ch0000gn/T/tmpZqkyAz/pip.zip/pip/commands/install.py", line 317, in run 
    prefix=options.prefix_path, 
    File "/var/folders/7x/jx8z1sg941vfxf3p7tznf8ch0000gn/T/tmpZqkyAz/pip.zip/pip/req/req_set.py", line 742, in install 
    **kwargs 
    File "/var/folders/7x/jx8z1sg941vfxf3p7tznf8ch0000gn/T/tmpZqkyAz/pip.zip/pip/req/req_install.py", line 831, in install 
    self.move_wheel_files(self.source_dir, root=root, prefix=prefix) 
    File "/var/folders/7x/jx8z1sg941vfxf3p7tznf8ch0000gn/T/tmpZqkyAz/pip.zip/pip/req/req_install.py", line 1032, in move_wheel_files 
    isolated=self.isolated, 
    File "/var/folders/7x/jx8z1sg941vfxf3p7tznf8ch0000gn/T/tmpZqkyAz/pip.zip/pip/wheel.py", line 346, in move_wheel_files 
    clobber(source, lib_dir, True) 
    File "/var/folders/7x/jx8z1sg941vfxf3p7tznf8ch0000gn/T/tmpZqkyAz/pip.zip/pip/wheel.py", line 317, in clobber 
    ensure_dir(destdir) 
    File "/var/folders/7x/jx8z1sg941vfxf3p7tznf8ch0000gn/T/tmpZqkyAz/pip.zip/pip/utils/__init__.py", line 83, in ensure_dir 
    os.makedirs(path) 
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 157, in makedirs 
    mkdir(name, mode) 
OSError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/pip' 
Wameedhs-MacBook-Air:~ wameedh$ sudo chown -R $USER /Library/Python/2.7 
Password: 
Wameedhs-MacBook-Air:~ wameedh$ python ~/Downloads/get-pip.py 
Collecting pip 
    Using cached pip-8.1.2-py2.py3-none-any.whl 
Collecting wheel 
    Using cached wheel-0.29.0-py2.py3-none-any.whl 
Installing collected packages: pip, wheel 
Exception: 
Traceback (most recent call last): 
    File "/var/folders/7x/jx8z1sg941vfxf3p7tznf8ch0000gn/T/tmpPhatQx/pip.zip/pip/basecommand.py", line 215, in main 
    status = self.run(options, args) 
    File "/var/folders/7x/jx8z1sg941vfxf3p7tznf8ch0000gn/T/tmpPhatQx/pip.zip/pip/commands/install.py", line 317, in run 
    prefix=options.prefix_path, 
    File "/var/folders/7x/jx8z1sg941vfxf3p7tznf8ch0000gn/T/tmpPhatQx/pip.zip/pip/req/req_set.py", line 742, in install 
    **kwargs 
    File "/var/folders/7x/jx8z1sg941vfxf3p7tznf8ch0000gn/T/tmpPhatQx/pip.zip/pip/req/req_install.py", line 831, in install 
    self.move_wheel_files(self.source_dir, root=root, prefix=prefix) 
    File "/var/folders/7x/jx8z1sg941vfxf3p7tznf8ch0000gn/T/tmpPhatQx/pip.zip/pip/req/req_install.py", line 1032, in move_wheel_files 
    isolated=self.isolated, 
    File "/var/folders/7x/jx8z1sg941vfxf3p7tznf8ch0000gn/T/tmpPhatQx/pip.zip/pip/wheel.py", line 463, in move_wheel_files 
    generated.extend(maker.make(spec)) 
    File "/var/folders/7x/jx8z1sg941vfxf3p7tznf8ch0000gn/T/tmpPhatQx/pip.zip/pip/_vendor/distlib/scripts.py", line 372, in make 
    self._make_script(entry, filenames, options=options) 
    File "/var/folders/7x/jx8z1sg941vfxf3p7tznf8ch0000gn/T/tmpPhatQx/pip.zip/pip/_vendor/distlib/scripts.py", line 276, in _make_script 
    self._write_script(scriptnames, shebang, script, filenames, ext) 
    File "/var/folders/7x/jx8z1sg941vfxf3p7tznf8ch0000gn/T/tmpPhatQx/pip.zip/pip/_vendor/distlib/scripts.py", line 250, in _write_script 
    self._fileop.write_binary_file(outname, script_bytes) 
    File "/var/folders/7x/jx8z1sg941vfxf3p7tznf8ch0000gn/T/tmpPhatQx/pip.zip/pip/_vendor/distlib/util.py", line 405, in write_binary_file 
    with open(path, 'wb') as f: 
IOError: [Errno 13] Permission denied: '/usr/local/bin/pip' 
Wameedhs-MacBook-Air:~ wameedh$ sudo python ~/Downloads/get-pip.py 
The directory '/Users/wameedh/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. 
The directory '/Users/wameedh/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. 
Requirement already up-to-date: pip in /Library/Python/2.7/site-packages 
Collecting wheel 
    Downloading wheel-0.29.0-py2.py3-none-any.whl (66kB) 
    100% |████████████████████████████████| 71kB 1.8MB/s 
Installing collected packages: wheel 
Successfully installed wheel-0.29.0 
Wameedhs-MacBook-Air:~ wameedh$ pip install requests 
-bash: pip: command not found 
Wameedhs-MacBook-Air:~ wameedh$ which python 
/usr/bin/python 
Wameedhs-MacBook-Air:~ wameedh$ pip 
-bash: pip: command not found 
Wameedhs-MacBook-Air:~ wameedh$ export PYTHONPATH=. 
Wameedhs-MacBook-Air:~ wameedh$ pip 
-bash: pip: command not found 
Wameedhs-MacBook-Air:~ wameedh$ which python 
/usr/bin/python 
Wameedhs-MacBook-Air:~ wameedh$ python -V 
Python 2.7.10 
Wameedhs-MacBook-Air:~ wameedh$ pip 
-bash: pip: command not found 
Wameedhs-MacBook-Air:~ wameedh$ man pip 
No manual entry for pip 
Wameedhs-MacBook-Air:~ wameedh$ 
    [Restored Oct 9, 2016, 6:33:31 PM] 
Last login: Sun Oct 9 18:33:31 on ttys000 
Restored session: Sun Oct 9 18:32:03 PDT 2016 
Wameedhs-MacBook-Air:~ wameedh$  

PIPそれは言う:すべての助けを

-bash: pip: command not found 
+4

イメージを削除し、トレースバック全体を入れます。 –

+0

はpipへのパスが見つからないようです。あなたの$ PATHにあなたのピップはありますか? –

+0

ええ@ Macintosh_89それと同時に:要求はすでに最新の状態になっています:/Library/Python/2.7/site-packages Wameedhs-MacBook-Air –

答えて

1

ありがとう:

Requirement already up-to-date: pip in /Library/Python/2.7/site-packages 
Wameedhs-MacBook-Air:~ wameedh$ pip install requests 

はまだ私はこれを取得しています。それを私が直した!問題は、Xcodeの最新バージョンがないことでした。私はxcodeを走らせました - ピップをインストールする前に--installを選択してください!それでおしまい!!

+0

この回答を確認してください。ありがとう – Winston

0

このエラーは、独自のリソースの場所(例:Artifactoryインスタンス)を指定するために-iフラグを使用し、指定されたパスが正しくない場合にも発生します。アーティファクトの場所をブラウザにURLとしてコピー貼り付けて確認します。