Closed ahmedahmedov closed 6 years ago
Oh... so, I need to type fastText and not fasttext...
Hi @ahmedahmedov,
It seems that this issue is resolved. Please re-open if necessary.
Best, Edouard.
import fastText as Fasttext
Traceback (most recent call last):
File "
though i installed it
I also met the same problem, but how to solve it ? who can help me ? I install fasttext with the following method: pip install fasttext-0.8.22-cp36-cp36m-win_amd64.whl
fastTest,not fasttext
I have 0.8.3 on Win 10 and it imports as fasttext (all lower case). Code seems updated but not docs.
Hi have successfully installed fasttext on python3.6 via conda . However, when I try to import it I get the following error: import fasttext neither can be right: import fastText
I have the same issue, the strange thing that it was working properly then it stopped without me changing anything in the environment: OS: Ubuntu 18.04.1 LTS (GNU/Linux 4.15.17-1-pve x86_64) python : Python 3.6.3 |Anaconda, Inc.| (default, Oct 13 2017, 12:02:49) I uninstalled fastText and installed again using pip and got "Successfully installed fasttext-0.8.3" however it did not work: Exception: Unable to import fastText. Please install fastText for Python: https://github.com/facebookresearch/fastText
Any feedback?
ModuleNotFoundError Traceback (most recent call last)
follow below instruction to install successfully
https://github.com/facebookresearch/fastText/tree/master/python
The easiest way to install fastText is to use pip.
$ git clone https://github.com/facebookresearch/fastText.git $ cd fastText $ pip install . Alternatively you can also install fastText using setuptools.
$ git clone https://github.com/facebookresearch/fastText.git $ cd fastText $ python setup.py install Now you can import this library with
import fastText
@YiyuJia conda installation of fasttext will give an earlier version of fasttext and hence you should install using pip.
Collecting fasttext
Using cached https://files.pythonhosted.org/packages/a4/86/ff826211bc9e28d4c371668b30b4b2c38a09127e5e73017b1c0cd52f9dfa/fasttext-0.8.3.tar.gz
Requirement already satisfied: numpy>=1 in /Users/joydeep/anaconda3/lib/python3.6/site-packages (from fasttext) (1.14.3)
Collecting future (from fasttext)
Downloading https://files.pythonhosted.org/packages/90/52/e20466b85000a181e1e144fd8305caf2cf475e2f9674e797b222f8105f5f/future-0.17.1.tar.gz (829kB)
100% |████████████████████████████████| 829kB 3.5MB/s
Building wheels for collected packages: fasttext, future
Running setup.py bdist_wheel for fasttext ... done
Stored in directory: /Users/joydeep/Library/Caches/pip/wheels/73/8e/5d/ecb50b90adaab5868ae1d8df180f31e55e85c2f055aaf2fb35
Running setup.py bdist_wheel for future ... done
Stored in directory: /Users/joydeep/Library/Caches/pip/wheels/0c/61/d2/d6b7317325828fbb39ee6ad559dbe4664d0896da4721bf379e
Successfully built fasttext future
distributed 1.21.8 requires msgpack, which is not installed.
Installing collected packages: future, fasttext
Successfully installed fasttext-0.8.3 future-0.17.1
You are using pip version 10.0.1, however version 18.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
$ python
Python 3.6.5 |Anaconda, Inc.| (default, Apr 26 2018, 08:42:37)
[GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import fasttext
>>>```
I had try the command
$ git clone https://github.com/facebookresearch/fastText.git
$ cd fastText
$ pip install .
it still can't work. even i change fasttext or fastText also not working.
Kept facing this issue but finally saw that it was failing because of No module named 'pybind11' This resolution helped fix it: https://github.com/pybind/python_example/issues/32#issuecomment-387037509 Able to import fastText into python now.
I have the same issue, the strange thing that it was working properly then it stopped without me changing anything in the environment: OS: Ubuntu 18.04.1 LTS (GNU/Linux 4.15.17-1-pve x86_64) python : Python 3.6.3 |Anaconda, Inc.| (default, Oct 13 2017, 12:02:49) I uninstalled fastText and installed again using pip and got "Successfully installed fasttext-0.8.3" however it did not work: Exception: Unable to import fastText. Please install fastText for Python: https://github.com/facebookresearch/fastText
Any feedback?
Try "import fasttext", seems like they haven't updated this in the docs.
I was trying to install fasttext on win 10. The error persisted for two days. Finally I downgraded python for 3.7 to 3.6 and finally is was installed successfully
Oh... so, I need to type fastText and not fasttext...
Finally!! I wonder why in fastText doc they are telling us to type: import fasttext
Hi have successfully installed fasttext on python3.6 via conda . However, when I try to import it I get the following error: import fasttext neither can be right: import fastText
I have the same issue, anyone can help...
see the requirement. I faced the same issue basically, it was missing c++ compiler. Then, followed this. https://askubuntu.com/questions/610291/how-to-install-cmake-3-2-on-ubuntu Then, installed fasttext as instructed.
package name is fasttext
since 0.9.0
if you are importing FastText from Gensim make sure your Gensim version is higher than 3.3
I thik your code cannot able find the path. So give path to them or put fastText folder where you written the code.
install fasttext using pip. It worked for me in Jupiter notebook. And there is no name change it is "fasttext" only.
change "import fastText as ft" to "import fasttext as ft". Worked for me.
First things first, check if after successful installation you can see the package installed using pip freeze
E.g.
pip freeze | grep fast
Output: fastai==2.5.2 fastapi==0.61.1 fastcore==1.3.26 fastdownload==0.0.5 fastprogress==1.0.0
There is a possibility that installation was done for Python 2 and not Python 3 (as the fasttext documents use sudo to install the package). I found it from one of the log.
Requirement already satisfied (use --upgrade to upgrade): fasttext==0.9.2 from file:///home/prashant/ml_stuff/fastText in /usr/local/lib/python2.7/dist-packages
Try, removing sudo from the pip install command for fasttext to see if that enables the installation for Python3.
Repeat the command again.
pip freeze | grep fast
Output: fastai==2.5.2 fastapi==0.61.1 fastcore==1.3.26 fastdownload==0.0.5 fastprogress==1.0.0 fasttext @ file:///home/prashant/ml_stuff/fastText
And bingo, it worked after that for me.
Type "help", "copyright", "credits" or "license" for more information.
>>> import fasttext
>>>
Note: This might not work for everyone, but surely worked for me.
oat!!! I tried import fastText but keep getting error until use import fasttext
. It works for me.
Hi have successfully installed fasttext on python3.5. However, when I try to import it I get the following error:
I have tried installing both with
pip install .
andpython setup.y install
with no luck.