ModuleNotFoundError: No module named 'fasttext'

大憨熊 提交于 2020-07-20 10:35:35

问题


I have tried installing fasttext through conda using two channels:

conda install -c conda-forge fasttext

and

conda install -c conda-forge/label/cf201901 fasttext

as per (https://anaconda.org/conda-forge/fasttext).

I am using the following command to import: import fasttext However, the import fails with the error:

ModuleNotFoundError Traceback (most recent call last) in ----> 1 import fasttext

ModuleNotFoundError: No module named 'fasttext'

However, tried to import it in an older fashion import fastText, which failed.

Have tried it on python and python3, both of which fail.

I want to avoid installing it using pip and manage the packages using conda.

conda list shows that fasttext being installed. The output of which is shown below:

fasttext 0.2.0 hfc679d8_1 conda-forge/label/cf201901

The output of python -c 'import sys; print(sys.path) is as below:

['', '/<dir>/<dir>/anaconda3/lib/python37.zip', '/<dir>/<dir>/anaconda3/lib/python3.7', '/<dir>/<dir>/anaconda3/lib/python3.7/lib-dynload', '/<dir>/<dir>/anaconda3/lib/python3.7/site-packages']

来源:https://stackoverflow.com/questions/58186800/modulenotfounderror-no-module-named-fasttext

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!