pip3: command not found but python3-pip is already installed

前端 未结 9 2008
执笔经年
执笔经年 2021-01-30 03:23

I can\'t use pip3 though python3-pip has already been installed. How to solve the problem?

sudo pip3 install virtualenv
sudo: pip3: command not found

sudo apt-g         


        
相关标签:
9条回答
  • 2021-01-30 03:29

    I had a similar issue. In my case, I had to uninstall and then reinstall pip3:

    sudo apt-get remove python3-pip
    sudo apt-get install python3-pip
    
    0 讨论(0)
  • 2021-01-30 03:39

    On Windows 10 install Python from Python.org Once installed add these two paths to PATH env variable C:\Users<your user>\AppData\Local\Programs\Python\Python38 C:\Users<your user>\AppData\Local\Programs\Python\Python38\Scripts

    Open command prompt and following command should be working python --version pip --version

    0 讨论(0)
  • 2021-01-30 03:45

    Same issue on Fedora 23. I had to reinstall python3-pip to generate the proper pip3 folders in /usr/bin/.

    sudo dnf reinstall python3-pip
    
    0 讨论(0)
  • 2021-01-30 03:47

    You can use python3 -m pip as a synonym for pip3. That has saved me a couple of times.

    0 讨论(0)
  • 2021-01-30 03:48

    Run

    locate pip3
    

    it should give you a list of results like this

    /<path>/pip3
    /<path>/pip3.x
    

    go to /usr/local/bin to make a symbolic link to where your pip3 is located

    ln -s /<path>/pip3.x /usr/local/bin/pip3
    
    0 讨论(0)
  • Probably pip3 is installed in /usr/local/bin/ which is not in the PATH of the sudo (root) user. Use this instead

    sudo /usr/local/bin/pip3 install virtualenv
    
    0 讨论(0)
提交回复
热议问题