Try do it simple place the script an other place eg root Anaconda3 folder.
Run cmd as Administrator .
I can show a run in cmd,i normally always use cmder.
I don't use PyChram,but VS Code.
When you use Jupyter Notebook from Navigator or shortcut,it always use main
Or if you use Anaconda prompt(Anaconda own cmd shortcut).
Run cmd as Administrator .
I can show a run in cmd,i normally always use cmder.
# movie.py import numpy as np import pandas as pd data = pd.read_csv("movies.csv") print(data.head())
G:\>cd Anaconda3 # Test Python version G:\Anaconda3>python -V Python 3.6.5 :: Anaconda custom (64-bit) # Run script,now is shown version over used G:\Anaconda3>python movies.py Seven 1995 0 The Godfather 1972 1 Jaws 1975 G:\Anaconda3>When work command line,then try in PyCharm,make sure that root
python.exe
in Anaconda3 folder is chosen Configuring Python Interpreter PyChram.I don't use PyChram,but VS Code.
When you use Jupyter Notebook from Navigator or shortcut,it always use main
python.exe
in Anaconda3 then it should work.Or if you use Anaconda prompt(Anaconda own cmd shortcut).