skip to Main Content

At first, I was trying to install evo (a package for SLAM research) from source and I encountered an error:
ModuleNotFoundError: No module named ‘numpy’

So then I tried to install numpy using pip install numpy. However I encountered another error:
SystemError: Cannot compile ‘Python.h’. Perhaps you need to install python-dev|python-devel.

Finally, I tried to install python-dev using sudo apt-get install python-dev, and I found out it has been installed already. So I don’t know where the problem is.

My default python version is 3.8.16

Could anyone help me with this issue?

2

Answers


  1. maybe conda could install it?

    conda install -c anaconda numpy
    

    it isn’t generally ideal to mix conda and pip, but it should still install numpy successfully.

    Login or Signup to reply.
  2. Run pip3 install --upgrade pip and try again.

    If it doesn’t work, try sudo apt-get install pypy-dev instead of python-dev.

    You can also try sudo apt-get install python3-numpy

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search