Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
pypy
pypy
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 582
    • Issues 582
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 12
    • Merge Requests 12
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards

This instance will be upgraded to Heptapod 0.19.0rc2 on 2021-01-18 at 11:00 UTC+1 (a few minutes of downtime)

  • PyPy
  • pypypypy
  • Issues
  • #3293

Closed
Open
Opened Sep 02, 2020 by Nachiket Gokhale@gokhalen

installing numpy for pypy3

I was advised on the numpy mailing list to install numpy for pypy3 to overcome the error at the end of the message. However,

pypy3 -mpip install numpy

gives,

Requirement already satisfied: numpy in /usr/lib/python3/dist-packages (1.17.4)

The error I was getting is

Traceback (most recent call last): File "/usr/lib/python3/dist-packages/numpy/core/init.py", line 17, in from . import multiarray File "/usr/lib/python3/dist-packages/numpy/core/multiarray.py", line 14, in from . import overrides File "/usr/lib/python3/dist-packages/numpy/core/overrides.py", line 7, in from numpy.core._multiarray_umath import ( ModuleNotFoundError: No module named 'numpy.core._multiarray_umath'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "testpypy3.py", line 1, in import numpy as np File "/usr/lib/python3/dist-packages/numpy/init.py", line 142, in from . import core File "/usr/lib/python3/dist-packages/numpy/core/init.py", line 47, in raise ImportError(msg) ImportError:

IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

Importing the numpy c-extensions failed.

Try uninstalling and reinstalling numpy.

If you have already done that, then:

Check that you expected to use Python3.6 from "/usr/bin/pypy3", and that you have no directories in your PATH or PYTHONPATH that can interfere with the Python and numpy version "1.17.4" you're trying to use. If (1) looks fine, you can open a new issue at https://github.com/numpy/numpy/issues. Please include details on: how you installed Python how you installed numpy your operating system whether or not you have multiple versions of Python installed if you built from source, your compiler versions and ideally a build log If you're working with a numpy git repository, try git clean -xdf (removes all files not under version control) and rebuild numpy.

Note: this error has many possible causes, so please don't comment on an existing issue about this - open a new one instead.

Original error was: No module named 'numpy.core._multiarray_umath'

Numpy/Python version information: Using system python3.8: 1.17.4 3.8.2 (default, Jul 16 2020, 14:00:26) [GCC 9.3.0] Using pypy3: import sys; print(sys.version) 3.6.9 (7.3.1+dfsg-4, Apr 22 2020, 05:15:29) [PyPy 7.3.1 with GCC 9.3.0]

Also, for system Python output of print(numpy.file) is /usr/lib/python3/dist-packages/numpy/init.py which is the same numpy that pypy3 is finding.

To upload designs, you'll need to enable LFS and have admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: pypy/pypy#3293