Installing numpy and pandas for PyPy3.5 v5.10.1

Issue #2795 new
Garland Huang
created an issue

Hi all,

I'm trying to port my code to pypy and I'm experiencing issues with installing numpy and pandas. I'm running Ubuntu 14.04.

For numpy I'm following and have tried all the options but they all fail. In particular when I run:

./pypy-xxx/bin/pip install cython numpy

I get the error:

Command "/usr/local/bin/pypy3 -u -c "import setuptools, tokenize;file='/tmp/pip-build-m_dwzb9u/numpy/';f=getattr(tokenize, 'open', open)(file);'\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-xpvk_cea-record/install-record.txt --single-version-externally-managed --compile" failed with error code -9 in /tmp/pip-build-m_dwzb9u/numpy/

Similarly, when I try to install pandas with:

./pypy-xxx/bin/pip install pandas

I get the error:

Command "python egg_info" failed with error code 1 in /tmp/pip-build-efuao0xv/pandas/

I've tried some of the regular fixes such as updating setuptools but it hasn't resolved the issues and I'm still unable to install any of the modules. Any help would be great. Thanks.

Comments (16)

  1. mattip
    • What PyPy are you running? pypy --version
    • What pip are you running? pip -V
    • There are verbosity flags to pip, what is the actual error you are getting?
  2. Garland Huang reporter

    Hi mattip,

    • The PyPy I'm running is: Python 3.5.3 (3f6eaa010fce, Jan 11 2018, 04:44:35)[PyPy 5.10.1 with GCC 6.2.0 20160901]
    • The pip I'm running is: pip 9.0.3 from /home/ubuntu/pypy3-v5.10.1-linux64/site-packages (python 3.5)
    • I'm not sure what you mean exactly but I have attached the error with the original post for when I try to install numpy
  3. mattip

    Your pypy binary is /usr/local/bin/pypy3, but your setup seems to be using the python libaries found in /home/ubuntu/pypy3-v5.10.1-linux64/lib-python, and you say you are using pip from /home/ubuntu/pypy3-v5.10.1-linux64/site-packages. So why isn't your pypy binary located in /home/ubuntu/pypy3-v5.10.1-linux64/bin ? It seems you have a local pypy installation, but also one from your package manager, and the one from the package manager appears first on your $PATH? Do you have environment variables like $PYTHONTPATH or others (see the output of python --help for a complete list) set?

  4. Garland Huang reporter

    I believe I symmlinked the pypy3 from /usr/local/bin/pypy3 to /home/Ubuntu/pypy3-v5.10.1-linux64/bin/pypy3, but when I'm installing with pip I'm directly typing the path to pip i.e. sudo /home/Ubuntu/pypy3-v5.10.1-linux64/bin/pip3 install numpy

  5. mattip

    Maybe just start over? It seems you have created a web of interconnections that it is hard to disentangle. I would not recommend using sudo together with pip, sudo only should be used with apt install, see the many stack overflow answers to sudo, pip and safe.

  6. mattip

    Once again, the install step fails. Did you do all of the previous steps as a normal user, no sudo involved? The directory /opt/pypy3-v5.10.1-linux64 and all subdirectories should be writable by your normal user

  7. Simon Schenker

    Same problem on ubuntu 16.04 with pypy version Python 3.5.3 (fdd60ed87e941677e8ea11acf9f1819466521bf2, Apr 27 2018, 15:39:57) [PyPy 6.0.0 with GCC 7.2.0] pip version 18.1 all done on a completely freshly provisioned ubuntu server on first login from a virtual environment created with pypy and using the command

    pip install pandas

    I get the error:

    Command "python egg_info" failed with error code 1 in /tmp/pip-install-ire09liq/pandas/
  8. Log in to comment