0
F:>where python
C:\Program Files (x86)\Python37-32\python.exe

F:>PyInstallerFile.py
Traceback (most recent call last):
File 
"F:\PyInstallerFile.py", line 13, in <module>
import pandas as pd
File "C:\ProgramData\Anaconda3\lib\site-packages\pandas\__init__.py", line 19, in <module>
"Missing required dependencies {0}".format(missing_dependencies))
ImportError: Missing required dependencies ['numpy']

I am trying to run my .py file from cmd, my python is installed in

C:\Program Files (x86)\Python37-32\

and same has been added to the environment path variables, then why does when I run PyInstallerFile.py file it is pointing to

C:\ProgramData\Anaconda3\lib\site-packages\pandas__init__.py

folder instead of on pointing to ProgramFiles folder.

What am I missing here, what should I do to change this default python location

I could see a similar issue here but it was for Linux environment I need to get this solved on Windows.

toofrellik
  • 1,277
  • 4
  • 15
  • 39
  • You need to install `numpy` as it's a dependency of `pandas` – Nordle Apr 30 '19 at 09:27
  • Maybe the installation used to run ".py" files is different from installation in PATH, i.e. the result of `where python`. Have you tried running `python PyInstallerFile.py`? – rrobby86 Apr 30 '19 at 09:27
  • python PyInstallerFile.py will work but PyInstallerFile.py is not working as it is pointing to anaconda location – toofrellik Apr 30 '19 at 09:47

2 Answers2

0

Install lastest version of numpy 1.16.x In my case Problem resolved with:

python3 -m pip unistall numpy
python3 -m pip install numpy==1.14.3 
0

Not sure what was the issue though python was added to my environment variables but, uninstalling anaconda and then making python as my primary workspace solved the issue

toofrellik
  • 1,277
  • 4
  • 15
  • 39