You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Change Python version in current terminal (shell), in current directory (local, creates .python-local file) or globally (global):
pyenv shell 3.4.5
pyenv local 3.4.5
pyenv global 3.4.5 <-- using global is recommended
Issue with sudo
It doesn't work with sudo. But it shouldn't matter, because when installing python package you don't need to use sudo, as Python is installed in ~/.pyenv and doesn't require root privileges.
Update pyenv
You need to update pyenv so that you can install new Python versions available. When executing pyenv install --list I didn't see latest Py 3.6 rc1. I had to run pyenv update to be able to install it.
Homebrew
Mac notes for Homebrew:
Install GUI toolkits for the Homebrew Python: brew install python, brew install wxpython, brew install pygtk, brew install gtk+3 pygobject3, etc.
To install GUI toolkits for Homebrew's Python 3 type: brew install python3, brew install gtk+3 pygobject3 --with-python3.
To install PySide for Qt4 type: install Qt 4.8.5 dmg and type sudo pip install pyside==1.2.2. If there are errors when importing library add pyside directory to DYLD_LIBRARY_PATH or run the pyside postinstall script manually (find it on the web).
The text was updated successfully, but these errors were encountered:
cztomczak
changed the title
Using pyenv to manage multiple Python versions on Ubuntu
How to use pyenv to manage multiple Python versions on Ubuntu
Sep 17, 2016
cztomczak
changed the title
How to use pyenv to manage multiple Python versions on Ubuntu
How to use pyenv to manage multiple Python versions on Ubuntu/Mac
Mar 2, 2017
Tested with Ubuntu 14.04 and Mac 10.9.
pyenv: https://github.com/yyuu/pyenv
Install on Linux: https://github.com/yyuu/pyenv-installer
Don't forget dependencies on Linux: https://github.com/pyenv/pyenv/wiki/common-build-problems
Install on Mac with Homebrew: https://github.com/yyuu/pyenv#homebrew-on-mac-os-x
Add pyenv to ~/.bashrc . Do not add the
eval "$(pyenv virtualenv-init -)"
line otherwise pyenv is broken then..bashrc for Linux:
.bash_profile for Mac:
Python must be built as shared library on Linux and as framework on Mac
Python must be built as shared library on Linux, and as framework on Mac. See this explanation by Robin Dunn: wxWidgets/Phoenix#288 (comment)
Build options explained on pyenv wiki page:
https://github.com/pyenv/pyenv/wiki#how-to-build-cpython-with-framework-support-on-os-x
https://github.com/pyenv/pyenv/wiki#how-to-build-cpython-with---enable-shared
Continued
Install multiple Pythons. Before proceeding install required packages listed here: https://github.com/yyuu/pyenv/wiki/Common-build-problems
Change Python version in current terminal (shell), in current directory (local, creates .python-local file) or globally (global):
Issue with
sudo
It doesn't work with sudo. But it shouldn't matter, because when installing python package you don't need to use sudo, as Python is installed in ~/.pyenv and doesn't require root privileges.
Update pyenv
You need to update pyenv so that you can install new Python versions available. When executing
pyenv install --list
I didn't see latest Py 3.6 rc1. I had to runpyenv update
to be able to install it.Homebrew
Mac notes for Homebrew:
brew install python
,brew install wxpython
,brew install pygtk
,brew install gtk+3 pygobject3
, etc.brew install python3
,brew install gtk+3 pygobject3 --with-python3
.sudo pip install pyside==1.2.2
. If there are errors when importing library add pyside directory to DYLD_LIBRARY_PATH or run the pyside postinstall script manually (find it on the web).The text was updated successfully, but these errors were encountered: