Skip to content

Can't Seem to install pandas in python #33035

@kartikdutt18

Description

@kartikdutt18

I tried running

sudo pip install pandas

Problem description

Tried Installing pandas for python 2.7 . Can't seem to figure it out. Checked similar issues, but they didn't seem to help me.

Numpy version : 1.16.6 (tried other versions as well)

Expected Output

Pandas installed successfully.

####Got this output instead:

DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Defaulting to user installation because normal site-packages is not writeable
Collecting pandas
  Using cached pandas-1.0.3.tar.gz (5.0 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  ERROR: Command errored out with exit status 1:
   command: /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python /Users/kd/Library/Python/2.7/lib/python/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /var/folders/30/00757twx74l3jppj5c4nq7380000gn/T/tmpUhhGpr
       cwd: /private/var/folders/30/00757twx74l3jppj5c4nq7380000gn/T/pip-install-6SkeqV/pandas
  Complete output (19 lines):
  Traceback (most recent call last):
    File "/Users/kd/Library/Python/2.7/lib/python/site-packages/pip/_vendor/pep517/_in_process.py", line 257, in <module>
      main()
    File "/Users/kd/Library/Python/2.7/lib/python/site-packages/pip/_vendor/pep517/_in_process.py", line 240, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/Users/kd/Library/Python/2.7/lib/python/site-packages/pip/_vendor/pep517/_in_process.py", line 91, in get_requires_for_build_wheel
      return hook(config_settings)
    File "/private/var/folders/30/00757twx74l3jppj5c4nq7380000gn/T/pip-build-env-IK81LY/overlay/lib/python2.7/site-packages/setuptools/build_meta.py", line 146, in get_requires_for_build_wheel
      return self._get_build_requires(config_settings, requirements=['wheel'])
    File "/private/var/folders/30/00757twx74l3jppj5c4nq7380000gn/T/pip-build-env-IK81LY/overlay/lib/python2.7/site-packages/setuptools/build_meta.py", line 127, in _get_build_requires
      self.run_setup()
    File "/private/var/folders/30/00757twx74l3jppj5c4nq7380000gn/T/pip-build-env-IK81LY/overlay/lib/python2.7/site-packages/setuptools/build_meta.py", line 243, in run_setup
      self).run_setup(setup_script=setup_script)
    File "/private/var/folders/30/00757twx74l3jppj5c4nq7380000gn/T/pip-build-env-IK81LY/overlay/lib/python2.7/site-packages/setuptools/build_meta.py", line 142, in run_setup
      exec(compile(code, __file__, 'exec'), locals())
    File "setup.py", line 42
      f"numpy >= {min_numpy_ver}",
                                ^
  SyntaxError: invalid syntax
  ----------------------------------------
ERROR: Command errored out with exit status 1: /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python /Users/kd/Library/Python/2.7/lib/python/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /var/folders/30/00757twx74l3jppj5c4nq7380000gn/T/tmpUhhGpr Check the logs for full command output

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions