Help! I have installed and uninstalled spacy countless times but for some reason there is no .exec file in my anaconda3/bin folder.
When I run anything such as python -m spacy info,
I get this error:
/anaconda3/bin/python: No module named spacy.__main__; 'spacy' is a package and cannot be directly executed
what does this mean?
In general, the error can mean many things – and it's definitely confusing, because spaCy should ship with a __main__.py, that allows executing the package from the command line. Some questions that might help with debugging:
import spacy? Does this cause an error, too?In some cases, it can also help to start off with a clean (virtual) environment, if you haven't tried that already. You could also try installing spaCy via pip instead of conda, although that's a pretty unsatisfying solution.
This issue has been automatically closed because there has been no response to a request for more information from the original author. With only the information that is currently in the issue, there's not enough information to take action. If you're the original author, feel free to reopen the issue if you have or find the answers needed to investigate further.
I encounter the same error, on a freshly installed Ubuntu 16.04 and Anaconda, where spacy was installed with the conda command as per the installation instructions shown in the screenshot.

import spacy works fine.
The full error message is the following, and it is failing the same way in new terminal windows as well as in the original window where conda and spacy have been installed.
/home/user/anaconda3/bin/python: No module named spacy.__main__; 'spacy' is a package and cannot be directly executed
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
I encounter the same error, on a freshly installed Ubuntu 16.04 and Anaconda, where spacy was installed with the
condacommand as per the installation instructions shown in the screenshot.import spacyworks fine.The full error message is the following, and it is failing the same way in new terminal windows as well as in the original window where conda and spacy have been installed.