For reference only for Python developers using Ubuntu 18.04 1. Install Ubuntu 18.04 virtual environment sudo apt install virtualenv sudo apt install virtualenvwrapper After the installation is complete, go to the home directory and enter the 2. Install the module that can support virtual environment in Python environment (I use Python 3.6 here) pip3 install virtualenv pip3 install virtualenvwrapper 3. Configure the virtual management directory Enter the home directory, enter the command ls -al, find the .bashrc file, and modify the .bashrc file Add two lines to the end of your .bashrc file: export WORKON_HOME=$HOME/.virtualenvs source /usr/share/virtualenvwrapper/virtualenvwrapper.sh 4. Enable the configuration file 5. Check whether a virtual environment can be created Use the mkvirtualenv project name to create a virtual environment. If successful, it means that the Ubuntu 18.04 virtual environment has been successfully created. PS: Let's take a look at Ubuntu 18.04 installation & creation of virtual environment 1. Install and configure the virtual environment Installing a Virtual Environment sudo apt install virtualenv sudo apt install virtualenvwrapper Configure the virtual management directory (in the home directory, press ctrl + h to open the hidden file and you can see .bashrc) 1. Create a directory to store the virtual environment mkdir $HOME/.virtualenvs 2. Add the following line to ~/.bashrc: export WORKON_HOME=$HOME/.virtualenvs source /usr/share/virtualenvwrapper/virtualenvwrapper.sh 2. Enable the configuration file Summarize The above is the introduction of the Python virtual environment installed in Ubuntu 18.04. I hope it will be helpful to everyone. If you have any questions, please leave me a message and I will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website! You may also be interested in:
|
<<: Detailed explanation of mysql partition function and example analysis
>>: Detailed explanation of vite+ts to quickly build vue3 projects and introduce related features
If your MySQL database is installed on a centos7 ...
MongoDB is cross-platform and can be installed on...
Detailed installation tutorial of mysql-5.7.23-wi...
Linux Operation Experimental environment: Centos7...
Element form and code display For details, please...
During this period of time, while working on a pr...
Recently, when I was using C# to make a Web progra...
Problem description: I used a desktop computer an...
Chinese Tutorial https://www.ncnynl.com/category/...
How to shorten the page rendering time on the bro...
This article example shares the simple implementa...
What is volume? Volume means capacity in English,...
When position is absolute, the percentage of its ...
During the project optimization today, MySQL had ...
<br />User experience is increasingly valued...