-1

I am trying to install pandas using pip on Python 2.7.10. However, when I execute pip install pandas I get the following error:

Could not install packages due to an EnvironmentError: [Errno 2] No 
such file or directory: '/Library/Python/2.7/site-packages/idna- 
2.7.dist-info/METADATA'

Prior to this I have never used python or install any python packages on this system before. The python is pre-installed on the MacBook. Any advice on how to solve this?

1 Answers1

0

From the looks, your missing the idna package. A pip install idna will fix it.

Update: It seems like the idnapackage got corrupted. Try force reinstalling with pip install idna --force-reinstall --ignore-installed.

0xInfection
  • 2,676
  • 1
  • 19
  • 34
  • Seems like idna package is already installed but somehow it is missing some files. pip install idna Requirement already satisfied: idna in /Library/Python/2.7/site-packages (2.7) No metadata found in /Library/Python/2.7/site-packages Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: '/Library/Python/2.7/site-packages/idna-2.7.dist-info/METADATA' – Saffron Clasher Dec 20 '18 at 07:49
  • Seems like you got your files corrupted somehow. Updated my answer :) – 0xInfection Dec 21 '18 at 05:00