Skip to content
This repository has been archived by the owner on Mar 19, 2024. It is now read-only.

issue of pip install fasttext #1075

Open
zonghui0228 opened this issue May 27, 2020 · 5 comments
Open

issue of pip install fasttext #1075

zonghui0228 opened this issue May 27, 2020 · 5 comments
Labels
Build build issue Python related to python bindings

Comments

@zonghui0228
Copy link

zonghui0228 commented May 27, 2020

In command line, I input :
pip install fasttext
show following error:

Collecting fasttext
_Downloading https://files.pythonhosted.org/packages/f8/85/e2b368ab6d3528827b147fdb814f8189acc981a4bc2f99ab894650e05c40/fasttext-0.9.2.tar.gz (68kB)
100% |████████████████████████████████| 71kB 331kB/s
Complete output from command python setup.py egg_info:
Collecting pybind11
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f64faa6d6a0>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/pybind11/
Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f64faa6d7b8>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/pybind11/
Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f64faa6d898>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/pybind11/
Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f64faa6d978>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/pybind11/
Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f64faa6da20>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/pybind11/
Could not find a version that satisfies the requirement pybind11 (from versions: )
No matching distribution found for pybind11
Traceback (most recent call last):
File "/tmp/pip-build-gx0dlpvh/fasttext/setup.py", line 38, in init
import pybind11
ModuleNotFoundError: No module named 'pybind11'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/pip-build-gx0dlpvh/fasttext/setup.py", line 72, in <module>
    get_pybind_include(),
  File "/tmp/pip-build-gx0dlpvh/fasttext/setup.py", line 41, in __init__
    raise RuntimeError('pybind11 install failed.')
RuntimeError: pybind11 install failed._

So, I installed pybind11 first
pip install pybind11
and, installed fasttext, it worked.

Installing collected packages: pybind11, setuptools, numpy, fasttext
Successfully installed fasttext-0.9.2 numpy-1.18.4 pybind11-2.5.0 setuptools-46.4.0

@davidefiocco
Copy link

davidefiocco commented May 28, 2020

The need of pybind11 is stated in the requirements, check it out :)

https://github.com/facebookresearch/fastText#requirements

@parulgarg123
Copy link

RIght @davidefiocco it's in requirement but when user install the fasttext library all the necessary requirement libraries should automatically be downloaded.

As far as the above error concerns @zonghui0228 , based on the above log traces there is a network issue seems. I tried to reproduce it but didn't faced any challenges, If you are still facing the same issue I urge you to clean the package first then update the setup tools and try to install it again. Sometimes this issue might be caused by outdated setup tools. Post that if you still facing the issue, please share the steps to reproduce and the OS details where it is happening.

Note: It's not a potential bug

@Celebio Celebio added Build build issue Python related to python bindings labels Jun 2, 2020
@JSMboli
Copy link

JSMboli commented Jan 22, 2021

Hi @zonghui0228 and @parulgarg123,

This does not work for me. I am using windows.
On installing pybind11, it say requirement already met but when installing fasttext, same problem continues
Any help?

@labenech
Copy link

labenech commented Jun 2, 2021

So, I installed pybind11 first
pip install pybind11
and, installed fasttext, it worked.

Works fine for me ... I remove pybind11 from my requirements.txt and leave the line with fasttest.
I do a 'pip install pybind11' before 'pip install -r requirements.txt'. No problem !
Thank you @zonghui0228

@thelfensdrfer
Copy link

The need of pybind11 is stated in the requirements, check it out :)

python-poetry/poetry#6113 (comment) :

However fasttext is probably Doing It Wrong by not declaring pybind11 as a build-time requirement.

Probably you can and should fix this over there by pointing them at https://setuptools.pypa.io/en/latest/userguide/dependency_management.html#build-system-requirement and / or submitting an MR.

There is already an open pull request for this: #1270

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Build build issue Python related to python bindings
Projects
None yet
Development

No branches or pull requests

7 participants