Skip to main content

Installing Pyenv with ZSH

  This post is written assuming you are using OhMyZsh.

Install Pyenv as per this: https://realpython.com/intro-to-pyenv

When I followed the instructions as they were in the guide above, I got the error: "command not found: pyenv".

Zsh is not able to find pyenv even though it has been correctly installed. So we can tweak the steps a bit to adjust them to our Zsh shell.

While installing, instead of the command  curl https://pyenv.run | bash, use the command  curl https://pyenv.run | zsh. This will install Pyenv.

The guide asks you to add some lines of code in bashrc. We'll modify those lines and add them into our zshrc.

Enter this command in terminal to be edit the zshrc:  sudo nano ~/.zshrc.

Nano is a text editor in terminal that allows you to read and edit text files within the terminal. The command sudo nano will open the contents of zshrc inside the terminal just as any other text editor with GUI would. You can edit it the file.

Now paste the following into your .zshrc and save your changes.

# Load pyenv automatically by adding
# the following to ~/.zshrc:

export ZSH="/home/oem/.oh-my-zsh"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"

Now add the pyenv plugin to  .zshrc with the following command:

plugins=(
  pyenv
)

And activate the changes with this command:
source ~/.zshrc

Now check the Pyenv version with pyenv --version.

If the version shows right, you've successfully installed Pyenv. If you came across some new problems, do share!

Reference used: 

Comments

Popular posts from this blog

Get search results for a specific location - using JS Bookmarklet

Drag these links to the bookmark bar: Ireland US UK  Australia Here are the next steps: 1. Enter the search query in URL field. Do not go to Google.com to search. It is important that the search url you have is of the format in point 2. Else this code won't work. This code was designed on the basis of how search urls are created in Chrome when you enter the search query in the URL field 2. So the search URL should be be of this format: https://www.google.com/search?q=vegetable+seeds&oq=vegeta&aqs=xyz&sourceid=chrome&ie=UTF-8 3. Click on the bookmark as per the location you want the search to happen in.

Ways to Search From Any Damn Location

 VPNs suck. Right now we only want to make the website we are visiting "feel" that we are not where we are but where we tell it where we are. To lie to your ISP, you'd still need a VPN, a paid one. There's one alternative to that too, but we'll talk of it later. Several ways: 1. UULE Parameter UULE is a handy search parameter made by Google Ads to help themselves easily see how their search results vary from location to location. It's pretty useful to us. It looks like this: &uule=w+CAIQICIdTG9uZG9uLEVuZ2xhbmQsVW5pdGVkIEtpbmdkb When you append this to a search URL like this https://www.google.com/search?q=[search-term]&oq=[search-term], you'll get search results for London, UK. Try this:  https://www.google.com/search?q=aaa&oq=aaa&uule=w+CAIQICIdTG9uZG9uLEVuZ2xhbmQsVW5pdGVkIEtpbmdkb20&hl=en&gl=uk The UULE parameter consists of w+CAIQICI + [string length] + [base-64 encoded location] I've made bookmarklets for common search locat...