Reputation: 31
I want to run a script in .py with cmd
or anaconda prompt but says pandas can't be recognized.
'pandas' in sys.modules
False
the version of python is the correct where these libraries are installed. The correct path is somehow not in connection with the cmd and all the libraries installed with the anaconda are not seen. How to make it work without installing all the modules again?
Upvotes: 1
Views: 1542
Reputation: 31
The solution was to write the word python
too.
python hx.py
now it runs if typed in the anaconda prompt.
All nice.
Upvotes: 1
Reputation: 3816
Usually this is fixed with a simple from command line:
python -m pip install pandas
if this doesn't help, I will suggest you to remove all the python packages and do an anaconda reinstall on your system
Upvotes: 0