I'am trying to install pandas using pip install pandas and I get the following error

Exception: Cython-generated file 'pandas/io/sas/sas.c' not found. Cython is required to compile pandas from a development branch. Please install Cython or download a release package of pandas.

Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-bDbkpJ/pandas/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-J1gUG5/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-install-bDbkpJ/pandas/

Further I tried with sudo apt-get install python-pandas , which installed the pandas packages.

  • Try installing it with sudo first. If you are installing in python3, use pip3. And to use any specific version, you can use a command like sudo pip3 install pandas==1.0.3. – theashwanisingla Mar 20 '20 at 7:59
  • "... sudo apt-get ... which installed the pandas packages." So what's the problem? Doesn't it work? – Ingo Mar 20 '20 at 22:47
  • try pip3 install pandas – Karthik MB Apr 23 '20 at 17:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.