-
-
Notifications
You must be signed in to change notification settings - Fork 401
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
zsh: command not found: pyenv #233
Comments
It Pasting your full zsh configurations (regard to pyenv/pyenv-virtualenv) here could help further investigation. |
I have same issue
entire contents of my .zshenv and copy pasting it to a loaded shell works as intented. just ditching my .zshenv file and pasting its contents into .zshrc works as intended as well. I'm using ohmyzsh if that makes any diff. |
I have the same issue.
|
My guess is that pyenv is being installed in a location that zsh doesn't use by default (like /usr/local/bin). You probably have a line at the top of your .zshrc that looks like |
Works for me, thanks 😄 |
Some update ? |
I had this issue, after following https://github.com/pyenv/pyenv-installer I changed my export PATH="~/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)" To export PATH="$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)" |
nice |
This is breaking some customers, who just copy paste these lines into their `*rc` file See pyenv/pyenv-virtualenv#233 (comment)
This is breaking some customers, who just copy paste these lines into their `*rc` file See pyenv/pyenv-virtualenv#233 (comment)
Opened a PR to change this pyenv/pyenv-installer#86 |
Cool, tk you verry much |
The above fix didn't work for me though. I used the following block in
|
author Rahul <rahul@Rahuls-MacBook-Pro.local> 1604040420 +0800 committer Rahul <rahul@Rahuls-MacBook-Pro.local> 1604278976 +0800 parent 772a5db author Rahul <rahul@Rahuls-MacBook-Pro.local> 1604040420 +0800 committer Rahul <rahul@Rahuls-MacBook-Pro.local> 1604278973 +0800 parent 772a5db author Rahul <rahul@Rahuls-MacBook-Pro.local> 1604040420 +0800 committer Rahul <rahul@Rahuls-MacBook-Pro.local> 1604278971 +0800 parent 772a5db author Rahul <rahul@Rahuls-MacBook-Pro.local> 1604040420 +0800 committer Rahul <rahul@Rahuls-MacBook-Pro.local> 1604278963 +0800 parent 772a5db author Rahul <rahul@Rahuls-MacBook-Pro.local> 1604040420 +0800 committer Rahul <rahul@Rahuls-MacBook-Pro.local> 1604278931 +0800 Implementing check and add functionality create project add pyenv-installer as default plugin add pyenv-doctor use https instead of git protocol Remove unneeded escaping in here-doc There is no need to escape double-quotes in here-doc strings. The current output contains a lot of '\"' that have to be converted to '"' manually. Add pyenv-version-ext (pyenv/pyenv#96) Point to the newer GitHub Raw URL Old one wasn't working. Follow HTTP redirects Simplify Display shell configurations based on user's shell Update the list of plugins Added missing quote to instructions after install Add `eval "$(pyenv virtualenv-init -)"` Add uninstallation procedure (fixes #10) Use `git://github.com` to fix problem with ancient Git (refs #9) prrof of concept add vagrantfile and ignores formatting vagrant explanation troves, docs, todos add caveat about automating remove docker key, whitespace This works somwhow on TestPyPi whipping fork into shape for merge. add manifest Add new option to install from PyPi. add a version number (will likely need to be adapted) ignore generated MANIFEST use MANIFEST template Installation instructions and copyright meta data and long description from README.rst fix copyright notice fix short description add info to copyright notice add info to copyright notice f*** the copyright notice ... dunno how and what to add :) fix version number Revert "f*** the copyright notice ... dunno how and what to add :)" This reverts commit 9ce6161. Use https to clone from github if `USE_HTTPS` is defined (fixes #12) fix spelling mistake in readme.rst Add warning for PyPi install opened pyenv/pyenv-installer#25 to fix this pip-rehash is a default feature of pyenv nowadays Fixed PATH of pyenv-installer. Added offline installer. Fixed PATH of pyenv-offline-installer. Changed CLI of pyenv-offline-installer. Revert "Fixed PATH of pyenv-offline-installer." This reverts commit ea44a1a. Revert "Revert "Fixed PATH of pyenv-offline-installer."" This reverts commit e0f14bf. Revert "Changed CLI of pyenv-offline-installer." This reverts commit a62269e. Small fix on pyenv-offline-installer. reversed the usage of https instead git:// added info for USE_GIT_URI Update README.rst made uninstallation instructions complete Fix bug in doc Use shallow clone for repo checkouts. Syntax highlight in README.rst Fix minor typo point links to the correct repositories of pyenv update copyright dates and have a single source of truth for the license release date is to be determined update and simplify the dummy package to finally "release" it. don't recommend piping the internet through a shell Update installer script URL to more pleasure Fix repo URLs to point to `pyenv` organisation exit with error if a git clone operation fails PR from patch pyenv/pyenv-installer#40 (comment) - thanks @tuxlifan prefer bashrc instead of bash_profile prefer bashrc instead of bash_profile fix rst - note to self always use twine check, even for little things. Add the short url to install pyenv Thanks @robnagler :) follow redirects not necessary for pyen.run fix release date / version fix link syntax Add suggestion to restart shell Thanks @lymanZerga11! fix: suggests removal of .pyenv folder on reinstallation refactor: message changes fix: .pyenv check moved right at the start Explicitly set .pyenv PATH This is breaking some customers, who just copy paste these lines into their `*rc` file See pyenv/pyenv-virtualenv#233 (comment) Adding hint for Travis Integrating suggestion from pyenv/pyenv-installer#60 Update error message to use relative $PYENV_ROOT When using a separate $PYENV_ROOT, the error message refers to the `.pyenv` directory living in $HOME. Update headings in readme. Formatting headings Formatting headings fix error about wrong command + Cloning into ''\''pyenv'\''...' download-pyenv-package.sh: line 4: Cloning: command not found
i had also some difficulties in windows WSL2 & zsh on ubuntu 20.04
|
I've tried everything listed on this page, mine still doesn't work. This error message still pops up. ` Load pyenv automatically by appending eval "$(pyenv init -)" ` This is how my ~/.zshrc file looks like. !! Contents within this block are managed by 'conda init' !! if command -v pyenv 1>/dev/null 2>&1; then |
@andrewsiah what distro are you using? pyenv recently changed how it loads the configuration. It now requires the |
Found this issue after installing via the pyenv-installer. (zsh on wsl ubuntu running in conemu)
As mentioned in this thread. I got the following warning after restarting the shell:
After running pyenv init, it pretty much told me to add
However this means, that the pyenv-installer is currently broken. :( |
I've tried so many variations and it's still not working. My current setup is
erased .profile and .zshrenv Still receiving zsh: command not found: pyenv HELP! |
I'ts work! Thanks :D |
In case of M1 users: Pyenv gets installed to /opt/homebrew/Cellar/... So running Therefore, I added this to my
Works as expected. |
This works for me too! But I wonder if we'll have to change this whenever pyenv updates? |
Please see updated and hopefully clearer Pyenv shell setup instructions in https://github.com/pyenv/pyenv#readme |
This is the issue I believe @f4z3k4s and I are experiencing. I think that I attempted to follow the updated homebrew shell setup instructions appropriately. But I still receive the # .zshrc
export PATH="$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init -)" # .zprofile
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
# eval "$(pyenv init --path)" <-- causes .zprofile:3: command not found: pyenv
eval "$(/opt/homebrew/Cellar/pyenv/2.1.0/libexec/pyenv init --path)" # works |
@ScottGuthart If you installed Pyenv with Homebrew, it should already be on PATH, in |
@native-api gotcha, so maybe this is an issue just unique to me then. I don't think I've previously installed from git checkout but I did just migrate from an intel mac to an m1 mac, I'm guessing that's probably the cause of it somehow. |
This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further. |
Thanks! |
Absolutely nothing helped me either. In my case , I had to say goodbye to anaconda . For some reason, the system refused to load anything other than python inside anaconda |
For those, who have installed pyenv with Homebrew and have
|
It works for me,I want to know why it works? |
|
This worked for me as well, the key for me was putting putting it in |
Currently im working on wsl2 with zsh, I change my
To
|
worked like a charm ✨ |
This is my
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init --path)"
eval "$(/opt/homebrew/bin/brew shellenv)"
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init --path)" |
for me this setup made shell find pyenv, BUT the export path for python packages is still
would be awesome if someone could help! |
this is my fix, i think for others like myself, it was a simple order of operation of the zsh; Order of reading startup files in zsh: so now my .zshenv and .zprofile look like this: eval "$(/usr/local/bin/brew shellenv)" also i needed to create a .zprofile and .zshenv @yin-ori check your .zshenv |
I had same issue and just follow the configuration steps posted here https://github.com/pyenv/pyenv#set-up-your-shell-environment-for-pyenv. After make the necessary changes, the issue disappeared. |
My
.zshenv
containswhich works fine, however, if I simply add
eval "$(pyenv virtualenv-init -)"
I keep receiving the message
zsh: command not found: pyenv
Pyenv and pyenv-virtualenv work perfectly fine and if I enter
exec "$SHELL"
the message goes away until I restart the terminal so I'm sure what the issue is.I'm running Arch Linux, Zsh 5.4.2-1, tmux 2.5-3, termite 12-2, and the master branch of both pyenv and pyenv-virtualenv pulled today.
The text was updated successfully, but these errors were encountered: