9

This question is related to Using Numpy with pypy

I tried to use

pip install git+https://bitbucket.org/pypy/numpy.git

The system (Fedora release 24 (Twenty Four)) said

git: 'submodule' is not a git command. See 'git --help'. Command "git submodule update --init --recursive -q" failed with error code 1 in /tmp/pip-LD8rrP-build

Still it seems that numpy is not compatible with pypy.

Is there any solution for this problem? P.S. I managed to setup it on ubuntu, but not fedora..

Additional information:

Fedora release 24 (Twenty Four)

pip 9.0.1 from /usr/lib/python2.7/site-packages (python 2.7)

git version 2.7.4

Rodriguez
  • 239
  • 1
  • 3
  • 7
  • 1
    Diagnosing your problem with the information might be a bit difficult. You might want to add the version of pip, git, and your OS to the question for some better help. Your error message makes it sound like an outdated or minimal version of git, I'd try updating that, and if that doesn't work add some additional debug. – SuperTetelman Mar 16 '17 at 01:05
  • @SuperTetelman Thank you for your comment. The information of OS, pip, and git has been added. – Rodriguez Mar 16 '17 at 01:13

2 Answers2

10

You're referring to a 6-years-old post. The current, preferred way to install numpy on PyPy is simply pip install numpy. (This assumes pip refers to the PyPy version, like it does in a virtualenv made with PyPy. The link below describes an alternate way if you don't have virtualenv.)

For more details: http://pypy.org/download.html#installing-numpy

Armin Rigo
  • 12,048
  • 37
  • 48
  • 1
    I have tried this command. However, I received the following message >Requirement already satisfied: numpy in /usr/lib64/python2.7/site-packages – Rodriguez Mar 16 '17 at 03:35
  • That means you were using CPython's pip. You need to use pypy's pip. The easiest way to do that is to create a virtualenv for pypy and activate it. Then, running `pip install numpy` should just work. – Ronan Lamy Mar 16 '17 at 19:55
  • Updated the answer as per Ronan's suggestion. But also, the paragraph at the link I posted gives more details that you should read and follow. – Armin Rigo Mar 17 '17 at 18:21
-1

I stumbled over this when I started using pypy with pyenv. I'm used to python

# Set the Python version:
$ echo "pypy3.6-7.3.0" > ".python-version"

# Check if it worked:
$ python --version
Python 3.6.9 (1608da62bfc7, Dec 23 2019, 10:50:04)
[PyPy 7.3.0 with GCC 7.3.1 20180303 (Red Hat 7.3.1-5)]

$ pip --version
pyenv: pip: command not found

After that, I was pretty confused and thought that maybe pip does not exist / work for pypy.

The solution was simply:

$ python -m pip install numpy
Martin Thoma
  • 124,992
  • 159
  • 614
  • 958