(Feb-26-2018, 03:33 AM)Skaperen Wrote: if i install all these python versions ... 2.4,2.5,2.6,2.7,3.3,3.4,3.5,3.6 how do i keep them from getting mixed up?I have told you about pyenv before,but you to not always listen
mint@mint ~ $ pyenv install --list Available versions: 2.1.3 2.2.3 2.3.7 2.4 2.4.1 2.4.2 2.4.3 2.4.4 2.4.5 2.4.6 2.5 .... to 3.6.4 and 3.8 devInstall 2.4 and set is as global system version.
mint@mint ~ $ pyenv install 2.4 Downloading Python-2.4.tgz... -> https://www.python.org/ftp/python/2.4/Python-2.4.tgz Installing Python-2.4... Installed Python-2.4 to /home/mint/.pyenv/versions/2.4 Downloading pip-1.1.tar.gz... -> https://pypi.python.org/packages/source/p/pip/pip-1.1.tar.gz Installing pip-1.1... Installed pip-1.1 to /home/mint/.pyenv/versions/2.4 mint@mint ~ $ pyenv global 2.4 mint@mint ~ $ which python /home/mint/.pyenv/shims/python mint@mint ~ $ python -V Python 2.4 mint@mint ~ $ pip --version pip 1.1 from /home/mint/.pyenv/versions/2.4/lib/python2.4/site-packages/pip-1.1-py2.4.egg (python 2.4Back to early days with pip 1.1
So now is 2.4 the main system version.
Test a feature that was new in 2.5
with open
and get syntax error in 2.4.mint@mint ~ $ python Python 2.4 (#1, Feb 26 2018, 14:34:49) [GCC 5.4.0 20160609] on linux4 Type "help", "copyright", "credits" or "license" for more information. >>> with open('foo') as f: File "<stdin>", line 1 with open('foo') as f: ^ SyntaxError: invalid syntax >>>
Skaperen Wrote:i am curious if anyone has tried running various versions of Python different than what is normally available to you on the system you run Python on.It's part of my normal workflow,example always when doing web-development i will have it virtual environment.
pipenv is what i use most it's greeat,in 3.6 so in also virtual environment build in trough venv
Also sometime VirtualBox, Docker, Anaconda, DigitalOcean, Cloud9.