I install the python virtual environment
with the following command
pip install --user virtualenv
#不行的话用下一句命令安装virtualenv
#sudo apt-get install python-virtualenv
python virtual environment installation successful, I created a Virtualenv directory in my home directory. I’m going to put all the virtual environments in this directory. Then, go to this directory and I’ll use the following command to create a virtual environment (I’ll call this virtual environment flask-env)
virtualenv helloworld
, however, it reports the following error message
solution:
open. Bashrc
with the following command
sudo gedit ~/.bashrc
add the following information
on the last line of the open file
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/helloworld/anaconda3/lib
note: cannot have Spaces, on either side of the equal sign “=”/home/helloworld/anaconda3/lib this part is the python lib address, to write this part according to your specific situation.
and then rerun
virtualenv helloworld
virtual environment is created successfully, and the activation command is as follows:
vivian@vivian-Super-Server:~/HelloWorld$ virtualenv helloworldUsing base prefix '/home/vivian/anaconda3'
New python executable in /home/vivian/HelloWorld/helloworld/bin/python
Installing setuptools, pip, wheel...done.
vivian@vivian-Super-Server:~/HelloWorld$ source helloworld/bin/activate
close virtual environment
deactivate
note: the path of the virtual environment cannot have Chinese, otherwise this problem will also occur
Read More:
- Python: What’s Virtualenv
- Using CONDA virtual environment in pychar
- An error commandnotfounderror (to initialize your shell) is reported when activating the virtual environment
- Setting up a virtual environment for jupyter notebook
- The provider is not compatible with the version of Oracle client systems
- CONDA creating virtual environment and common CONDA commands
- Win10 system virtual machine installation of Ubuntu system failed, prompt: UBI language failed with exit code 1
- Error 13 when grub starts: solving the problem of invalid or unsupported executable
- Jupyter notebook couldn’t find CONDA’s virtual environment
- Quickly solve the problem of Vmware virtual machine “\\.\Global\vmx86”: the system cannot find the specified file
- Building virtual machine environment based on kvm-qemu under ubuntu12.10 (12)
- Configuration: error:!! OpenSSL is not properly installed on your system
- Solution of Prophet error reporting when installing R package in Kubuntu virtual machine environment
- Anaconda create environment, delete environment, activate environment, exit environment
- raise RuntimeError(“tf.placeholder() is not compatible with “ RuntimeError: tf.placeholder() is not
- Error: pg_config executable not found.
- Win7 system build PHP + MySQL + Apache environment + deploy ECSHOP project
- Error in installing virtualenv
- When using exe4j to generate exe executable file from jar, no JVM could be found on your system exception appears
- About errors:! Package natbib error: Bibliography not compatible with author year citations