Comments (22)
Have you try the shell version (pyenv shell
)? Something might be remaining your environment variable of PYENV_VERSION
.
from pyenv-virtualenv.
No, I haven't. I will make sure to try that when I get home.
from pyenv-virtualenv.
Finally got around to testing it out again. The problem seems to have fixed itself somehow.
Thanks anyway!
from pyenv-virtualenv.
I have the same issue on OS X after rm -rf ~/.pyenv/versions/{my-env-name}
.
from pyenv-virtualenv.
@j-bennet
See a64f194 - there might be dirs installed.
Are you using the latest pyenv-virtualenv?
Can you provide a test case / steps to reproduce it?
Is the env used somewhere as a local or shell version?
The ~/.pyenv/versions/{my-env-name}
typically nowadays will be a symlink only to the real version.
from pyenv-virtualenv.
Latest. The env was used as local for a dir. I do not have ~/pyenv/versions/{version}/envs
directory. Searched for it, but no.
from pyenv-virtualenv.
So what are your symptoms regarding this issue?
What errors do you get and when?
If it happens on shell startup, you could try from an existing shell to run env PYENV_DEBUG=1 $SHELL
, which would open a subshell, probably with debug info. Then you can see where the error is coming from (search the output).
If that does not help, try export PYENV_DEBUG=1
in an existing shell and then trigger it.
from pyenv-virtualenv.
Steps to reproduce this would be very useful, because then it could be fixed and added to the test suite.
from pyenv-virtualenv.
I've tried to reproduce it:
% pyenv virtualenv test-foo
% pyenv local test-foo
% rm -rf ~/.pyenv/versions/test-foo
I do not get any errors after that, also for a new shell in this dir, but pyenv version
says pyenv: version \
test-foo' is not installed ...`, and the same error happens when trying to run any command managed by pyenv.
That's the expected behaviour somehow: pyenv tries to load/use the version you specified, and errors out because it does not exist anymore. There is no way pyenv could or should update all your .python-version
files.
If you see this during shell startup it might be cause by using python
etc in your startup scripts (likely a bad idea anyway performance-wise).
~/.pyenv/versions/test-foo
is not a symlink for me currently however, too.
from pyenv-virtualenv.
Anyway, you can use pyenv version
to see where it is coming from.
from pyenv-virtualenv.
In @matthieugrieger it was probably still set in the shell env (PYENV_VERSION
), and fixed itself with a new shell (where it was not set to a non-existent version).
from pyenv-virtualenv.
The symptoms are:
- when I try to execute any pyenv command, or
- when I open a new shell
I see pyenv: {my-deleted-version}' is not installed
, and command is not executed (the command was trying to create a new virtualenv; it was not created).
from pyenv-virtualenv.
@blueyed: Yes, I believe that is what happened.
from pyenv-virtualenv.
It's not set at all. echo $PYENV_VERSION
: nothing is printed.
from pyenv-virtualenv.
@j-bennet
In your case it would be a .python-version
file.
What does pyenv version
give you?
from pyenv-virtualenv.
Steps to reproduce.
mkdir ~/repos/boo
cd ~/repos/boo
The following steps are all inside boo
.
--- repos/boo » pyenv virtualenv boo
New python executable in /Users/irina/.pyenv/versions/boo/bin/python2.7
Also creating executable in /Users/irina/.pyenv/versions/boo/bin/python
Installing setuptools, pip, wheel...done.
Ignoring indexes: https://pypi.python.org/simple
Requirement already satisfied (use --upgrade to upgrade): setuptools in /Users/irina/.pyenv/versions/boo/lib/python2.7/site-packages
Requirement already satisfied (use --upgrade to upgrade): pip in /Users/irina/.pyenv/versions/boo/lib/python2.7/site-packages
--- repos/boo » pyenv local boo
pyenv-virtualenv: activate boo
(boo)--- repos/boo » cat .python-version
boo
(boo)--- repos/boo » deactivate
--- repos/boo » pyenv version
boo (set by /Users/irina/repos/boo/.python-version)
--- repos/boo » rm -rf ~/.pyenv/versions/boo
pyenv: version `boo' is not installed (set by /Users/irina/repos/boo/.python-version)
--- repos/boo » pyenv version
pyenv: version `boo' is not installed (set by /Users/irina/repos/boo/.python-version)
pyenv: version `boo' is not installed (set by /Users/irina/repos/boo/.python-version)
--- repos/boo » pyenv uninstall boo pyenv: version `boo' not installed
pyenv: version `boo' is not installed (set by /Users/irina/repos/boo/.python-version)
--- repos/boo » pyenv virtualenv foo pyenv: version `boo' is not installed (set by /Users/irina/repos/boo/.python-version)
pyenv: version `boo' is not installed (set by /Users/irina/repos/boo/.python-version)
--- repos/boo » pyenv versions pyenv: version `boo' is not installed (set by /Users/irina/repos/boo/.python-version)
system
2.7.10
pyenv: version `boo' is not installed (set by /Users/irina/repos/boo/.python-version)
from pyenv-virtualenv.
Umm. It seems I forgot to redirect stderr to /dev/null. Just doing so would stop pyenv-virtualenv to do spamming.
from pyenv-virtualenv.
@matthieugrieger @j-bennet I believe that the spamming will be suppressed with 9414a6b. Please give it a try.
from pyenv-virtualenv.
@yyuu I installed pyenv with homebrew, how do I update it to get the fix?
from pyenv-virtualenv.
@j-bennet Just try upgrading in the standard manner of Homebrew. 'brew update && brew upgrade pyenv pyenv-virtualenv'.
from pyenv-virtualenv.
Does not seem to help.
--- ~/src » cd ~/repos/boo
--- repos/boo » ll
--- repos/boo » pyenv versions
pyenv: version `boo' is not installed (set by /Users/irina/repos/boo/.python-version)
system
2.7.10
wharfee
--- repos/boo » pyenv uninstall boo
pyenv: version `boo' not installed
--- repos/boo » pyenv virtualenv foo 1 ↵
pyenv: version `boo' is not installed (set by /Users/irina/repos/boo/.python-version)
--- repos/boo » pyenv versions 1 ↵
pyenv: version `boo' is not installed (set by /Users/irina/repos/boo/.python-version)
system
2.7.10
wharfee
from pyenv-virtualenv.
In fact, pyenv is even more chatty now:
(wharfee) --- src/wharfee ‹volume-commands› » ll
total 80
-rw-r--r-- 1 irina staff 2.7K Dec 20 12:21 README.md
pyenv-virtualenv: deactivate wharfee
pyenv-virtualenv: deactivate
pyenv-virtualenv: activate wharfee
pyenv-virtualenv: prompt changing will be removed from future release. configure `export PYENV_VIRTUALENV_DISABLE_PROMPT=1' to simulate the behavior.
from pyenv-virtualenv.
Related Issues (20)
- Activate virtualenv: Example
- `pyenv virtualenvs` failure on macOS Big Sur HOT 1
- Something like virtualenv-clone HOT 7
- [FR] Local virtualvenvs + registering them / using them through `.python-version` HOT 14
- Force creating venv with same name doesn't update Python version
- Set CONDA_PROMPT_MODIFIER env var when activating conda environment HOT 5
- Env's name disappears from the prompt when spawning a subshell HOT 6
- python3-config (along with other tools) does not respect the version virtualenv hook on HOT 6
- pyenv deactivate doesn't deactivate env HOT 1
- pyenv virtualenv does not correctly link the c++ libraries associated to the python package
- New release? HOT 3
- Latest version HOT 1
- Incorrect version reported by `pyenv virtualenv --version` HOT 1
- Cannot create new virtualenv with "system" Python if it's 3.11+ HOT 1
- Hooks for virtualenv-delete HOT 1
- Hooks don't work under /usr/share/pyenv/plugins
- Virtualenv not isolated HOT 1
- Don't use `.python-version` for auto-activation HOT 3
- "tox: command not found" despite tox being present in the active environment HOT 1
- Unable to use `venv/bin/activate` when the virtual environment of pyenv-virtualenv is set. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyenv-virtualenv.