Open lliendo opened 2 years ago
I think I'm running into the same issue on MacOS. I have MacOS 11.6, with zsh. I just did a fresh install of pyenv by running:
curl https://pyenv.run | bash
per the instructions in pyenv-installer
, and set up my environment by adding the following to my $HOME/.zshrc
:
export PATH="$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init --path)"
eval "$(pyenv virtualenv-init -)"
Although a simple restart of the shell ought to have been sufficient, I rebooted, just to be absolutely sure.
I then installed Python 3.6 with the following command:
CFLAGS="-I$(brew --prefix openssl)/include -I$(brew --prefix bzip2)/include -I$(brew --prefix readline)/include -I$(xcrun --show-sdk-path)/usr/include" LDFLAGS="-L$(brew --prefix openssl)/lib -L$(brew --prefix readline)/lib -L$(brew --prefix zlib)/lib -L$(brew --prefix bzip2)/lib" pyenv install --patch 3.6.15 < <(curl -sSL https://github.com/python/cpython/commit/8ea6353.patch\?full_index\=1)
per this bug. The installation proceeded and completed successfully.
I then ran pyenv global 3.6.15
to set the global python version to 3.6.15, and indeed pyenv versions
shows that to be the case:
system
* 3.6.15 (set by /Users/<redacted>/.python-version)
However, when I run python --version
, I get:
Python 2.7.16
which is the ancient version of Python currently shipping with MacOS.
I can see a directory for 3.6.15
in $HOME/.pyenv/versions
, so clearly it has been installed. It's just that it's not being added to the $PATH
correctly.
Hi there,
I'm using Armbian on the Pine RockPro64,
uname -a
reports:I've installed pyenv both through the manual instructions (cloning the repo and then updating
.bashrc
) and also through the installer (using thecurl
call mentioned in https://github.com/pyenv/pyenv-installer). For both options something weird is happening, and unable to clearly see what the problem is. Here are for the steps that I've done to try to install Python 3.9.0 (after either cloning or doing thecurl
installation):Update and reload .bashrc:
Reopen the terminal so
.bashrc
settings are refreshed. At this pointpyenv
seems to be available andenv
shows (which I believe is correct):Install Python 3.9.0:
Create new virtualenv for Python 3.9.0:
Run
pyenv rehash
(just in case)Activate pyenv environment (the pyenv seems to be activated as the prompt changes displaying the environment name):
Run python (fails):
Unfortunately I don't have another system to keep testing, but not long ago I did this on a fresh Debian installation without issues. I'm also running another machine with FreeBSD and though I've installed pyenv long ago (and is working perfectly) I checked the PATH env variables and are both the same.
Something that I found interesting is that
pyenv which python
reports:And if I run:
/home/lucas/.pyenv/versions/sandbox/bin/python
of course this works:I can't see if I've missed something or there's something extra that needs to be done on Armbian. I've looked for information regarding this issue but couldn't find someone having the same or a similar problem.
It looks as if the
/home/lucas/.pyenv/versions/sandbox/bin/
path is not exposed to the shell after the environment has been activated (if this is indeed the issue).Thanks for your time, Lucas.