You are not logged in.
What is the best way to install the latest version of python with the latest versions of numpy, scipy, pandas, etc. before it shows up in the official package repo?
- Is there a good (standard?) procedure to set up a separate development environment with the latest python version and modules?
- Should I use a PKGBUILD for everything, or pip install?
Last edited by louic (2018-07-14 20:00:41)
Offline
Hi,
Current Python 3.x version in the official packages is 3.6.6. Unless you really need Python 3.7.0, I'll stay with this version until 3.7 is stable enough for Arch. I usually install python-virtualenv on my system and run
$ virtualenv env_name
$ source env_name/bin/activateOnce on my new environment install latest versions of numpy, scipy, tensorflow, etc using pip without touching my default python install.
(python2-virtualenv is also helpful when I wanna setup a Python 2.7 environment).
tldr: I think the best way to use python on your system is via pip install on new environments so as not to alter the default installation. The only package you'll need for this is python-virtualenv
Last edited by gugah (2018-07-14 17:29:33)
"The problem with quotes on the Internet is that it is hard to verify their authenticity." ~ Abraham Lincoln
Offline
Ok, thanks for the answer, marking as solved.
I will see if I can set that all up and make it work with jupyter.
Why python 3.7? Mostly because I want to play with the new dataclasses. Other than that, I often find that I need sklearn or pandas features that are not yet available in the stable version.
Offline
I usually install python-virtualenv on my system and run
$ virtualenv env_name $ source env_name/bin/activate
I don't understand why people continue to use and suggest 3rd party virtualenv when that functionality has been built in to python since 3.3. Just use native python:
$ python -m venv env_name
$ source env_name/bin/activateOffline
My understanding is that you can't actually install a virtual environment with a version of python that isn't installed on your system already. I am unable to actually make any of the solutions in this thread work to get python 3.7 in a virtual environment.
Offline
The python37 in the AUR looks like it might work side by side with the default python package. Then create a virtual env with the "python3.7" binary.
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |
Offline
We have no reason to think python 3.7 is not stable enough, the problem is with other software that depends on it. ![]()
Currently, Arch Linux is rebuilding the entire python ecosystem with python 3.7, but some packages require more than a simple rebuild. The current build list is tracked at https://rebuilds.foutrelis.com/ and failing packages at https://www.archlinux.org/todo/python-3 … -failures/ while we sort things out.
Once we've successfully rebuilt everything it will leave the staging repos and move to testing.
You can hasten the speed of this occurring, by helping to debug and patch any issues.
Upstream bug reports, or, even better, upstream pull requests, would be great!
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
So this is what I did. It seems to work great (at least for now).
Python has its own mechanism for a slotted install as described in the readme file that comes with the download.
Let me know if you have any comments, eg. if there is a better way to do this.
# install python 3.7
wget https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tar.xz
tar xf Python-3.7.0.tar.xz
cd Python-3.7.0
./configure
make profile-opt
sudo make altinstall # installs python in /usr/local/bin/python3.7
# install jupyter notebook kernel
sudo cp -r /usr/share/jupyter/kernels/python3 /usr/share/jupyter/kernels/python3.7
vim /usr/share/jupyter/kernels/python3.7/kernel.json # change directory of python installation and display_name
# create and activate new environment
python3.7 -m venv env_name
source env_name/bin/activateInstead of using a virtual environment, pip3.7 can be used to install system-wide packages for this python version.
These then become available to the jupyter kernel as installed above. Alternatively, it is possible to create a jupyter kernel of a virtual environment.
Last edited by louic (2018-07-15 12:18:36)
Offline