I'm using PyCharm and running a script by clicking the "Run" button, which executes the script in the "Run" environment. Interpreter is Anaconda 3.5. The script begins with import pandas as pd
. It's been always working perfectly until just now when I clicked 'Run' I got an unexpected error raised:
D:\Anaconda3\python.exe MY_PATH
Traceback (most recent call last):
File MY_PATH, line 2, in <module>
import pandas as pd
File "D:\Anaconda3\lib\site-packages\pandas\__init__.py", line 19, in <module>
"Missing required dependencies {0}".format(missing_dependencies))
ImportError: Missing required dependencies ['pytz']
This error persists even after I uninstalled and reinstalled both pytz
and pandas
.
On the other hand, pandas has been always working properly in the IPython console environment (with the same interpreter as the "Run" environment). Such an error never occurs in the console.
What could be wrong? Please help me. Thanks!
As Julian noted, the problem is most likely due to
pytz
being absent from the "Run" environment, although it's present in the IPython console environment. So how can I restore pytz
in the "Run" environment in PyCharm?