Ubuntu16.04 install and uninstall pip Experimental environment Ubuntu 16.04; VMware 15; Problem Description I installed Ubuntu 16.04 on a virtual machine. After a while, I reopened it and prepared to compile a python program. When installing the required packages, I found that pip pip3 all pointed to python 2.7. hadoop@ubuntu:~$ pip3.5 -V pip 19.1.1 from /usr/local/lib/python2.7/dist-packages/pip (python 2.7) hadoop@ubuntu:~$ pip -V pip 19.1.1 from /usr/local/lib/python2.7/dist-packages/pip (python 2.7) After searching online and reading various tutorials, I still cannot get pip3 to link to python3. The final solution to the problem was an accidental result after spending time. Problem Solving The solution most often mentioned in online tutorials is: Install pip Upgrade pip uninstall Generally, this will default pip3 to python3, but it doesn't solve my problem. You can try it, maybe it can solve your problem. If not, read on. What actually solved my problem: Install pip3 Use the following statement to install. If you want to configure pip3 for the system's built-in python3.5, just execute curl https://bootstrap.pypa.io/get-pip.py | sudo python3.6. After execution, if pip points to python3.5, we only need to execute curl https://bootstrap.pypa.io/get-pip.py | sudo python2.7 again. # Check and install python3.6 sudo apt-get update sudo apt-get install python3.6 curl https://bootstrap.pypa.io/get-pip.py | sudo python3.6 After finishing, verify the pip version: hadoop@ubuntu:~$ pip3.5 -V pip 19.1.1 from /usr/local/lib/python3.5/dist-packages/pip (python 3.5) hadoop@ubuntu:~$ pip -V pip 19.1.1 from /usr/local/lib/python2.7/dist-packages/pip (python 2.7) It was just a small problem, but it took me a long time to record it. To avoid some exceptions, it is recommended not to modify the system's built-in Python environment Summarize The above is the Python virtual environment installation and uninstallation method and problems encountered introduced by the editor. I hope it will be helpful to everyone! You may also be interested in:
|
<<: In-depth understanding of MySQL global locks and table locks
>>: Basic Implementation of AOP Programming in JavaScript
In daily operation and maintenance work, nginx se...
Table of contents Message Board Required librarie...
The question is referenced from: https://www.zhih...
Table of contents 1. Introduction to teleport 1.1...
Error message: Store update, insert, or delete st...
Introduction yum (Yellow dog Updater, Modified) i...
The tbody element should be used in conjunction wi...
border-radius:10px; /* All corners are rounded wi...
1. What is Continuous Delivery The software produ...
Setting the font for the entire site has always b...
According to the principles of W3C, each start tag...
MySQL green version setting code, and 1067 error ...
Look at the code first #/bin/sh datename=$(date +...
Transtion in vue is an animation transition enca...
Table of contents 1. Introduction 2. The first me...