Python 官方文档:入门教程 => 点击学习
python3安装与配置venv虚拟环境创建安装目录下载适宜的版本([传送门](https://www.python.org/ftp/Python/))解压config安装配置Python3软连接验证python3环境升级 pip
mkdir -p /usr/local/python3 && cd /usr/local/python3/
wget Https://www.python.org/ftp/python/3.6.6/Python-3.6.6.tgz
tar -vzxf Python-3.6.6.tgz && cd Python-3.6.6
./configure --prefix=/usr/local/python3/Python-3.6.6
make && make install
ln -s /usr/local/python3/Python-3.6.6/bin/python3.6 /usr/bin/python3
ln -s /usr/local/python3/Python-3.6.6/bin/pip3 /usr/bin/pip3
[root@localhost bin]# python3
Python 3.6.6 (default, Nov 14 2018, 18:41:59)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-23)] on linux
Type "help", "copyright", "credits" or "license" for more infORMation.
>>> exit()
#-i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com 指定使用阿里云的源,可以不加
pip3 install --upgrade pip -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
pip3 install virtualenv -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
mkdir -p /data/code/python && cd /data/code/python
python3 -m venv /data/code/python/venv_proxy_pool
[root@oracledb venv_proxy_pool]# ls -l
总用量 16
drwxr-xr-x 2 root root 4096 11月 14 19:08 bin
drwxr-xr-x 2 root root 4096 11月 14 19:08 include
drwxr-xr-x 3 root root 4096 11月 14 19:08 lib
lrwxrwxrwx 1 root root 3 11月 14 19:08 lib64 -> lib
-rw-r--r-- 1 root root 69 11月 14 19:08 pyvenv.cfg
cd /data/code/python/venv_proxy_pool/
git clone https://GitHub.com/jhao104/proxy_pool.git
/data/code/python/venv_proxy_pool/bin/pip3 install --upgrade pip -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
/data/code/python/venv_proxy_pool/bin/pip3 install -r /data/code/python/venv_proxy_pool/proxy_pool/requirements.txt -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
cd /data/code/python/venv_proxy_pool/proxy_pool/Run/
/data/code/python/venv_proxy_pool/bin/python3 main.py
--结束END--
本文标题: Python3安装与配置venv虚拟环境
本文链接: https://lsjlt.com/news/185468.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
2024-03-01
2024-03-01
2024-03-01
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0