Hacker News new | past | comments | ask | show | jobs | submit | mmsme's comments login

Pyenv looks great! Sad I didn't know about this sooner, though I do have the luxury of using mostly one version of Python and have only confused it for the system Python once or twice.


Pyenv is great. On our Macs we've had zero issues installing older, specific versions of Python, every time. Highly recommended. (Getting it working properly with zsh was a bit frustrating, but that's my own fault.)


Do you know if it's easy to start using pyenv with existing projects, or should I wait until my next de novo project?


It’s pretty easy if you have a set of requirements handy and have `pyenv-virtualenv`:

    $ pyenv virtualenv 3.6 some-name
    $ echo some-name > /path/to/project/.python-version
    $ cd /path/to/project
    $ pip install -r requirements.txt
That’s it.


Curious here... why would you use it over just venv (assuming python3)?


Pyenv is a different thing than venv, it manages versions of Python itself rather than isolating dependencies for projects. You're probably confusing it with pyvenv, which is Python 3.4+'s command-line interface for managing venv-compatible environments.


pyenv is really great. The ability to switch environments merely by cd'ing into the project directory is a life saver.


This is moving a bit tangentially to the topic at hand but I love pyenv (and rbenv) for the same reason.

My question is now that I'm having to do more PHP development again: is there anything like this for PHP? Last time I looked it seems there were a couple attempts (including phpenv[0]) but that they never caught on or were abandoned.

Is there something like this for PHP? If not, any idea why not? Is phpenv so stable that it hasn't need to be touched in 5 years?

[0] https://github.com/phpenv/phpenv


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: