-
Notifications
You must be signed in to change notification settings - Fork 436
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
Pyenv installer does not add to path #112
Comments
reinstalled clean ubuntu 20.04 LTS on wsl2, installed dependencies, ran script,
|
according to uninstall instructions https://github.com/pyenv/pyenv-installer/blob/master/README.rst#uninstall |
when installer script runs, it shows the following output.
|
after following those instructions and restarting the terminal, I'm able to use pyenv but when I exit the terminal I get the error |
Same issue. |
@connerxyz were you able to fix it by adding the code to your .profile and .bashrc or did you still have the exit error code 1 issue? Are you using vscode with wsl2 ubuntu 20.04 LTS also? |
have a look at the first solution in the link below |
@cchanzl I tried the instructions there but still have the error code 1 #103 (comment)
|
more context: |
this should be a part of the pyenv installer script to ask the user if the user would like to add the required lines to the ~/.bashrc |
I hit the same issue today. I think this happened with pyenv 2.0+ upgrade (first release in may 23). They changed the bashrc script to: export PATH="$HOME/.pyenv/bin:$PATH" Second line was https://github.com/pyenv/pyenv/blob/master/README.md#basic-github-checkout |
This still looks broken for me? The workaround I used since there was only one file was |
Same issue today. Installed with script on ubuntu 20.04, restarted shell and still
fixed by manually adding to
and then restarting the shell with |
Did it ever work? |
The script change worked for me. |
Check Pyenv's and Pyenv-Virtualenv's README for the proper setup. With the code you gave, E.g. for Ubuntu, that'll be (as of this writing): sed -Ei -e '/^([^#]|$)/ {a \
export PYENV_ROOT="$HOME/.pyenv"
a \
export PATH="$PYENV_ROOT/bin:$PATH"
a \
' -e ':a' -e '$!{n;ba};}' ~/.profile
echo 'eval "$(pyenv init --path)"' >>~/.profile
echo 'eval "$(pyenv init -)"' >> ~/.bashrc
echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.bashrc Then restart your login session. |
After installing the follow message appears
Still fail to find pyenv after add I had to manually add to .bashrc
|
@anton-petrov it seems like the issue should be reopened: as it stands, the README for this project is incorrect, |
Had the same issue w/ Mac OS X 10.15.7 using Running
... but the pyenv python wouldn't be found. The system python is what would launch when I did p.s.: Also had to add
to |
I tried to manually add this and I get this error:
|
I was able to get it to activate with this
however it still is broken when trying to install it uses the wrong path
|
tried these commands and it didn't resolve the issue
|
changing my ~/.bashrc to this fixed the issue
|
Can we get a re-open on this? Per @sabotagebeats' comment you can get a. That is not mentioned in the docs (see below), and moreover: Example of following the docs:
⬆️ this is already a red flag, but the docs only say to
This leaves the user having to go back to the |
Here's what happens when you follow the directions in the README on Ubuntu 21.10: $ sudo apt install -y make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev \
libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev libffi-dev \
liblzma-dev python3-openssl git && echo 'Success'
Success
$ curl https://pyenv.run | bash
[snip]
WARNING: seems you still have not added 'pyenv' to the load path.
# See the README for instructions on how to set up
# your shell environment for Pyenv.
# Load pyenv-virtualenv automatically by adding
# the following to ~/.bashrc:
eval "$(pyenv virtualenv-init -)"
$ echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.bashrc
$ exec $SHELL
$ pyenv
Command 'pyenv' not found, did you mean:
command 'p7env' from deb libnss3-tools (2:3.61-1ubuntu2) Similar problem when doing the same on Arch. This was solved by copying and pasting the following into my export PATH="$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init --path)"
eval "$(pyenv virtualenv-init -)" I agree with @davetapley's points. |
Came here to suggest that the install script should setup the entire environment so you can start using pyenv immediately. |
I'm taking a look at at the pyenv-installer should do something similar while also leaving an option of not modifying your shell config files if you already do that on your own. For example I have separate files that my shell config loads if the binary is present. |
I added my note on how I get it to work on RL8 in #103 (comment) . |
Is there a good reason why the installer doesn't automatically update the path in e.g. |
It worked by following the instructions in pyenv README for manual installation... but why use the installer then? Or -at least- why the installer is not suggesting that one should read that section?
|
The same for me. |
I'm using Fedora 35 with |
Which README? Where? The README for this repo? |
Still broken in 2022 <3 |
yep, broken |
I am still having this issue. |
For Ubuntu-based Linux distros try to use my script: |
This was solved by copying and pasting the following into my~/.bashrcfrom the"Uninstall" section of the README:
deepin 20.8 |
2023 now and no fix, maybe good idea to update readme? #145 |
There is still the This is misleading as it implies I should have adapted the |
Still have the issue Distributor ID: Ubuntu
|
Check pyenv/pyenv#332 (comment) |
it only works if you have the default shell (Running |
Pyenv is not found after installer is ran. After adding code to .profile and .bashrc it is also not found. Finally after manually adding modified code from github, I get error code when I exit bash. This installer script does not function properly.
pyenv/pyenv#1994
The text was updated successfully, but these errors were encountered: