0

I try to install Pandas library uisg pip3 and get the following errors:

ERROR: Command errored out with exit status 1: command: /Users/chaklader/PycharmProjects/OptimizingPublicTransport/producers/venv/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/k4/q3psbyqj0l79b8ch527mr36h0000gp/T/pip-install-brdwlohn/pandas_7fb71e5a5c944478a4b18f60d65daa50/setup.py'"'"'; __file__='"'"'/private/var/folders/k4/q3psbyqj0l79b8ch527mr36h0000gp/T/pip-install-brdwlohn/pandas_7fb71e5a5c944478a4b18f60d65daa50/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/k4/q3psbyqj0l79b8ch527mr36h0000gp/T/pip-wheel-1lu27a0t cwd: /private/var/folders/k4/q3psbyqj0l79b8ch527mr36h0000gp/T/pip-install-brdwlohn/pandas_7fb71e5a5c944478a4b18f60d65daa50/ Complete output (938 lines): /usr/local/opt/[email protected]/Frameworks/Python.framework/Versions/3.9/include/python3.9/cpython/unicodeobject.h:551:1: note: 'PyUnicode_FromUnicode' has been explicitly marked deprecated here Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject*) PyUnicode_FromUnicode( ^ /usr/local/opt/[email protected]/Frameworks/Python.framework/Versions/3.9/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED' #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__)) ^ 14 warnings and 4 errors generated. error: command '/usr/bin/clang' failed with exit code 1 ---------------------------------------- ERROR: Failed building wheel for pandas Running setup.py clean for pandas Failed to build pandas Installing collected packages: pandas Attempting uninstall: pandas 

Whats the issue here and how to resolve it?

4
  • ever considered miniconda/anaconda? Commented Jun 29, 2021 at 1:19
  • @LeiYang I am not very familiar with the Python ecosystem. So what I need to do to solve the issue? If you can write an answer, this will be very helpful. Commented Jun 29, 2021 at 3:25
  • added an answer. Commented Jun 29, 2021 at 3:46
  • I installed it inside a virtual environment and the errors come from there. Commented Jun 29, 2021 at 5:29

1 Answer 1

1

My guess is you're using a too high python version, see similar issues 1 2.

You can try python 3.6. You should always upgrade pip before installing packages.

And as you can see in the pip install log, it tries to compile from some C/C++ source, requiring the build tools which are sometimes unavailable.

So I suggest you use anaconda, from wiki:

Anaconda is a distribution of the Python and R programming languages for scientific computing (data science, machine learning applications, large-scale data processing, predictive analytics, etc.), that aims to simplify package management and deployment.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.