Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Building NumPy 1.7.1 on Ubuntu

I'm a newby in both Ubuntu and Python, so please bear with me. I need some functionality included in NumPy 1.7.1. My Ubuntu 12.04 LTE, however, comes with NumPy 1.6.x, and sudo apt-get update doesn't get it any higher.

So I went to sourceforge and followed the instructions given here in userguide.pdf. I have made up to:

python setup.py build --fcompiler=gnu95

, i.e. I have (from what it seems like, successfully) built NumPy 1.7.1. The question is: what do I do now? Should I move some directories somewhere, if yes, where? The userguide.pdf just stops here and doesn't give any more information.

This is the first time, I'm ever trying this, so please be kind ;-).

like image 840
seb Avatar asked Apr 18 '13 15:04

seb


People also ask

Does Python 3.10 have NumPy?

NumPy 1.22. 0 is a big release featuring the work of 153 contributors spread over 609 pull requests. The Python versions supported by this release are 3.8-3.10.


1 Answers

When I install some python package from source I usually do

python setup.py build [options]
python setup.py install --user

The last step install the package in ~/.local/lib/pythonX.X/site-packages/. This directory is scanned before the system directories (so this version is used). Furthermore you don't need sudo and you don't risk to mess up with what apt installs

like image 173
Francesco Montesano Avatar answered Sep 23 '22 23:09

Francesco Montesano