In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)05/31 Report--
Today, the editor will share with you the relevant knowledge points about how to solve the problems encountered in the installation and uninstallation of python virtual environment. The content is detailed and the logic is clear. I believe most people still know too much about this knowledge, so share this article for your reference. I hope you can get something after reading this article.
Experimental environment
Ubuntu16.04;vmware15
Problem description
Install ubuntu16.04 on the virtual machine, reopen it to compile the python program after a period of time, and find that when installing the required package, pip pip3 all points to python2.7.
Hadoop@ubuntu:~$ pip3.5-vpip 19.1.1 from / usr/local/lib/python2.7/dist-packages/pip (python2.7) hadoop@ubuntu:~$ pip-vpip 19.1.1 from / usr/local/lib/python2.7/dist-packages/pip (python2.7)
Search the Internet and search through various tutorials. You still can't let pip3 link to python3. The final solution of the problem is an accidental result after taking a long time.
Problem solving
The most frequently mentioned solutions in online tutorials are:
Install pip
Sudo apt-get install python3-pip
Upgrade pip
Sudo pip3 install-upgrade pip
Unloading
Sudo apt-get remove python3-pip
Generally speaking, this is the default that pip3 points to python3, but it doesn't solve my problem. You can try. Maybe you can solve your problem. If you can't, you can read on.
The real solution to my problem:
Install pip3
Use the following statement to install. If you want to configure pip3 for the system's native python3.5, simply execute curl | sudo python3.6. If pip points to python3.5; after execution, we just need to execute curl | sudo python2.7 again.
# check and install python3.6sudo apt-get updatesudo apt-get install python3.6curl https://bootstrap.pypa.io/get-pip.py | sudo python3.6
Verify the pip version when you are done:
Hadoop@ubuntu:~$ pip3.5-vpip 19.1.1 from / usr/local/lib/python3.5/dist-packages/pip (python3.5) hadoop@ubuntu:~$ pip-vpip 19.1.1 from / usr/local/lib/python2.7/dist-packages/pip (python2.7)
It took a long time to make a note of a little problem.
In order to avoid some exceptions, it is recommended not to modify the python environment that comes with the system.
These are all the contents of this article entitled "how to solve the problems encountered in the installation and uninstallation of python virtual environment". Thank you for reading! I believe you will gain a lot after reading this article. The editor will update different knowledge for you every day. If you want to learn more knowledge, please pay attention to the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.