I need some help to understand why this message is still display on my terminal everytime I'm opening it.
/Users/<name>/.zprofile:12: command not found: pyenv
/Users/<name>/.zshrc:9: command not found: x
Found pyenv, but it is badly configured (missing pyenv shims in $PATH). pyenv might not
work correctly for non-interactive shells (for example, when run from a script).
To fix this message, add these lines to the '.profile' and '.zprofile' files
in your home directory:
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init --path)"
Of course, I've added the path in my .zshrc profile AND .zprofile AND .profile but nothing change.
I have a MackBookPro M1 Pro with MacOS Monterey 12.4 and I've installed Pyenv with homebrew.
Can anyone with a MackBook Pro M1 got the same problem ?
Related
I have previously installed npm, homebrew, oh-my-zsh and other runtime environments and worked perfectly on my Mac M1, until recently, no packages or runtime environments are being recognised.
When I enter brew I get error as zsh: command not found: brew but I can see in my opt/ path that there's homebrew folder and its content present,
Similarly for npm it shows error zsh: command not found: npm
I might have done something with my PATH
Here's a screenshot
Edit: My .bash_profile is empty, should it be empty??
On the M1 Macs, homebrew files are installed by default in /opt/homebrew, and the executables are usually placed in or linked to /opt/homebrew/bin. That directory is not in your search PATH - instead, it looks like you have the PATH settings for an Intel Mac.
As you noted, updating the PATH should fix the issue, but first you need to determine which shell you are using (the question is tagged both zsh and bash). It's probably zsh, since that's the default on newer versions of macOS, and it would explain why the .bash_profile is empty. You can double-check this with the command echo $0.
There are several ways to update the path, and many are described in other posts here at SO, such as this one. This will also work for zsh:
print 'PATH=$PATH:/opt/homebrew/bin' >> ~/.zshrc
An error occurs whenever I turn on the terminal.
# Terminal
/Users/{username}/.zshrc:103: command not found: pyenv
/Users/{username}/.zshrc:104: command not found: pyenv
# line 103, 104 of /Users/{username}/.zshrc
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
There's no problem with the annotation. But I think I wrote it down because I needed two codes when I used Catalina, so is it okay if I don't have it?
Oh, but using brew install pyenv caused an installation error.
It was installed using arch -arm64 brew install pyenv as the guide in the error message.
Not only pyenv, but also pyenv-virtualenv.
The Catalina time machine was moved to the new MacBook Air M1, and the data seemed to have passed normally, but none of the applications have passed.
What's the problem? Did the other people have their applications transferred together?
Ah, the existing workspace folder, the GitHub clone folder, has all disappeared.
I had the same issue and it ended up being The line, eval "$(pyenv init -)" was above the homebrew eval line, eval $(/opt/homebrew/bin/brew shellenv) in my .zshrc.
I am attempting to install Homebrew on MacOS but keep getting the error Warning: /opt/homebrew/bin is not in your PATH. I have updated my .zshrc to include export PATH=/usr/local/bin:$PATH but have had no such and continue to not be able to access brew commands. I am running MacOS BigSur and am attempting to set up a ruby coding environment.
By running /opt/homebrew/bin/brew doctor as noted in the warning as opposed to brew doctor I was given the correct notation for updating my .zshrc file export PATH="/opt/homebrew/bin:$PATH as opposed to export PATH=/usr/local/bin:$PATH as indicated in several answers to similar questions. After running source ~/.zshrc and brew doctor the system confirmed the path had been updated properly.
I'm a Ruby developer setting up my local development environment on a new iMac running macOS High Sierra with iTerm2, Homebrew, rbenv, zsh and oh-my-zsh.
I used RVM before on my Linux machine, but want to switch to rbenv with this iMac because I've heard it's better in some ways, so I'm trying to make sure all is as it should be with my rbenv setup before I start downloading/installing Rails and other gems.
I'm running rbenv init, which, as I understand it, will tell me what I need to do next to get rbenv working. It displays this message:
# Load rbenv automatically by appending
# the following to ~/.zshrc:
eval "$(rbenv init -)"
So I went into my .zshrc file and added that line. My .zshrc file currently looks exactly like this (comments omitted):
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
export ZSH="/Users/christian/.oh-my-zsh"
plugins=(git)
source $ZSH/oh-my-zsh.sh
No matter how many times I restart my iTerm terminal and run rbenv init, it always gives me that same instruction, and nothing else.
The first line in the file used to be: export PATH=$HOME/bin:/usr/local/bin:$PATH but I changed it to the current line because another StackOverflow page suggested this to someone having a very similar problem, but it didn't help.
I don't understand why it keeps telling me to add something that's already in the .zshrc file, and I don't know whether I've successfully setup rbenv with everything and am ready to start developing in Ruby on Rails.
I've looked at lots of stuff about this on here and other sites, but I can't seem to find the answer. I would be very grateful if someone could tell me why it keeps giving me that same message? how I make it proceed with the instructions and tell me the next thing to do? and how I'll be able to tell for sure when my rbenv is properly setup for development?
I eventually ran curl -fsSL https://github.com/rbenv/rbenv-installer/raw/master/bin/rbenv-doctor | bash and it showed green for everything. It seems I had everything already setup correctly; the rbenv init interface was just confusingly telling me to do something I'd already done. I confirmed it was all working by downloading different versions of Ruby with rbenv install, switching between them with rbenv local and rbenv global, and making sure ruby -v always displayed whatever version I had selected.
I installed Anaconda3 in my windows environment and added
C:\Users\user\Anaconda3\Scripts
C:\Users\user\Anaconda3
to my windows environmental variables. Theoretically, this should also update my path in WSL like it does with visual studio code. However it didn't and now I can't run conda commands from the ubuntu terminal. I can't figure out how to fix this...thanks!
*It should be noted that I am also using zsh and oh my zsh by running the code
# Launch Zsh
if [ -t 1 ]; then
exec zsh
fi
Inside my bashrc file
I had a similar problem. The issue was, that I had installed conda for windows and it seems it doesn't run fine with wsl. Try downloading and installing conda for ubuntu from the wsl command line interface and add the folders to the path. It worked for me.
This link helped me download conda from wsl command life interface.
If path not added, export PATH="/Users/username/anaconda/bin:$PATH" to your .zsh_config file.
This link may help you
Zsh: Conda/Pip installs command not found