2017-07-04 3 views
1

Hat jemand in der gleichen Situation gewesen?Kein Modul namens "Pip" nach dem Pip installiert

$ which pip 
    /usr/local/bin/pip 
    $pip 
    Traceback (most recent call last): 
     File "/usr/local/bin/pip", line 7, in <module> 
     from pip import main 
    ModuleNotFoundError: No module named 'pip' 
    $ python 
    Python 2.7.6 (default, Oct 26 2016, 20:30:19) 
    [GCC 4.8.4] on linux2 
    Type "help", "copyright", "credits" or "license" for more information. 
    >>> import pip 
    >>> pip.__version__ 
    '9.0.1' 

die gleiche Situation auf anderen Paketen passiert

$ easy_install 
    Traceback (most recent call last): 
     File "/usr/local/bin/easy_install", line 7, in <module> 
     from setuptools.command.easy_install import main 
    ModuleNotFoundError: No module named 'setuptools' 
    $ virtualenv 
    Traceback (most recent call last): 
     File "/usr/local/bin/virtualenv", line 7, in <module> 
     from virtualenv import main 
    ModuleNotFoundError: No module named 'virtualenv' 

sie alle installiert sind.

ubuntu 16.04 Python 2

+0

Bitte versuchen Sie 'python -m pip installieren PACKAGENAME' und sagen Sie uns, wenn es funktioniert – Michal

+0

Es funktioniert, können Sie mir sagen, warum? – ycd

+0

es scheint ein Problem mit dem Pfad sein. Ich bin jetzt nicht bei meinem Linux-Computer, aber abends probiere ich etwas aus und antworte, wenn niemand sonst wird. – Michal

Antwort

3

installieren pip und virtualenv für Ubuntu 10.10 Maverick und neuere

$ sudo apt-get install python-pip python-dev build-essential 
$ sudo pip install --upgrade pip 
$ sudo pip install --upgrade virtualenv 

Für ältere Versionen von Ubuntu

sudo apt-get install python-setuptools python-dev build-essential 
sudo easy_install pip 
$ sudo pip install --upgrade virtualenv 

this helps ..!

+0

Es funktionierte auch für Ubuntu Xenial (Windows 10) –

Verwandte Themen