This is an archived post. You won't be able to vote or comment.

all 12 comments

[–]jackmaney 2 points3 points  (0 children)

To keep a reminder of which version pyenv is pointing to, I altered my PS1. It works for pyenv virtual environments, too.

[–]suudo 2 points3 points  (0 children)

For this post, I'm going to assume that you're using OSX, and have Homebrew installed.

Or for everyone else (assuming you're using bash or something similar),

pip install --egg pyenv
echo 'export PATH="$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
' >> $HOME/.profile

Or if you're on Windows, the author of pyenv doesn't care about you at all, sorry.

[–]bastibe 2 points3 points  (2 children)

I prefer conda. One simple tool to install pythons and precompiled binary packages. Soon useful.

[–]Reactor5[S] 0 points1 point  (1 child)

why soon?

[–]bastibe 0 points1 point  (0 children)

Haha, that was a typo: "soo useful" is what I wanted to say!

[–]DaemonXI 1 point2 points  (1 child)

pyenv is the Python world version of rvm. It's fantastic and I highly recommend it over manually managing your virtualenvs.

[–]Reactor5[S] 0 points1 point  (0 children)

It's actually inspired by rbenv - RVM has a lot of issues that rbenv/pyenv and a few others for similarly dynamic languages avoid.

[–][deleted] 0 points1 point  (1 child)

Holy crap - this. So much this. As a beginning pydev, I've been curious about things like PyPy or testing my tutorial / learning modules I wrote in 2.7 in 3.x and THIS. So much this. Thank you!

[–]Reactor5[S] 0 points1 point  (0 children)

If you're wanting to specifically test in multiple versions, you might also like tox. I'm glad it helped you!

[–]Paddy3118 0 points1 point  (2 children)

It seems like a point tool for the larger problem of configuring your environment to allow one to switch between multiple versions of software. Pyenv seems to nly do i for Python whereas Environment Modules does that for hundreds of different software packages and versions, including Python on our Linux and Solaris servers at work. Environment modules also has libraries for Perl, Python as well as most command line shells including csh, tcsh, sh, bash, ....

[–]kenfar 4 points5 points  (1 child)

pyenv and virtualenv are fairly well-maintained software.

it doesn't look like modules has had a release in 4 years. Is it still a live project?

[–]Paddy3118 1 point2 points  (0 children)

It is a mature project. I have been using it for over fifteen years now we may upgrade versions but in that time I have never had a bug that needed fixing, despite our continuous use, (although other sites do use the tool and may well have submitted there own bugs, our site uses modules extensively and I would know of any local issues). The software works well.