pyvenv is a tool that allows users to create a python virtual environment to isolate project dependencies. Similar to : virtualenv
Questions tagged [pyvenv]
50 questions
28
votes
1 answer
No activate_this.py file in venv / pyvenv
I need to start venv / pyvenv from within a python script and I know the official documentation is to run:
activate_this = '/path/to/env/bin/activate_this.py'
execfile(activate_this, dict(__file__=activate_this))
But I don't have an…

clifgray
- 4,313
- 11
- 67
- 116
24
votes
3 answers
How can I activate a pyvenv virtualenv from within python? (activate_this.py was removed?)
I'm using Python 3.4, and having created a pyvenv, I'm looking to activate it from within a python process. With virtualenv, I used to use activate_this.py, but that appears to be gone in pyvenv.
Is there now an easy way to effectively change the…

Chris Cooper
- 17,276
- 9
- 52
- 70
11
votes
1 answer
Why `pyvenv` does not install `python-config`?
I have run into this under MacOS (10.11), but have seen the same problem under various Linuxes as well. I installed the "official" Python3 package, it goes into /Library/Frameworks/Python.framework/Versions/3.4. (Note: the examples below use Python…

András Aszódi
- 8,948
- 5
- 48
- 51
9
votes
4 answers
pyvenv returns non-zero exit status 1 (during the installation of pip stage)
If you should ever encounter the following error when creating a Python virtual environment using the pyvenv command:
user$ pyvenv my_venv_dir
Error: Command '['/home/user/my_venv_dir/bin/python', '-Im', 'ensurepip', '--upgrade', '--default-pip']'…

NYCeyes
- 5,215
- 6
- 57
- 64
4
votes
9 answers
No pyvenv.cfg file
I made a variable cfg = waterot.cfg and then made a new file "waterot.cfg" in pycharm, this automatically made a pyvenv.cfgfile, I didn't know what this was and I was getting errors with my code I deleted the pyvenv.cfg file and changed from .cfg to…

popsmoke
- 75
- 1
- 1
- 6
4
votes
3 answers
Downgrade virtualenv to 2.7 from 3.5.3
My virtualenv is currently configured to python 3.5.0 while the package I need to use only supports 2.7. I need a way of downgrading my python runtime to 2.7 within my virtualenv.
I do have both versions available to use:
First one is in my…

qarthandso
- 2,100
- 2
- 24
- 40
3
votes
3 answers
Scripts directory is missing from Virtual Environment
There is no directory called Scripts. How can I activate?
Please help me to solve this.

Sourab M Kalliyan
- 31
- 5
3
votes
0 answers
"No pyvenv.cfg file" error thrown when launching Python virtual environment
I am working with a Python virtual environment on a Windows machine. I used venv with Python 3.10 to create the environment and pip to install libraries. I have used this environment successfully with Jupyter Lab - launching it from the command…

mbela
- 31
- 1
- 4
2
votes
0 answers
uninstall/re-install of poetry package manager not working due to missing pyvenv.config
OS: Windows 11, Python version: 3.10.3
Initial poetry install via Powershell command:
(Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | python -
Had some problems with initial install, so ran uninstall with no…

Pat B.
- 419
- 3
- 12
2
votes
2 answers
Installing PyQt5 in pyenv created virtual envirionment
I'm currently struggling to install a python package in a virtual environment. The set-up is the following: I have an M1 mac and with it, I have the system python installations located in /usr/bin/python (v 2.7.18) and usr/bin/python3 (v 3.8.9).…

Sito
- 494
- 10
- 29
2
votes
1 answer
When deactivated virtual environment, why it still looking for pyvenv.cfg?
Need some help here, I have used virtual environment for doing some of my projects, when deactivated the virtual environemnt, and restart the terminal, it said that No pyvenv.cfg file.
At Windows terminal:
C:\Users\Morris>python
No pyvenv.cfg…

K.W. LEE
- 63
- 5
2
votes
2 answers
Python venv module not found
I am trying to create a portable venv on my stick to copy paste it to someone, so he doens't need to install python on the pc to run my python script.
I tried searching here for a solution, but maybe because I am new to python and environments I…

Steinfeld
- 75
- 1
- 2
- 13
2
votes
2 answers
Transferring a Python project to different computers
I am working on a Python project on both my work computer and my home computer. GitHub has made the experience pretty seamless.
But I'm having a problem with the pyvenv.cfg file in my venv folder. Because my Python SDK has a different file path on…

pretend-engineer
- 33
- 1
- 4
2
votes
1 answer
can't run pip3 on cygwin
I can't use pip3 in venv (on cygwin), but why?
I may be able to use it out of venv.
(tensorflow)
MYNAME@DESKTOP-O27QMD1 ~
$ apt-cyg install python3-pip
Package python3-pip is already installed, skipping
(tensorflow)
MYNAME@DESKTOP-O27QMD1…

yasu89
- 21
- 2
1
vote
1 answer
How can I solve the prolem for psycopg2 on ubuntu and venv?
How can I solve this problem?
I tryed all of I find, but not resolved.
I try install libpq-dev, install postgresql and my problem continue.
pip3 install psycopg2
Collecting psycopg2
Using cached psycopg2-2.9.3.tar.gz (380 kB)
Preparing metadata…

Gabriel Reis
- 17
- 3