Skip to content

Instantly share code, notes, and snippets.

@mekicha
Last active March 2, 2018 08:06
Show Gist options
  • Select an option

  • Save mekicha/8abfcfbea403ade56be5caf50fb68987 to your computer and use it in GitHub Desktop.

Select an option

Save mekicha/8abfcfbea403ade56be5caf50fb68987 to your computer and use it in GitHub Desktop.

Install pyenv

pyenv is similar to nvm in the Nodejs community. It allows to install, manage, and switch between multiple Python versions.

curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash

And add these three lines to .bash_profile or .bashrc.

  eval "$(pyenv init -)"
  eval "$(pyenv virtualenv-init -)"

In my own case, I created a .bash_profile file and added them.

Install pipenv

pipenv is the python dev workflow for humans, according to the creator Keneith Reiz. He's the guy behind such great projects like Requests, Maya , The Hitchhiker's guide to Python among other projects.

Okay, to install: The doc features a few different ways to get pipenv on to your system.

This is the one I used: pip install --user pipenv

I also had to add the user base’s binary directory to my PATH variable as also mentioned in the doc.

I ran python -m site --user-base to find my user base directory. It was /home/emeka/.local. Then I added ~/.local/bin to my PATH permanently by appending export PATH=$PATH:~/.local/bin to my .bash_profile file. Finally, I updated my PATH without having to close the terminal by running source ~/.bash_profile.

Everything worked as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment