8/13/2019 Install Python Ubuntu
Install the latest Python in Ubuntu – How to install Python 3.7 (using PPA) in Ubuntu Linux. Terminal commands to install Python 3.7.x using PPA in Ubuntu and Linux Mint and other Ubuntu Derivatives. Install Python 3.7. Run the following commands in terminal to install Python 3.7 using PPA in Ubuntu and Linux Mint and other Ubuntu Derivatives. Third-Party Python Modules Python modules in the official Ubuntu repositories are packaged to work with the Python interpreters from the official repositories. Accordingly, they generally won't work with the Python interpreters from this PPA.
I would like to avoid backports, they always seem to mess up my packages.
So I was thinking tools like conda / virtualenv / maybe even docker can help. What's the most simple / cleanest way to work with python 3.7 on my system?
bananasplitbananasplit
3 Answers
This should get you up and running with Python 3.7 on Ubuntu 16.04
Then you would just call Python like so:
This is a screenshot of multiple versions of Python co-existing in a docker container and how they can be distinguished:
Pip should have been installed with this installation as well. To install packages use this format:
You may wish to wait a couple of weeks/months until Python 3.7 achieves more adoption for library support. Seems like common libraries such as Pillow, Pendulum, Pushbullet, PyPDF2, and Fuzzywuzzy don't yet have compatibility available through pip install and similarly compatible wheels are not yet ready.
Sn3akyP3t3Sn3akyP3t3
53011 gold badge55 silver badges1111 bronze badges
I would not recommend manually fiddling around with source code installations and paths. Use
pyenv and save yourself the trouble.
All you have to do is:
For example, to install 3.7, check which versions are available:
Then run:
Now, you can choose your Python version:
This switches your
python to point to 3.7.1. If you want the system python, run:
To check which Python versions are available, run
pyenv versions .
slhckslhck
You can download the source code from www.python.org, compile and build it from source, and then either:
1) Prepend the path to the python executables to
PATH and the libraries to LD_LIBRARY_PATH .
2) Do what I did and compile and build it from source and make symlinks to the executables in
/usr/bin . You can call it python37 to distinguish it from the python 3.5 which is already installed.
The first method will use it in your environment by default whereas with the second on, you'll have to specify it with the command you used for the symlink. You might want to use the second method first before you make it the default as
python 3.7 is still in development.
Nasir RileyNasir Riley
Not the answer you're looking for? Browse other questions tagged pythonubuntu-16.04 or ask your own question.Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |