0

I'm running Sublime Text 3 with an Anaconda build system on Win 7. I've been running Python (3.4) scripts that import pandas (0.20.3) fine for the last 6 months, but about two hours ago I started receiving the following error:

ImportError: Missing required dependencies ['pytz']

The strange thing is that if I save the script to a different directory it builds/runs fine and pandas is imported without issue. It's only happening when I run it from one specific folder.

I've attempted to reinstall pandas and pytz to no avail and the fact that it works in all but one folder suggests it's actually not a missing dependency, but something else.

For investigation and to elimate other potential causes, I've stripped the code down to its bare minimum, but it still fails from one specific directory:

import pandas as pd
print("Hello, World!")

I'm wondering if there's any kind of cache I can clear, but am unsure whether this is a Sublime Text 3 or an Anaconda issue. Running the py script from the command line (outside of ST3) also raises the same error. I've also rebooted in case it was Windows playing silly buggers, but it hasn't resolved it.

I don't believe I'm activating any kind of virtualenv (all modules have been installed globally in Windows using pip install). The very same script was working fine a few hours ago, so I'm somewhat baffled.

Many thanks.

Morris
  • 218
  • 1
  • 10

1 Answers1

0

I've managed to resolve this by creating a new folder and copying all the required files over. I'm still none the wiser as to what caused the issue, but as it's working again without re-installing/updating any Python modules, I can only guess that it was some kind of corruption with the original folder/files on a Windows level, or perhaps ST3 or the Anaconda Python Builder cache had become corrupted (it's a bit flakey at times).

Essentially, I've no idea. For folks who stumble across this with a similar issue, here's some other related SO posts.

Sublime Text console: Python Package import failing, despite their presence

Import Error: No module named numpy

Import Error: No module named numpy Anaconda

ImportError: Missing required dependencies ['numpy']

The last one in particular looks as though the OP's own answer might possibly have pinpointed the cause, but again, this is just conjecture.

Morris
  • 218
  • 1
  • 10