1、安装virtulenv、virtulenvwrapper包
pip install virtualenv virtualenvwrapper
2、virtualenvwrapper是virtualenv的扩展工具,可以方便的创建、删除、复制、切换不同的虚拟环境。
3、 设置环境变量,把下面两行添加到~/.bash_profile里
export WORKON_HOME=/software/venv
source /usr/local/bin/virtualenvwrapper.sh
4、使环境变量生效: source ~/.bash_profile
5、操作命令
创建虚拟环境:mkvirtualenv [虚拟环境名称]
列出虚拟环境:lsvirtualenv
切换虚拟环境:workon [虚拟环境名称]
以上就是小编为大家带来的Linux安装Python虚拟环境virtualenv的方法全部内容了,希望大家多多支持华域联盟~
您可能感兴趣的文章:
- Python虚拟环境Virtualenv使用教程
- Python虚拟环境virtualenv的安装与使用详解
- Pipenv一键搭建python虚拟环境的方法
- python虚拟环境virtualenv的安装与使用
- 使用虚拟环境打包python为exe 文件的方法
- python3利用venv配置虚拟环境及过程中的小问题小结
- centos 安装python3.6环境并配置虚拟环境的详细教程
- PyCharm导入python项目并配置虚拟环境的教程详解
- python搭建虚拟环境的步骤详解
- Python虚拟环境的创建和使用详解
本文由 华域联盟 原创撰写:华域联盟 » Linux安装Python虚拟环境virtualenv的方法
转载请保留出处和原文链接:https://www.cnhackhy.com/56807.htm