How can I install multiple versions of Python on latest OS X and use them in parallel?

后端 未结 5 1440
暖寄归人
暖寄归人 2020-12-05 06:59

I want to run tests with multiple Python versions on OS X 10.11, including:

  • Python 2.6 - ?!
  • Python 2.7 - default - solved
  • Python 3.4 - ?!
5条回答
  •  孤城傲影
    2020-12-05 07:22

    This blog post suggests using pyenv with the desired detox. The basic setup with brew requires:

    brew install pyenv pyenv-virtualenv pyenv-virtualenvwrapper
    

    Then installing the desired Python versions with pyenv install [version], rather than installing Python using brew. You can check the available versions using pyenv versions.

    Finally, pip install detox will ensure you've got tox and detox installed. Then you should be able to specify the desired testing versions in your tox.ini.

提交回复
热议问题