You are not logged in.
Hi
When I try to "import numpy" on Python 3 I get this error:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python3.4/site-packages/numpy/__init__.py", line 170, in <module>
from . import add_newdocs
File "/usr/lib/python3.4/site-packages/numpy/add_newdocs.py", line 13, in <module>
from numpy.lib import add_newdoc
File "/usr/lib/python3.4/site-packages/numpy/lib/__init__.py", line 8, in <module>
from .type_check import *
File "/usr/lib/python3.4/site-packages/numpy/lib/type_check.py", line 11, in <module>
import numpy.core.numeric as _nx
File "/usr/lib/python3.4/site-packages/numpy/core/__init__.py", line 9, in <module>
from . import numerictypes as nt
File "/usr/lib/python3.4/site-packages/numpy/core/numerictypes.py", line 968, in <module>
_register_types()
File "/usr/lib/python3.4/site-packages/numpy/core/numerictypes.py", line 965, in _register_types
numbers.Integral.register(integer)
AttributeError: 'module' object has no attribute 'Integral'
Is this a packaging issue or something?
Python is version 3.4.2-2 on x86_64 Arch Linux.
Last edited by Tomin (2015-02-21 20:39:56)
Offline
A quick test on my system seems to be working. Try reinstalling python-numpy.
Offline
I tried to remove python-numpy and python-scipy and then installed them with pip but even after that it gave me the same errors. Then I removed them (pip uninstall) and installed the packages with pacman but I still get the same error. I there some sort of cache I should clear or something?
Edit: Oh, and the python-numpy and python-scipy package versions are 1.9.1-1 and 0.15.1-1 respectively.
Last edited by Tomin (2015-02-21 11:14:09)
Offline
Just download the packages from the mirror and install them using pacman -U. If you really want to clear a cache, take a look in /var/cache/pacman/pkg. Clear the python-numpy and python-scipy packages and a reinstall should download the packages again.
Offline
I meant some Python specific cache.
I tried to download the packages from mirror and installed them with pacman -U but no. No change, I still get the same error if I try to import numpy. I downloaded them with browser from these links:
https://www.archlinux.org/packages/extr … /download/
https://www.archlinux.org/packages/comm … /download/
Edit: The files are the same (as they should be):
8d5e3277e3a279c50734181aa766adc9 /var/cache/pacman/pkg/python-numpy-1.9.1-1-x86_64.pkg.tar.xz
8d5e3277e3a279c50734181aa766adc9 /home/tomi/Lataukset/python-numpy-1.9.1-1-x86_64.pkg.tar.xz
f4a15377aa451898465db904ebbd5e64 /var/cache/pacman/pkg/python-scipy-0.15.1-1-x86_64.pkg.tar.xz
f4a15377aa451898465db904ebbd5e64 /home/tomi/Lataukset/python-scipy-0.15.1-1-x86_64.pkg.tar.xz
Edit: And I solved it! I always tested it in a certain directory. The directory included a file named numbers.py which caused the problem. Anyway, thanks to runical for trying to solve this.
Last edited by Tomin (2015-02-21 20:39:44)
Offline