Gentoo Archives: gentoo-user

From: Franz Fellner <alpine.art.de@×××××.com>
To: Gentoo <gentoo-user@l.g.o>
Subject: Re: [gentoo-user] Problems with numpy and python 3x
Date: Sun, 15 Dec 2019 06:21:31
Message-Id: CADtyuE7LZ6ZdSAtMyOhQ3R3dvBctVw6G=M1kpLq+ENuXevwpMg@mail.gmail.com
In Reply to: [gentoo-user] Problems with numpy and python 3x by tuxic@posteo.de
1 It can't have been "just an update" because python-3.7 is your default
2 python, so you have selected it after the update.
3 Alternatively: Your numpy doesn't work for a longer time and you just
4 didn't realize until now.
5
6 numpy was built for python-3.6 and not for python3.7. Which is perfectly
7 fine as it is gentoos default -
8 base/make.defaults:PYTHON_TARGETS="python2_7 python3_6".
9 So why did you install python-3.7 and set it as default although your
10 system isn't prepared for it?
11
12 Am So., 15. Dez. 2019 um 08:07 Uhr schrieb <tuxic@××××××.de>:
13
14 > Hi,
15 >
16 > after the update this morning, "numpy" wasn't found anumore by python.
17 >
18 > Asking python, it gave me:
19 > Python 3.7.5 (default, Dec 15 2019, 05:23:14)
20 > [GCC 9.2.0] on linux
21 > Type "help", "copyright", "credits" or "license" for more information.
22 > >>> import numpy
23 > Traceback (most recent call last):
24 > File "<stdin>", line 1, in <module>
25 > ModuleNotFoundError: No module named 'numpy'
26 > >>>
27 >
28 > eix numpy gave me:
29 >
30 >
31 > [U] dev-python/numpy
32 > Available versions: 1.14.5^t (~)1.15.4^t (~)1.16.1^t (~)1.16.5^t
33 > (~)1.17.4^t {doc lapack test PYTHON_TARGETS="python2_7 python3_5 python3_6
34 > python3_7 python3_8"}
35 > Installed versions: 1.16.5^t(06:31:45 AM 12/15/2019)(lapack -doc
36 > -test PYTHON_TARGETS="python2_7 python3_6 -python3_5 -python3_7")
37 > Homepage: https://www.numpy.org
38 > Description: Fast array and numerical python library
39 >
40 >
41 > emergeing it with
42 >
43 > emerge --selective=n dev-python/numpy
44 >
45 > results in the same output of eix.
46 >
47 > Interestingly a post on stackexchange related to the problem of "numpy
48 > not found" states (source:
49 > https://stackoverflow.com/questions/7818811/import-error-no-module-named-numpy_
50 > )
51 >
52 > "Support for Python 3 was added in NumPy version 1.5.0, so to begin with,
53 > you must download/install a newer version of NumPy."
54 >
55 > and links to this address:
56 > https://sourceforge.net/projects/numpy/files//NumPy/1.5.0/NOTES.txt/view
57 > which states the same.
58 >
59 > A version of numpy >= 1.5 is not offered by portage repo it seems, but
60 > python 3.x is.
61 >
62 > pip3 says, everything is fine, numpy is installed:
63 >
64 > pip3 install --user numpy
65 > Requirement already satisfied: numpy in /usr/lib64/python3.6/site-packages
66 > (1.16.5)
67 >
68 > But this does not fit the installed python version according to the
69 > linked sources above.
70 >
71 > How can I solve this problem?
72 >
73 > (I am on "unstable"...)
74 >
75 > Cheers!
76 > mcc
77 >
78 >
79 >
80 >