Questions tagged [pyenv-virtualenv]
61 questions
1
vote
1 answer
Pyenv does not see environment variables
I'm using a virtualenv with pyenv and although I have environment variables loaded, I can't access them in Python:
(venv) ➜ which python
/home/gonczor/.pyenv/versions/3.9.6/envs/venv/bin/python
(venv) ➜ echo $DEBUG
(venv) ➜ source .env
(venv) ➜…

gonczor
- 3,994
- 1
- 21
- 46
1
vote
2 answers
Every new pyenv environment that I create comes with a preinstalled list of packages shown when I do pip list
I am currently trying to create a new virtualenvironment using pyenv, I have various versions of python installed using pyenv from 3.7.x to 3.9.x.
For creating an environment, I am doing the following:
$pyenv virtualenv 3.8.7 practice_django
which…

aspiring1
- 344
- 1
- 13
- 32
0
votes
0 answers
ImportError: No module named 'decouple' using pyenv
as I'm using pyenv-virtualenv I have created my Pipfile and I'm trying to run the server with the command pipenv run python manage.py runserver but I'm getting the error: from decouple import config, Csv ImportError: No module named 'decouple'.
I…

miriam
- 1
- 1
0
votes
0 answers
Error extracting python virtual environment
I have a venv for python 3.10 containing some packages. Whenever I want to extract it using tar -xf env.310.tar.gz the following errors will prevent running my docker script:
tar: 3.10/lib/terminfo: Cannot open: File exists
tar: 3.10/lib/python3.1:…

mtoloo
- 1,795
- 3
- 22
- 28
0
votes
0 answers
pyenv pollute my current python environment
my OS: macOS Big Sur 11.5.1 (20G80)
cpu Arch: Intel cpu, amd64
pyenv: 2.3.20
Python version: 3.11.4
c compiler info:
Configured with: --prefix=/Library/Developer/CommandLineTools/usr…

Willis
- 599
- 3
- 25
0
votes
1 answer
After creating a virtualenv with pyenv pip freeze shows packages installed
I'm using pyenv to manage virtualenvs.
I've just create a fresh new virtualenv and activate it using
pyenv virtualenv 3.11.2 my-venv
pyenv activate my-venv
But when I execute pip freeze I got a list of a lot of packages installed instead of the…

kiril
- 4,914
- 1
- 30
- 40
0
votes
0 answers
How to clear pipenv's cache
I am trying to run a simple pipenv install command on a project which returns an error with the numpy library. I already ran the pipenv --clear command, but when I run:
pipenv install --skip-lock --verbose
I see:
Using cached…

Andre GolFe
- 300
- 5
- 12
0
votes
1 answer
Pyenv local version overrides all other Python versions regardless of 'global' or 'local' commands
Brief Background: macOS is Ventura 13.2.1 and the system's Python is version 3.11.2.
If I type pyenv versions in my terminal, I get
system
* 3.9.16 (set by /Users/usersname/.python-version)
3.10.10
I have no idea how pyenv set my Users folder…

Ashton T. Sperry
- 105
- 1
- 7
0
votes
0 answers
pytest in virtualenv has the wrong shebang
I'm trying to figure out why my pytest script in a virtualenv has the wrong shebang path.
I'm on MacOS using pyenv and virtualenv.
$ pyenv which python
/Users/me/.pyenv/versions/screenpy_examples/bin/python
$ pyenv which…

Marcel Wilson
- 3,842
- 1
- 26
- 55
0
votes
0 answers
Keep installed packages between patch updates
Using pyenv is there a way to keep packages installed for a version when upgrading to a different patch release? E.g. suppose I installed IPython with 3.11.1 and now am installing 3.11.2, but want to keep the IPython. My own guess is it's impossible…

Masked Man
- 2,176
- 2
- 22
- 41
0
votes
0 answers
Poetry creates new pyproject.toml with wrong python version
I am using pyenv to select python 3.10.9:
pyenv global 3.10.9
python --version
Python 3.10.9
Poetry configuration file shows that Poetry should use the current python version:
(base) bob@Roberts-Mac-mini shims % poetry config --list…

Robert Alexander
- 875
- 9
- 24
0
votes
0 answers
KeyError: 'arm64' in pyenv using nodeenv to install node 16.19.0
Attempting to install dependencies for the kolibri open source environment using pyenv and python virtualenv. Successfully installed python 3.9.9 and attempting to install node and yarn using nodeenv but continue running into this log for any…
0
votes
0 answers
Pyenv-installed Python creates virtualenv with empty include dir, no python-config in bin
Note: There are several similar questions, which I have seen and read. None of them are the precise problem I'm having, and none of their answers work for me.
I have installed several Python versions (Python 2.7, 3.8, 3.9, and 3.10) on my macOS…

Nick Williams
- 2,864
- 5
- 29
- 43
0
votes
1 answer
How to downgrade poetry?
Simple:
Poetry is in version 1.2.x and I want to downgrade it to 1.1.x.
Is there a way to simply auto-downgrade poetry on itself?

SHANNAX
- 322
- 3
- 5
0
votes
0 answers
How to install pyenv virtualenv dependencies with conda?
I'm using Pyenv to manage python versions on my m1 MacBook Pro and would also like to have access to Conda (via miniforge) for installing non-python dependencies. I'm a little confused by how the environments work though. I don't want to use the…

Nick-H
- 342
- 1
- 3
- 15