Comments (7)
This was done deliberately because with automatic prefix resolution, you're risking accidentally deleting an installation other than the one you want.
To explicitly order Pyenv to resolve a prefix, use pyenv latest
. E.g.:
pyenv uninstall $(pyenv latest 3.7)
# or
pyenv latest 3.7 | xargs pyenv uninstall
from pyenv.
Btw if your goal is to save typing, pressing <Tab>
after 3.7
would resolve it to 3.7.14
if it's your only installation beginning with those characters. (That's assuming you have Pyenv shell integration active.)
from pyenv.
This was done deliberately because with automatic prefix resolution, you're risking accidentally deleting an installation other than the one you want.
To explicitly order Pyenv to resolve a prefix, use
pyenv latest
. E.g.:pyenv uninstall $(pyenv latest 3.7) # or pyenv latest 3.7 | xargs pyenv uninstall
I understand it can be done in such way, but all of those options use more than just one command.
from pyenv.
Btw if your goal is to save typing, pressing
<Tab>
after3.7
would resolve it to3.7.14
if it's your only installation beginning with those characters. (That's assuming you have Pyenv shell integration active.)
Sure, but you have to know that the Tab completion works in this particular case. Which may seem obvious to maintainers, but not to someone who uses pyenv once in a while like myself. Besides that the feature I am requesting does the same without Tab which feels more intuitive to me.
This was done deliberately because with automatic prefix resolution, you're risking accidentally deleting an installation other than the one you want.
However, when we have only one patch version installed, I don't see how does this apply here.
from pyenv.
However, when we have only one patch version installed, I don't see how does this apply here.
Indeed, in this particular case, it doesn't.
It does in the cases where
- you think you have something specific installed but the reality is a little bit different (especially probable in scripts)
- the prefix resolution happens to work differently in the particular case than you're expecting it to (can very well happen with prereleases and alternative Python flavors with different versioning schemes)
I just foresee an influx of complaints from users who accidentally deleted something important by falling victim to the above scenarios. They would (IMO rightfully) think that we've left a landmine for them to step on.
from pyenv.
I can't comment on how many users will fall victim for those two scenarios you mentioned. I am not maintainer and I don't know what ppl use to come here with to complain about.
Would you consider at least in case is user want to delete python version, e.g. 3.7.14, but writes only pyenv uninstall 3.7
pyenv telling him "Hey the version 3.7 is not currently installed, but you have versions 3.7.1, 3.7.3, ... 3.7.14, ..." Plus when the user has only one patch version it will also add to the message "You can complete the version of 3.7 to 3.7.14 by pressing Tab next time."?
from pyenv.
Tab completion is already mentioned in https://github.com/pyenv/pyenv?tab=readme-ov-file#set-up-your-shell-environment-for-pyenv .
Perhaps we can make the mention more prominent (e.g. explicitly call it "tab completion")?
Tab completion -- and the ability for programs to integrate with it -- is built into most shells and always behaves in the same, shell-specific way. So I doubt it warrants more elaboration that that: it's already being explained in learning materials for the shells. Pyenv documentation is not the place to teach users to use shells.
from pyenv.
Related Issues (20)
- latest python version not listed on Pyenv for mac os HOT 5
- Documentation improvement suggestion: Add a brief note about how to install PyPy, or link to a list of available Python distributions from the Readme HOT 5
- Trivy scan errors with pyenv installation in Dockerfile HOT 4
- support mainland-china network env HOT 10
- Python-build not in sync with cpython releases HOT 2
- Python 2.7.18 install fails on Mac OS X Sonoma (14.5) HOT 11
- python3.12.3 install in linuxmint failed: "error: ‘I_PUSH’ undeclared" HOT 7
- Adapt to executable naming in the free-threaded build HOT 4
- pyenv versions not working HOT 1
- Long running instance of pyenv-exec sed HOT 3
- arch -x86_64 pyenv install 3.8.5 errors when I run the command HOT 1
- Please add support for authenticating with the address specified in the environment variable PYTHON_BUILD_MIRROR_URL HOT 4
- Consider support for uv in `pip-rehash` HOT 5
- Automate making releases after a version is added
- Cannot build a thing on a new M3: "ld: library 'System' not found" HOT 18
- Add a nicer way to select a free-threaded build HOT 4
- pyenv install 3.9.16 not working on MBP M3 HOT 2
- Build failed for python 3.4.4 on Mac OSX 14.5 x86_64
- Install script unable to compile python(Python/fileutils.c:2398:9: error: implicit declaration of function ‘close_range’) HOT 1
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.