Monday, April 29, 2024
 Popular · Latest · Hot · Upcoming
52
rated 0 times [  52] [ 0]  / answers: 1 / hits: 54606  / 3 Years ago, tue, june 29, 2021, 3:36:05

When trying to create a virtual environment using the included pyvenv-3.4 that comes with 14.04, it throws an error:



Error: Command '['/some/directories/bin/python3.4', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1


How do I use pyvenv-3.4 with Ubuntu 14.04?


More From » 14.04

 Answers
5

Unfortunately, 14.04 shipped with a broken pyvenv. According to this launchpad thread the issue will be resolved in the upcoming 14.04-1



Using this method you can install a Pyvenv environment without pip and then manually install pip after the fact.



pyvenv-3.4 --without-pip myvenv
source ./myvenv/bin/activate
wget https://pypi.python.org/packages/source/s/setuptools/setuptools-3.4.4.tar.gz
tar -vzxf setuptools-3.4.4.tar.gz
cd setuptools-3.4.4
python setup.py install
cd ..
wget https://pypi.python.org/packages/source/p/pip/pip-1.5.6.tar.gz
tar -vzxf pip-1.5.6.tar.gz
cd pip-1.5.6
python setup.py install
cd ..
deactivate
source ./myvenv/bin/activate

[#24411] Thursday, July 1, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
restlerfin

Total Points: 347
Total Questions: 112
Total Answers: 108

Location: Ukraine
Member since Wed, Dec 16, 2020
3 Years ago
;