I am trying to install the Python pandas package from the Windows command line with pip:
pip install pandas
but I get the following errror. I also downloaded the wheel version from here https://pypi.python.org/pypi/pandas/0.17.0/#downloads and tried that as well:
pip install pandas-0.17.1-cp35-none-win_amd64.whl
In either case, I get this error:
Exception:
Traceback (most recent call last):
File "c:\users\adi\appdata\local\programs\python\python35\lib\site-packages\pi
p\_vendor\pkg_resources\__init__.py", line 2795, in _dep_map
return self.__dep_map
File "c:\users\adi\appdata\local\programs\python\python35\lib\site-packages\pi
p\_vendor\pkg_resources\__init__.py", line 2652, in __getattr__
raise AttributeError(attr)
AttributeError: _DistInfoDistribution__dep_map
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\users\adi\appdata\local\programs\python\python35\lib\site-packages\pi
p\_vendor\pkg_resources\__init__.py", line 2786, in _parsed_pkg_info
return self._pkg_info
File "c:\users\adi\appdata\local\programs\python\python35\lib\site-packages\pi
p\_vendor\pkg_resources\__init__.py", line 2652, in __getattr__
raise AttributeError(attr)
AttributeError: _pkg_info
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\users\adi\appdata\local\programs\python\python35\lib\site-packages\pi
p\basecommand.py", line 211, in main
status = self.run(options, args)
File "c:\users\adi\appdata\local\programs\python\python35\lib\site-packages\pi
p\commands\install.py", line 294, in run
requirement_set.prepare_files(finder)
File "c:\users\adi\appdata\local\programs\python\python35\lib\site-packages\pi
p\req\req_set.py", line 334, in prepare_files
functools.partial(self._prepare_file, finder))
File "c:\users\adi\appdata\local\programs\python\python35\lib\site-packages\pi
p\req\req_set.py", line 321, in _walk_req_to_install
more_reqs = handler(req_to_install)
File "c:\users\adi\appdata\local\programs\python\python35\lib\site-packages\pi
p\req\req_set.py", line 561, in _prepare_file
set(req_to_install.extras) - set(dist.extras)
File "c:\users\adi\appdata\local\programs\python\python35\lib\site-packages\pi
p\_vendor\pkg_resources\__init__.py", line 2774, in extras
return [dep for dep in self._dep_map if dep]
File "c:\users\adi\appdata\local\programs\python\python35\lib\site-packages\pi
p\_vendor\pkg_resources\__init__.py", line 2797, in _dep_map
self.__dep_map = self._compute_dependencies()
File "c:\users\adi\appdata\local\programs\python\python35\lib\site-packages\pi
p\_vendor\pkg_resources\__init__.py", line 2819, in _compute_dependencies
for req in self._parsed_pkg_info.get_all('Requires-Dist') or []:
File "c:\users\adi\appdata\local\programs\python\python35\lib\site-packages\pi
p\_vendor\pkg_resources\__init__.py", line 2788, in _parsed_pkg_info
metadata = self.get_metadata(self.PKG_INFO)
File "c:\users\adi\appdata\local\programs\python\python35\lib\site-packages\pi
p\_vendor\pkg_resources\__init__.py", line 1616, in get_metadata
return self._get(self._fn(self.egg_info, name)).decode("utf-8")
File "c:\users\adi\appdata\local\programs\python\python35\lib\site-packages\pi
p\_vendor\pkg_resources\__init__.py", line 1722, in _get
with open(path, 'rb') as stream:
PermissionError: [Errno 13] Permission denied: 'c:\\users\\adi\\appdata\\local\\
temp\\pip-build-3ge1gj75\\pandas\\pandas-0.17.0.dist-info\\METADATA'
I also tried to open cmd
as administrator, but still got the same error.
Meanwhile, I was able to install the numpy library using pip.
I faced a similar problem trying to install pandas on azure.
The following worked:
python -m pip install --user pandas
I was having the same problem even running cmd as administrator. I re-start the pc and run the cmd as administrator again and it worked.
For the record I tried to install though the Anaconda's Windows app, obtaining the same permission error.
FOR ANYONE FINDING THIS NOW:
This website worked perfectly for me. Sadly, I had to use the built-in command prompt, but it gets the job done: https://data-flair.training/blogs/install-pandas-on-windows/
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.