2016-10-27 9 views
0

をアンインストールに失敗したピップは、アンインストールをしようとピップ

pip install -r requirements.txt 
Requirement already satisfied (use --upgrade to upgrade): pika==0.9.14 in /usr/local/lib/python2.7/dist-packages (from -r requirements.txt (line 1)) 
Requirement already satisfied (use --upgrade to upgrade): pymongo==2.8 in /usr/local/lib/python2.7/dist-packages (from -r requirements.txt (line 2)) 
Collecting requests==2.5.1 (from -r requirements.txt (line 3)) 
    Using cached requests-2.5.1-py2.py3-none-any.whl 
Requirement already satisfied (use --upgrade to upgrade): flask-restful==0.3.3 in /usr/local/lib/python2.7/dist-packages (from -r requirements.txt (line 4)) 
Requirement already satisfied (use --upgrade to upgrade): pyaml==15.5.7 in /usr/local/lib/python2.7/dist-packages (from -r requirements.txt (line 5)) 
Requirement already satisfied (use --upgrade to upgrade): graypy==0.2.11 in /usr/local/lib/python2.7/dist-packages (from -r requirements.txt (line 6)) 
Requirement already satisfied (use --upgrade to upgrade): boto3==1.2.3 in /usr/local/lib/python2.7/dist-packages (from -r requirements.txt (line 7)) 
Requirement already satisfied (use --upgrade to upgrade): raven==5.27.1 in /usr/local/lib/python2.7/dist-packages (from -r requirements.txt (line 8)) 
Requirement already satisfied (use --upgrade to upgrade): Flask>=0.8 in /usr/local/lib/python2.7/dist-packages (from flask-restful==0.3.3->-r requirements.txt (line 4)) 
Requirement already satisfied (use --upgrade to upgrade): pytz in /usr/local/lib/python2.7/dist-packages (from flask-restful==0.3.3->-r requirements.txt (line 4)) 
Requirement already satisfied (use --upgrade to upgrade): six>=1.3.0 in /usr/local/lib/python2.7/dist-packages (from flask-restful==0.3.3->-r requirements.txt (line 4)) 
Requirement already satisfied (use --upgrade to upgrade): aniso8601>=0.82 in /usr/local/lib/python2.7/dist-packages (from flask-restful==0.3.3->-r requirements.txt (line 4)) 
Requirement already satisfied (use --upgrade to upgrade): PyYAML in /usr/local/lib/python2.7/dist-packages (from pyaml==15.5.7->-r requirements.txt (line 5)) 
Requirement already satisfied (use --upgrade to upgrade): futures<4.0.0,>=2.2.0; python_version == "2.6" or python_version == "2.7" in /usr/local/lib/python2.7/dist-packages (from boto3==1.2.3->-r requirements.txt (line 7)) 
Requirement already satisfied (use --upgrade to upgrade): botocore<1.4.0,>=1.3.0 in /usr/local/lib/python2.7/dist-packages (from boto3==1.2.3->-r requirements.txt (line 7)) 
Requirement already satisfied (use --upgrade to upgrade): jmespath<1.0.0,>=0.7.1 in /usr/local/lib/python2.7/dist-packages (from boto3==1.2.3->-r requirements.txt (line 7)) 
Requirement already satisfied (use --upgrade to upgrade): contextlib2 in /usr/local/lib/python2.7/dist-packages (from raven==5.27.1->-r requirements.txt (line 8)) 
Requirement already satisfied (use --upgrade to upgrade): Werkzeug>=0.7 in /usr/local/lib/python2.7/dist-packages (from Flask>=0.8->flask-restful==0.3.3->-r requirements.txt (line 4)) 
Requirement already satisfied (use --upgrade to upgrade): Jinja2>=2.4 in /usr/local/lib/python2.7/dist-packages (from Flask>=0.8->flask-restful==0.3.3->-r requirements.txt (line 4)) 
Requirement already satisfied (use --upgrade to upgrade): itsdangerous>=0.21 in /usr/local/lib/python2.7/dist-packages (from Flask>=0.8->flask-restful==0.3.3->-r requirements.txt (line 4)) 
Requirement already satisfied (use --upgrade to upgrade): python-dateutil in /usr/local/lib/python2.7/dist-packages (from aniso8601>=0.82->flask-restful==0.3.3->-r requirements.txt (line 4)) 
Requirement already satisfied (use --upgrade to upgrade): docutils>=0.10 in /usr/local/lib/python2.7/dist-packages (from botocore<1.4.0,>=1.3.0->boto3==1.2.3->-r requirements.txt (line 7)) 
Requirement already satisfied (use --upgrade to upgrade): markupsafe in /usr/local/lib/python2.7/dist-packages (from Jinja2>=2.4->Flask>=0.8->flask-restful==0.3.3->-r requirements.txt (line 4)) 
Installing collected packages: requests 
    Found existing installation: requests 2.8.0 
Exception: 
Traceback (most recent call last): 
    File "/usr/local/lib/python2.7/dist-packages/pip/basecommand.py", line 215, in main 
    status = self.run(options, args) 
    File "/usr/local/lib/python2.7/dist-packages/pip/commands/install.py", line 317, in run 
    prefix=options.prefix_path, 
    File "/usr/local/lib/python2.7/dist-packages/pip/req/req_set.py", line 736, in install 
    requirement.uninstall(auto_confirm=True) 
    File "/usr/local/lib/python2.7/dist-packages/pip/req/req_install.py", line 695, in uninstall 
    for path in pip.wheel.uninstallation_paths(dist): 
    File "/usr/local/lib/python2.7/dist-packages/pip/wheel.py", line 535, in unique 
    for item in fn(*args, **kw): 
    File "/usr/local/lib/python2.7/dist-packages/pip/wheel.py", line 554, in uninstallation_paths 
    r = csv.reader(FakeFile(dist.get_metadata_lines('RECORD'))) 
    File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 1477, in get_metadata_lines 
    return yield_lines(self.get_metadata(name)) 
    File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 1469, in get_metadata 
    return self._get(self._fn(self.egg_info, name)) 
    File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 1580, in _get 
    with open(path, 'rb') as stream: 
IOError: [Errno 2] No such file or directory: '/usr/local/lib/python2.7/dist-packages/requests-2.8.0.dist-info/RECORD' 
Build step 'Execute shell' marked build as failure 
Finished: FAILURE 

は回避策またはどのようにこれがインストールされていないことをピップを説得を見つけるように見えることはできません。

+0

'--force-reinstall'を試してみませんか?または、 '-I、--ignore-installed'であなたのピップを実行してください。 – Ellis

+0

これをvirtualenvの中で実行しようとしましたか? – Jules

+0

virtual_envを使用した場合、インストールは独立した環境であるため問題はありません。もしあなたが1つを設定し、あなたのコードを1つ実行すれば、あなたが望むものすべてをインストールすることができ、それはあなたのベースインストールに影響を与えません。 – Maximas

答えて

0

は、ディレクトリを削除することによってそれを解決し、最新バージョンのピピをインストールする場合はSomePackage

をインストール:

sudo rm -rf /usr/local/lib/python2.7/dist-packages/requests-2.8.0.dist-info/ 

この方法では、何もアンインストールしようとしていません。

0

問題を解決する最も簡単な方法は、Pythonをアンインストールし、Python aganをインストールすることです。

や自動アップグレードを行います。

のpython -mピップ自動的にあなたの問題を解決し、

+0

こんにちは@Sergei、それを試して、まだIOErrorを取得しようとしました:[Errno 2] /usr/local/lib/python2.7/dist-packages/requests-2.8.0.dist-info/RECORD ' ビルドステップ' build as failure 'とマークされたシェルを実行します。 – WebQube

関連する問題