[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: pyenv global detect system python #345

Open
Nriver opened this issue Jan 6, 2022 · 4 comments
Open

feature: pyenv global detect system python #345

Nriver opened this issue Jan 6, 2022 · 4 comments

Comments

@Nriver
Copy link
Nriver commented Jan 6, 2022

I have installed my python in C:\Python38, then I try pyenv versions, it does not recognize my python as system like pyenv does on linux. It would be nice to be able to switch to already installed python.

@rollingmoai
Copy link

Running pyenv local --help:

Usage: pyenv local <version> <version2> <..>
       pyenv local --unset

Sets the local application-specific Python version by writing the
version name to a file named `.python-version'.

When you run a Python command, pyenv will look for a `.python-version'
file in the current directory and each parent directory. If no such
file is found in the tree, pyenv will use the global Python version
specified with `pyenv global'. A version specified with the
`PYENV_VERSION' environment variable takes precedence over local
and global versions.

<version> can be specified multiple times and should be a version
tag known to pyenv.  The special version string `system' will use
your default system Python.  Run `pyenv versions' for a list of
available Python versions.

Example: To enable the python2.7 and python3.7 shims to find their
         respective executables you could set both versions with:

'pyenv local 3.7.0 2.7.15'

The special version string `system' will use your default system Python.

So is it actually implemented or???

@zoldaten
Copy link
zoldaten commented Jul 8, 2022

to use your system python just change in Windows PATH priority of pythons.
First, should go your system python, i.e. c:\python, second, paths of pyenv: C:\Users\Al.pyenv\pyenv-win\bin;
C:\Users\Al.pyenv\pyenv-win\shims;

After that you could start you system python and pyenv`s pythons.

@markjreed
Copy link

That's a rather ugly workaround, zoldaten, and doesn't address the ask, which is a feature request.

In pyenv on *nix, you can use the literal text "system" as the name of the python version to use (with any of the version selection subcommands, like global, local, or shell) and the shims will then run the executables associated with whatever version of python you would get if pyenv weren't there. That's the feature being requested here.

@jrbosch
Copy link
jrbosch commented Sep 22, 2023

Hi, Is there any update here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants