7

While installing pandas using pip (pip install pandas), I'm getting error. How do I fix this issue? I'm using python 3.4 on windows10.

 set build\lib.win-amd64-3.4\pandas/_version.py to '0.22.0' running build_ext building 'pandas._libs.hashing' extension Traceback (most recent call last): File "<string>", line 1, in <module> File "C:\Users\sthakur1\AppData\Local\Temp\pip-build-2lweg8a9\pandas\setup.py", line 743, in <module> **setuptools_kwargs) File "C:\Python34\lib\distutils\core.py", line 148, in setup dist.run_commands() File "C:\Python34\lib\distutils\dist.py", line 955, in run_commands self.run_command(cmd) File "C:\Python34\lib\distutils\dist.py", line 974, in run_command cmd_obj.run() File "C:\Python34\lib\site-packages\setuptools\command\install.py", line 61, in run return orig.install.run(self) File "C:\Python34\lib\distutils\command\install.py", line 539, in run self.run_command('build') File "C:\Python34\lib\distutils\cmd.py", line 313, in run_command self.distribution.run_command(command) File "C:\Python34\lib\distutils\dist.py", line 974, in run_command cmd_obj.run() File "C:\Python34\lib\distutils\command\build.py", line 126, in run self.run_command(cmd_name) File "C:\Python34\lib\distutils\cmd.py", line 313, in run_command self.distribution.run_command(command) File "C:\Python34\lib\distutils\dist.py", line 974, in run_command cmd_obj.run() File "C:\Python34\lib\distutils\command\build_ext.py", line 339, in run self.build_extensions() File "C:\Users\sthakur1\AppData\Local\Temp\pip-build-2lweg8a9\pandas\setup.py", line 385, in build_extensions build_ext.build_extensions(self) File "C:\Users\sthakur1\AppData\Local\Temp\pip-build-2lweg8a9\pandas\setup.py", line 161, in build_extensions _build_ext.build_extensions(self) File "C:\Python34\lib\distutils\command\build_ext.py", line 448, in build_extensions self.build_extension(ext) File "C:\Python34\lib\distutils\command\build_ext.py", line 503, in build_extension depends=ext.depends) File "C:\Python34\lib\distutils\msvc9compiler.py", line 460, in compile self.initialize() File "C:\Python34\lib\distutils\msvc9compiler.py", line 371, in initialize vc_env = query_vcvarsall(VERSION, plat_spec) File "C:\Python34\lib\site-packages\setuptools\msvc9_support.py", line 52, in query_vcvarsall return unpatched['query_vcvarsall'](version, *args, **kwargs) File "C:\Python34\lib\distutils\msvc9compiler.py", line 287, in query_vcvarsall raise ValueError(str(list(result.keys()))) ValueError: ['path'] ---------------------------------------- Command "C:\Python34\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\sthakur1\\AppData\\Local\\Temp\\pip-build-2lweg8a9\\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 C:\Users\sthakur1\AppData\Local\Temp\pip-todgu5lt-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\sthakur1\AppData\Local\Temp\pip-build-2lweg8a9\pandas\ 
3
  • 1
    Please submit the actual lines you entered and format the code properly (using four spaces, as recommended by Stack here stackoverflow.com/editing-help) Commented Mar 29, 2018 at 11:17
  • Check that pip is in your PATH environment. If it is, just type pip install pandasin your terminal. If it's not just look up how to add it. Is there a reason you are using Python3.4 ? Commented Mar 29, 2018 at 11:17
  • 1
    I am trying to install using : pip install pandas Commented Mar 29, 2018 at 16:11

5 Answers 5

3

Have you tried running your CMD window as an administrator? And try this instead:

python -m pip install pandas 

Also make sure that your python installation folder is in your 'PATH' Environment Variable

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

Comments

2

This turned out to be a common issue while instaling pandas with pip on python 3.4. That's actually a known bug confirmed by pandas package developers on https://github.com/pandas-dev/pandas/issues/20775

The simplest solution should be:

pip install 'pandas<0.21' 

4 Comments

It needed double quotes with me to work: pip install "pandas<0.21"
@Jonathan Whoa, Pandas < 0.21 is severely outdated in 2025. Are you working on a legacy project or what? Have you tried installing a modern version like 2.2.3? Python 3.4, btw, is unsupported since March 2019.
I was but I figured it out. I needed an account migration: a previous service account was disabled, a newer was installed but not given rights. So yes, this definitely was a legacy project and it's scheduled to be upgraded as per now. Thanks again for your support!
Is this really the same problem? The description there says the error is Double requirement given: numpy ..., but that's not in the output OP posted. OP's error says ValueError: ['path'], but the linked issue doesn't even contain the word "path", or "ValueError" for that matter.
1

i believe it has to do with version of PIP. the way to fix it is to install pip version 19.3.1.

python -m pip install pip==19.3.1 

then you can upgrade to latest pip if needed and it should work fine.

Comments

0

The best solution would be to install Anaconda3 in your system. As it is a Big Python (with a great support of libraries for Data science and many more).

I love pandas and I found Anaconda a great tool to work. Jupyter notebook is also a great tool to learn, try and enjoy working with Data science. I have worked with 1/2 clients who (had PHD in mathematics or an employee in any organization) suggested me to choose Anaconda and Jupyter notebook.

  • Please uninstall Python 3 from your System. Also remove related paths from PATH environment variable.

  • Visit https://www.anaconda.com/download/#windows and download Python 3.7.

  • Install it, do not check (✔) if the installation wizard asks for setting environment variables (it causes issues later).

  • Also make a note of Anaconda's installation directory basically it would be C:\Users\sthakur1\Anaconda3 in your case, let's take it as an example.

  • Just click next by accepting the defaults. At the end of installation, it will ask you to install VScode, please install that, just click on install VSCode and installer will do the installation.

  • Once done, click on close/finish button. Now it's time to add the following paths to PATH environment variable one by one.

The last 2 are optional, you can skip. Actually, that I saw when I check the automatic path settings option the installer also add these 3 as well.

Here https://dev.to/hygull/setting-anaconda-path-on-windows-2dmn is my little article that explains this which can be easily found on Google (Chrome) just by typing Anaconda path settings and clicking on 2nd link(mostly), as 1st one takes to Stackoverflow.

C:\Users\sthakur1 C:\Users\sthakur1\Library\bin C:\Users\sthakur1\Scripts C:\Users\sthakur1\Library\mingw-w64\bin C:\Users\sthakur1\Library\usr\bin 

Finally, you can open a new terminal, try the following statements.

>>> import pandas as pd >>> import numpy as np >>> >>> df = pd.DataFrame({"fullname": ["A N", "P Y"], "age": [34, 67]}) >>> df 

And now you are done. Please comment if you face any issue.

1 Comment

My problem is that I use a public cloud to run my app
-2

Use this command to install PANDAS

pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org pandas -vvv

1 Comment

The issue does not seem related to trusted hosts, it is a Python version issue

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.