Pyenv: Please add cookbook for howto use Pyenv and Supervisor

Created on 8 Oct 2017  路  3Comments  路  Source: pyenv/pyenv

I desire to use pyenv and supervisor together ( for my daemons ), yet I can't find a good cookbook for how to use them together. I think supervisor is often-used, thus is a very reasonable candidate for a quick two-line howto. I'd do the pull request myself except I don't know how to do it

question

Most helpful comment

Please don't close this., unless you are saying you aren't going to do this.

Using the direct path is bad. It doesn't do all the shimming right, and encodes the version of python in the supervisord conf file.

Using virtualenv is not the answer because it's not pyenv.

I believe there would be two actual ways:

  • Create a separate bash script that includes the -init and the command
  • Use some kind of eval (pyenv -init) && yourcommand

Given that python is often used for system daemons, I request adding the simple cookbook to the documentation.

All 3 comments

I think you have two ways to work with pyenv:

  1. Working with interpreter path directly: call your python with /path/to/.pyenv/versions/version_you_want/bin/python
  2. Working with Virtualenv: nothing new here.

Please don't close this., unless you are saying you aren't going to do this.

Using the direct path is bad. It doesn't do all the shimming right, and encodes the version of python in the supervisord conf file.

Using virtualenv is not the answer because it's not pyenv.

I believe there would be two actual ways:

  • Create a separate bash script that includes the -init and the command
  • Use some kind of eval (pyenv -init) && yourcommand

Given that python is often used for system daemons, I request adding the simple cookbook to the documentation.

This isn鈥檛 pyenv issue at all. Write some blog post by yourself.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

earlchew picture earlchew  路  3Comments

marcosfede picture marcosfede  路  3Comments

bersbersbers picture bersbersbers  路  3Comments

tommyjcarpenter picture tommyjcarpenter  路  3Comments

ydaniju picture ydaniju  路  3Comments