I\'m in Kubuntu 14.04 , I want to create a virtualenv with python3.4. I did with python2.7 before in other folder. But when I try:
pyvenv-3.4 venv
For Windows User coming to this post, follow these steps:-
You can make sure that pip is up-to-date by running:
python -m pip install --upgrade pip
Install virtualenv by running:
python -m pip install --user virtualenv
Finally create environment using
python -m virtualenv <your env name>
Solution 5 vy Adarsh V C also worked on CentoS 7 for me.
On LMDE2 with :
It was the first time I use python on this machine and I encountered this problem:
freezed@machine ~/git/repo % python3 -m venv .venv
Error: Command '['/home/freezed/git/repo/.venv/bin/python3', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1
zsh: exit 1 python3 -m venv .venv
I solved this problem with :
sudo apt-get install python3.4-venv
Same problem on Linux Mint 17 (which is basically Ubuntu 14.04). Installing python3.4-venv
didn't work, so I created virtualenv without pip and then installed pip manually.
Create virtualenv and activate it
python3 -m venv --without-pip foo
source foo/bin/activate
Download latest versions of setuptools
and pip
:
wget https://pypi.python.org/packages/source/s/setuptools/setuptools-7.0.tar.gz#md5=6245d6752e2ef803c365f560f7f2f940
wget https://pypi.python.org/packages/source/p/pip/pip-1.5.6.tar.gz#md5=01026f87978932060cc86c1dc527903e
Unpack and install them
tar xf setuptools-7.0.tar.gz
tar xf pip-1.5.6.tar.gz
cd setuptools-7.0
python setup.py install
cd ../pip-1.5.6
python setup.py install
I had encountered this issue.
To investigate, I executed the same command as pyvenv did, and then I got "locale.Error: unsupported locale setting".
It finally fixed by configuring "LC_ALL=en_US.UTF-8".
I had below Issues with psutil installation in Ubuntu 16.04 :
Building wheel for psutil (setup.py) ... error
These are my steps which worked:
check your Python version. (My Python version is 3.7)
then done this below addtitional step:
sudo apt-get install python3.7-dev
then
pip install psutil
source ./my_venv_dir/bin/activate
pip install --upgrade pip