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

前端 未结 9 2009
执笔经年
执笔经年 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:54

    You can make symbolic link to you pip3:

    sudo ln -s $(which pip3) /usr/bin/pip3
    

    It helps me in RHEL 7.6

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

    For Kali, you must use this code after the update.

    $sudo python3 get-pip.py
    

    or if you write this, it also works but not supported anymore. So don't use:

    $sudo python get-pip.py
    
    0 讨论(0)
  • 2021-01-30 03:55

    There is no need to install virtualenv. Just create a workfolder and open your editor in it. Assuming you are using vscode,

    $mkdir Directory && cd Directory
    $code .
    

    It is the best way to avoid breaking Ubuntu/linux dependencies by messing around with environments. In case anything goes wrong, you can always delete that folder and begin afresh. Otherwise, messing up with the ubuntu/linux python environments could mess up system apps/OS (including the terminal). Then you can press shift+P and type python:select interpreter. Choose any version above 3. After that you can do

    $pip3 -v
    

    It will display the pip version. You can then use it for installations as

    $pip3 install Library
    
    0 讨论(0)
提交回复
热议问题