In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces the relevant knowledge of centos7 how to deploy python3 virtual environment, the content is detailed and easy to understand, the operation is simple and fast, and has a certain reference value. I believe you will gain something after reading this centos7 article on how to deploy python3 virtual environment. Let's take a look at it.
1. Install development tools
Yum-y groupinstall "Development tools"
2. Install the Python dependent library
Yum-y install
Zlib-devel
Bzip2-devel
Openssl-devel
Ncurses-devel
Sqlite-devel
Readline-devel
Tk-devel
Gdbm-devel
Db4-devel
Libpcap-devel
Xz-devel
Ibffi-devel (3.7New)
3. Install Python
Use wget https://www.python.org/ftp/python/3.7.3/Python-3.7.3.tar.xz
After downloading, extract and install to / usr/local/python3
Mv Python-3.7.3.tar.xz / usr/local/python3
Tar-xJf Python-3.7.3.tar.xz
Cd Python-3.7.3
. / configure-prefix=/usr/local/python3-with-ssl
Make
Make install
Note:-- with-ssl needs to be added to the configure here. If you don't add it, an error will be reported when using pip3:
Pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
During the. / configure process, if the-with-ssl parameter is not added, the default installed software involves that the ssl function is not available
It just so happens that the pip3 process requires a ssl module, which is not available because it is not specified.
4. Establish a soft link after the installation is completed
Ln-s / usr/local/python3/bin/python3 / usr/bin/python3
Ln-s / usr/local/python3/bin/pip3 / usr/bin/pip3
Because the newly installed Python3 program is python3, which does not conflict with the python2:/usr/bin/python used by the original yum, the two can coexist.
5. Create a virtual environment for python3
Download virtualenv and install
Pip3 install virtulenv
Create a virtual environment (named qingyeyun)
Virtulenv blog-p / usr/bin/python3
Enter the virtual environment
Cd / usr/local/python3/blog
Source. / bin/activate
Exit the virtual environment
(qingyeyun) $deactivate
This is the end of the article on "how centos7 deploys python3 virtual environment". Thank you for reading! I believe you all have a certain understanding of "how to deploy python3 virtual environment in centos7". If you want to learn more, you are welcome to follow 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.