Open NadjaHergerTR opened 4 years ago
Hi, for me fails too. I've checked the following:
For compiling fasttext sources while installing with pip, they have changed the minimum c++ std requirement. At 0.9.1: https://github.com/facebookresearch/fastText/blob/v0.9.1/setup.py#L109 and at 0.9.2: https://github.com/facebookresearch/fastText/blob/v0.9.2/setup.py#L109. Anyway, while I try to install fasttext via pip install fasttext==0.9.2 in a virtualenv in my machine with g++4.8.5, it seems to configure c++14 during the installation as default, and as I don't have support for it then tries c++11, but I think that I have c++0x by default in the compiler and it's no longer supported for 0.9.2.
In another machine with g++ (Ubuntu 7.5.0-3ubuntu1~18.04), it fails at building the wheel, but installs it, I think from pre-compiled.
I think the solution could be to set in some way an argument for the pip install command, to select the std version, as the option is provided by setup.py, but I don't know how to do it: https://github.com/facebookresearch/fastText/blob/v0.9.2/setup.py#L195
Please, how can we install it, setting the c++ std flag:
Kind regards, Javier
0.9.2 is also failing for us with the same error error: command 'gcc' failed with exit status 1
and downgrading to 0.9.1 fixes it
I've more findings:
I've cloned the tagged version as 0.9.2, then I've changed in setup.py the list of options in https://github.com/facebookresearch/fastText/blob/v0.9.2/setup.py#L104 to ensure that pip install . is running with c++11. In the log error I've found the following: : error: static assertion failed: pybind11::overload_cast<...> requires compiling in C++14 mode static_assert(detail::deferred_t<std::false_type, Args...>::value,
To recap: I don't have support for c++14 and it changes to c++11 to try the build. It fails. I ensure that c++11 is used during build. It fails due to c++14 requirements.
Maybe I miss something, but it seems that c++11 is not supported for fasttext 0.9.2 version.
It seems that from 4 commits before (6d7c77cd33b23eec26198fdfe10419476b5364c7) the tag 0.9.2, you can install fasttext without c++14 requirement, with all the new features but without some of them:
@Celebio could you provide a version without c++14 requirements or is it a must for this 2 features?
Kind regards, Javi
Hi, Thank you very much for pointing this issue. We can ship the same features with C++11. We will fix that.
Best regards, Onur
Thank you Onur for your prompt reply :)
@Celebio I would be possible for you to provide an estimation on when C++11 support will be available? I need to take this into account to decide how to manage this in my projects.
Kind regars, Javi
Hi @javiermcebrian , Hopefully we will do a post-release this week.
Best regards, Onur
Perfect, thank you so much! :)
FYI Just get related issue trying to upgrade to 0.9.2 on CentOS 7:
gcc: error: unrecognized command line option '-std=c++14'
I'm using python 3.6 - and doing install with pip install fasttext==0.9.2
Hi @NadjaHergerTR , @javiermcebrian , @smartkiwi , @Vitiell0 ,
Could you please checkout HEAD, run pip install .
and tell if it works with your C++11 compiler?
If it works, the commit b96adbe148f282fe3282bc5690404f5e68e338d6 will be included in a post-release.
Best regards, Onur
I've tried it and it's able to install fasttext==0.9.2 using my compiler. I've run train_supervised() with autotune and it works. I didn't check any more features.
Thanks :) Javi
@Celebio When is the post-release going to be available, please? :)
Kind regards, Javier
@Celebio I was able to install fasttext from master on Centos7 and gcc@4.8.5 🎉 Thank you very much. I'm looking forward to the 0.9.3 release 😉
Hello, with the latest code Jan 25, 2022, i'm having problem to install fasttext on a Ubuntu 21.04
@Celebio is this related to the version of gcc ?
Thank You Mo
pip._internal.exceptions.InstallationSubprocessError: Command errored out with exit status 1: /home/projects/projecta12/.projecta12venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-b_xalqqz/setup.py'"'"'; file='"'"'/tmp/pip-req-build-b_xalqqz/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-5c2xoor2/install-record.txt --single-version-externally-managed --compile --install-headers /home/projects/projecta12/.projecta12venv/include/site/python3.9/fasttext Check the logs for full command output. Removed build tracker: '/tmp/pip-req-tracker-a28l9v21'
Install Method $ git clone https://github.com/facebookresearch/fastText.git $ cd fastText $ pip install .
$gcc --version gcc (Ubuntu 10.3.0-1ubuntu1) 10.3.0 Copyright (C) 2020 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
g++ -v Using built-in specs. COLLECT_GCC=g++ COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/10/lto-wrapper OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa:hsa OFFLOAD_TARGET_DEFAULT=1 Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 10.3.0-1ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-10/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-10 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-10-gDeRY6/gcc-10-10.3.0/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/gcc-10-gDeRY6/gcc-10-10.3.0/debian/tmp-gcn/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-mutex Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 10.3.0 (Ubuntu 10.3.0-1ubuntu1)
(.projecta12venv) root@kbase:/home/projects/fastText# pip install . --verbose
Using pip 20.3.4 from /home/projects/projecta12/.projecta12venv/lib/python3.9/site-packages/pip (python 3.9)
Non-user install because user site-packages disabled
Created temporary directory: /tmp/pip-ephem-wheel-cache-sk7xeogb
Created temporary directory: /tmp/pip-req-tracker-a28l9v21
Initialized build tracking at /tmp/pip-req-tracker-a28l9v21
Created build tracker: /tmp/pip-req-tracker-a28l9v21
Entered build tracker: /tmp/pip-req-tracker-a28l9v21
Created temporary directory: /tmp/pip-install-0ri5v_cs
Processing /home/projects/fastText
Created temporary directory: /tmp/pip-req-build-b_xalqqz
Added file:///home/projects/fastText to build tracker '/tmp/pip-req-tracker-a28l9v21'
Running setup.py (path:/tmp/pip-req-build-b_xalqqz/setup.py) egg_info for package from file:///home/projects/fastText
Created temporary directory: /tmp/pip-pip-egg-info-2rel6zul
Running command python setup.py egg_info
running egg_info
creating /tmp/pip-pip-egg-info-2rel6zul/fasttext.egg-info
writing /tmp/pip-pip-egg-info-2rel6zul/fasttext.egg-info/PKG-INFO
writing dependency_links to /tmp/pip-pip-egg-info-2rel6zul/fasttext.egg-info/dependency_links.txt
writing requirements to /tmp/pip-pip-egg-info-2rel6zul/fasttext.egg-info/requires.txt
writing top-level names to /tmp/pip-pip-egg-info-2rel6zul/fasttext.egg-info/top_level.txt
writing manifest file '/tmp/pip-pip-egg-info-2rel6zul/fasttext.egg-info/SOURCES.txt'
reading manifest file '/tmp/pip-pip-egg-info-2rel6zul/fasttext.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'PATENTS'
writing manifest file '/tmp/pip-pip-egg-info-2rel6zul/fasttext.egg-info/SOURCES.txt'
Source in /tmp/pip-req-build-b_xalqqz has version 0.9.2, which satisfies requirement fasttext==0.9.2 from file:///home/projects/fastText
Removed fasttext==0.9.2 from file:///home/projects/fastText from build tracker '/tmp/pip-req-tracker-a28l9v21'
Requirement already satisfied: numpy in /home/projects/projecta12/.projecta12venv/lib/python3.9/site-packages (from fasttext==0.9.2) (1.21.3)
Requirement already satisfied: pybind11>=2.2 in /home/projects/projecta12/.projecta12venv/lib/python3.9/site-packages (from fasttext==0.9.2) (2.9.0)
Requirement already satisfied: setuptools>=0.7.0 in /home/projects/projecta12/.projecta12venv/lib/python3.9/site-packages (from fasttext==0.9.2) (44.1.1)
Created temporary directory: /tmp/pip-unpack-fujna6k4
Building wheels for collected packages: fasttext
Created temporary directory: /tmp/pip-wheel-r4fglmxi
Building wheel for fasttext (setup.py) ... Destination directory: /tmp/pip-wheel-r4fglmxi
Running command /home/projects/projecta12/.projecta12venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-b_xalqqz/setup.py'"'"'; file='"'"'/tmp/pip-req-build-b_xalqqz/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-r4fglmxi
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.9
creating build/lib.linux-x86_64-3.9/fasttext
copying python/fasttext_module/fasttext/FastText.py -> build/lib.linux-x86_64-3.9/fasttext
copying python/fasttext_module/fasttext/init.py -> build/lib.linux-x86_64-3.9/fasttext
creating build/lib.linux-x86_64-3.9/fasttext/util
copying python/fasttext_module/fasttext/util/util.py -> build/lib.linux-x86_64-3.9/fasttext/util
copying python/fasttext_module/fasttext/util/init.py -> build/lib.linux-x86_64-3.9/fasttext/util
creating build/lib.linux-x86_64-3.9/fasttext/tests
copying python/fasttext_module/fasttext/tests/test_script.py -> build/lib.linux-x86_64-3.9/fasttext/tests
copying python/fasttext_module/fasttext/tests/init.py -> build/lib.linux-x86_64-3.9/fasttext/tests
copying python/fasttext_module/fasttext/tests/test_configurations.py -> build/lib.linux-x86_64-3.9/fasttext/tests
running build_ext
creating tmp
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/build/python3.9-FZ7wim/python3.9-3.9.5=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/build/python3.9-FZ7wim/python3.9-3.9.5=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/home/projects/projecta12/.projecta12venv/include -I/usr/include/python3.9 -c /tmp/tmph0_xxpxk.cpp -o tmp/tmph0_xxpxk.o -std=c++11
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/build/python3.9-FZ7wim/python3.9-3.9.5=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/build/python3.9-FZ7wim/python3.9-3.9.5=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/home/projects/projecta12/.projecta12venv/include -I/usr/include/python3.9 -c /tmp/tmppw8fp5jm.cpp -o tmp/tmppw8fp5jm.o -fvisibility=hidden
building 'fasttext_pybind' extension
creating build/temp.linux-x86_64-3.9
creating build/temp.linux-x86_64-3.9/python
creating build/temp.linux-x86_64-3.9/python/fasttext_module
creating build/temp.linux-x86_64-3.9/python/fasttext_module/fasttext
creating build/temp.linux-x86_64-3.9/python/fasttext_module/fasttext/pybind
creating build/temp.linux-x86_64-3.9/src
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/build/python3.9-FZ7wim/python3.9-3.9.5=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/build/python3.9-FZ7wim/python3.9-3.9.5=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/home/projects/projecta12/.projecta12venv/lib/python3.9/site-packages/pybind11/include -I/home/projects/projecta12/.projecta12venv/lib/python3.9/site-packages/pybind11/include -Isrc -I/home/projects/projecta12/.projecta12venv/include -I/usr/include/python3.9 -c python/fasttext_module/fasttext/pybind/fasttext_pybind.cc -o build/temp.linux-x86_64-3.9/python/fasttext_module/fasttext/pybind/fasttext_pybind.o -DVERSION_INFO="0.9.2" -std=c++11 -fvisibility=hidden
python/fasttext_module/fasttext/pybind/fasttext_pybind.cc: In lambda function:
python/fasttext_module/fasttext/pybind/fasttext_pybind.cc:346:35: warning: comparison of integer expressions of different signedness: ‘int32_t’ {aka ‘int’} and ‘std::vector^~~~~
python/fasttext_module/fasttext/pybind/fasttext_pybind.cc: In lambda function:
python/fasttext_module/fasttext/pybind/fasttext_pybind.cc:360:35: warning: comparison of integer expressions of different signedness: ‘int32_t’ {aka ‘int’} and ‘std::vector^~~~~~
x86_64-linux-gnu-gcc: fatal error: Killed signal terminated program cc1plus
compilation terminated.
error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
error
ERROR: Failed building wheel for fasttext
Running setup.py clean for fasttext
Running command /home/projects/projecta12/.projecta12venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-b_xalqqz/setup.py'"'"'; file='"'"'/tmp/pip-req-build-b_xalqqz/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' clean --all
running clean
removing 'build/temp.linux-x86_64-3.9' (and everything under it)
removing 'build/lib.linux-x86_64-3.9' (and everything under it)
'build/bdist.linux-x86_64' does not exist -- can't clean it
'build/scripts-3.9' does not exist -- can't clean it
removing 'build'
Failed to build fasttext
Installing collected packages: fasttext
Created temporary directory: /tmp/pip-record-5c2xoor2
Running command /home/projects/projecta12/.projecta12venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-b_xalqqz/setup.py'"'"'; file='"'"'/tmp/pip-req-build-b_xalqqz/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-5c2xoor2/install-record.txt --single-version-externally-managed --compile --install-headers /home/projects/projecta12/.projecta12venv/include/site/python3.9/fasttext
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.9
creating build/lib.linux-x86_64-3.9/fasttext
copying python/fasttext_module/fasttext/FastText.py -> build/lib.linux-x86_64-3.9/fasttext
copying python/fasttext_module/fasttext/init.py -> build/lib.linux-x86_64-3.9/fasttext
creating build/lib.linux-x86_64-3.9/fasttext/util
copying python/fasttext_module/fasttext/util/util.py -> build/lib.linux-x86_64-3.9/fasttext/util
copying python/fasttext_module/fasttext/util/init.py -> build/lib.linux-x86_64-3.9/fasttext/util
creating build/lib.linux-x86_64-3.9/fasttext/tests
copying python/fasttext_module/fasttext/tests/test_script.py -> build/lib.linux-x86_64-3.9/fasttext/tests
copying python/fasttext_module/fasttext/tests/init.py -> build/lib.linux-x86_64-3.9/fasttext/tests
copying python/fasttext_module/fasttext/tests/test_configurations.py -> build/lib.linux-x86_64-3.9/fasttext/tests
running build_ext
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/build/python3.9-FZ7wim/python3.9-3.9.5=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/build/python3.9-FZ7wim/python3.9-3.9.5=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/home/projects/projecta12/.projecta12venv/include -I/usr/include/python3.9 -c /tmp/tmpxukhxpxd.cpp -o tmp/tmpxukhxpxd.o -std=c++11
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/build/python3.9-FZ7wim/python3.9-3.9.5=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/build/python3.9-FZ7wim/python3.9-3.9.5=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/home/projects/projecta12/.projecta12venv/include -I/usr/include/python3.9 -c /tmp/tmp5hn07uog.cpp -o tmp/tmp5hn07uog.o -fvisibility=hidden
building 'fasttext_pybind' extension
creating build/temp.linux-x86_64-3.9
creating build/temp.linux-x86_64-3.9/python
creating build/temp.linux-x86_64-3.9/python/fasttext_module
creating build/temp.linux-x86_64-3.9/python/fasttext_module/fasttext
creating build/temp.linux-x86_64-3.9/python/fasttext_module/fasttext/pybind
creating build/temp.linux-x86_64-3.9/src
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/build/python3.9-FZ7wim/python3.9-3.9.5=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/build/python3.9-FZ7wim/python3.9-3.9.5=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/home/projects/projecta12/.projecta12venv/lib/python3.9/site-packages/pybind11/include -I/home/projects/projecta12/.projecta12venv/lib/python3.9/site-packages/pybind11/include -Isrc -I/home/projects/projecta12/.projecta12venv/include -I/usr/include/python3.9 -c python/fasttext_module/fasttext/pybind/fasttext_pybind.cc -o build/temp.linux-x86_64-3.9/python/fasttext_module/fasttext/pybind/fasttext_pybind.o -DVERSION_INFO="0.9.2" -std=c++11 -fvisibility=hidden
python/fasttext_module/fasttext/pybind/fasttext_pybind.cc: In lambda function:
python/fasttext_module/fasttext/pybind/fasttext_pybind.cc:346:35: warning: comparison of integer expressions of different signedness: ‘int32_t’ {aka ‘int’} and ‘std::vector^~~~~
python/fasttext_module/fasttext/pybind/fasttext_pybind.cc: In lambda function:
python/fasttext_module/fasttext/pybind/fasttext_pybind.cc:360:35: warning: comparison of integer expressions of different signedness: ‘int32_t’ {aka ‘int’} and ‘std::vector^~~~~~
x86_64-linux-gnu-gcc: fatal error: Killed signal terminated program cc1plus
compilation terminated.
error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
Running setup.py install for fasttext ... error
ERROR: Command errored out with exit status 1: /home/projects/projecta12/.projecta12venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-b_xalqqz/setup.py'"'"'; file='"'"'/tmp/pip-req-build-b_xalqqz/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-5c2xoor2/install-record.txt --single-version-externally-managed --compile --install-headers /home/projects/projecta12/.projecta12venv/include/site/python3.9/fasttext Check the logs for full command output.
Exception information:
Traceback (most recent call last):
File "/home/projects/projecta12/.projecta12venv/lib/python3.9/site-packages/pip/_internal/req/req_install.py", line 848, in install
success = install_legacy(
File "/home/projects/projecta12/.projecta12venv/lib/python3.9/site-packages/pip/_internal/operations/install/legacy.py", line 86, in install
raise LegacyInstallFailure
pip._internal.operations.install.legacy.LegacyInstallFailure
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/home/projects/projecta12/.projecta12venv/lib/python3.9/site-packages/pip/_internal/cli/base_command.py", line 223, in _main status = self.run(options, args) File "/home/projects/projecta12/.projecta12venv/lib/python3.9/site-packages/pip/_internal/cli/req_command.py", line 180, in wrapper return func(self, options, args) File "/home/projects/projecta12/.projecta12venv/lib/python3.9/site-packages/pip/_internal/commands/install.py", line 421, in run installed = install_given_reqs( File "/home/projects/projecta12/.projecta12venv/lib/python3.9/site-packages/pip/_internal/req/init.py", line 82, in install_given_reqs requirement.install( File "/home/projects/projecta12/.projecta12venv/lib/python3.9/site-packages/pip/_internal/req/req_install.py", line 866, in install six.reraise(*exc.parent) File "/usr/share/python-wheels/six-1.15.0-py2.py3-none-any.whl/six.py", line 703, in reraise raise value File "/home/projects/projecta12/.projecta12venv/lib/python3.9/site-packages/pip/_internal/operations/install/legacy.py", line 74, in install runner( File "/home/projects/projecta12/.projecta12venv/lib/python3.9/site-packages/pip/_internal/utils/subprocess.py", line 292, in runner call_subprocess( File "/home/projects/projecta12/.projecta12venv/lib/python3.9/site-packages/pip/_internal/utils/subprocess.py", line 261, in call_subprocess raise InstallationSubprocessError(proc.returncode, command_desc) pip._internal.exceptions.InstallationSubprocessError: Command errored out with exit status 1: /home/projects/projecta12/.projecta12venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-b_xalqqz/setup.py'"'"'; file='"'"'/tmp/pip-req-build-b_xalqqz/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-5c2xoor2/install-record.txt --single-version-externally-managed --compile --install-headers /home/projects/projecta12/.projecta12venv/include/site/python3.9/fasttext Check the logs for full command output. Removed build tracker: '/tmp/pip-req-tracker-a28l9v21'
I am also having an issue installing Fasttext (Date 04/06/2022) with python v. 3.10.4 on Windows 11.
I had it installed previously (some time during early 2022), but after updating my Python (uninstalling and re-installing the new version) I am having trouble installing it.
My command: Pip install fasttext
Output: `Collecting fasttext Using cached fasttext-0.9.2.tar.gz (68 kB) Preparing metadata (setup.py) ... done Requirement already satisfied: pybind11>=2.2 in c:\users\benja\appdata\local\programs\python\python310\lib\site-packages (from fasttext) (2.9.2) Requirement already satisfied: setuptools>=0.7.0 in c:\users\benja\appdata\local\programs\python\python310\lib\site-packages (from fasttext) (62.3.2) Requirement already satisfied: numpy in c:\users\benja\appdata\local\programs\python\python310\lib\site-packages (from fasttext) (1.22.4) Building wheels for collected packages: fasttext Building wheel for fasttext (setup.py) ... error error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [52 lines of output]
C:\Users\benja\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\dist.py:772: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead
warnings.warn(
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-310
creating build\lib.win-amd64-cpython-310\fasttext
copying python\fasttext_module\fasttext\FastText.py -> build\lib.win-amd64-cpython-310\fasttext
copying python\fasttext_module\fasttext__init.py -> build\lib.win-amd64-cpython-310\fasttext
creating build\lib.win-amd64-cpython-310\fasttext\util
copying python\fasttext_module\fasttext\util\util.py -> build\lib.win-amd64-cpython-310\fasttext\util
copying python\fasttext_module\fasttext\util__init__.py -> build\lib.win-amd64-cpython-310\fasttext\util
creating build\lib.win-amd64-cpython-310\fasttext\tests
copying python\fasttext_module\fasttext\tests\test_configurations.py -> build\lib.win-amd64-cpython-310\fasttext\tests
copying python\fasttext_module\fasttext\tests\test_script.py -> build\lib.win-amd64-cpython-310\fasttext\tests
copying python\fasttext_module\fasttext\tests\init__.py -> build\lib.win-amd64-cpython-310\fasttext\tests
running build_ext
building 'fasttext_pybind' extension
creating build\temp.win-amd64-cpython-310
creating build\temp.win-amd64-cpython-310\Release
creating build\temp.win-amd64-cpython-310\Release\python
creating build\temp.win-amd64-cpython-310\Release\python\fasttext_module
creating build\temp.win-amd64-cpython-310\Release\python\fasttext_module\fasttext
creating build\temp.win-amd64-cpython-310\Release\python\fasttext_module\fasttext\pybind
creating build\temp.win-amd64-cpython-310\Release\src
"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Users\benja\AppData\Local\Programs\Python\Python310\lib\site-packages\pybind11\include -IC:\Users\benja\AppData\Local\Programs\Python\Python310\lib\site-packages\pybind11\include -Isrc -IC:\Users\benja\AppData\Local\Programs\Python\Python310\include -IC:\Users\benja\AppData\Local\Programs\Python\Python310\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" /EHsc /Tppython/fasttext_module/fasttext/pybind/fasttext_pybind.cc /Fobuild\temp.win-amd64-cpython-310\Release\python/fasttext_module/fasttext/pybind/fasttext_pybind.obj /EHsc /DVERSION_INFO=\\"0.9.2\\"
fasttext_pybind.cc
python/fasttext_module/fasttext/pybind/fasttext_pybind.cc(171): error C2065: 'ssize_t': undeclared identifier
python/fasttext_module/fasttext/pybind/fasttext_pybind.cc(171): error C2672: 'pybind11::init': no matching overloaded function found
python/fasttext_module/fasttext/pybind/fasttext_pybind.cc(170): error C2974: 'pybind11::init': invalid template argument for 'CFunc', type expected
C:\Users\benja\AppData\Local\Programs\Python\Python310\lib\site-packages\pybind11\include\pybind11\pybind11.h(1920): note: see declaration of 'pybind11::init'
python/fasttext_module/fasttext/pybind/fasttext_pybind.cc(170): error C2974: 'pybind11::init': invalid template argument for 'Func', type expected
C:\Users\benja\AppData\Local\Programs\Python\Python310\lib\site-packages\pybind11\include\pybind11\pybind11.h(1912): note: see declaration of 'pybind11::init'
python/fasttext_module/fasttext/pybind/fasttext_pybind.cc(170): error C2974: 'pybind11::init': invalid template argument for 'Args', type expected
C:\Users\benja\AppData\Local\Programs\Python\Python310\lib\site-packages\pybind11\include\pybind11\pybind11.h(1900): note: see declaration of 'pybind11::init'
python/fasttext_module/fasttext/pybind/fasttextpybind.cc(171): error C2672: 'pybind11::class
note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for fasttext Running setup.py clean for fasttext Failed to build fasttext Installing collected packages: fasttext Running setup.py install for fasttext ... error error: subprocess-exited-with-error
× Running setup.py install for fasttext did not run successfully.
│ exit code: 1
╰─> [54 lines of output]
C:\Users\benja\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\dist.py:772: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead
warnings.warn(
running install
C:\Users\benja\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-310
creating build\lib.win-amd64-cpython-310\fasttext
copying python\fasttext_module\fasttext\FastText.py -> build\lib.win-amd64-cpython-310\fasttext
copying python\fasttext_module\fasttext__init.py -> build\lib.win-amd64-cpython-310\fasttext
creating build\lib.win-amd64-cpython-310\fasttext\util
copying python\fasttext_module\fasttext\util\util.py -> build\lib.win-amd64-cpython-310\fasttext\util
copying python\fasttext_module\fasttext\util__init__.py -> build\lib.win-amd64-cpython-310\fasttext\util
creating build\lib.win-amd64-cpython-310\fasttext\tests
copying python\fasttext_module\fasttext\tests\test_configurations.py -> build\lib.win-amd64-cpython-310\fasttext\tests
copying python\fasttext_module\fasttext\tests\test_script.py -> build\lib.win-amd64-cpython-310\fasttext\tests
copying python\fasttext_module\fasttext\tests\init__.py -> build\lib.win-amd64-cpython-310\fasttext\tests
running build_ext
building 'fasttext_pybind' extension
creating build\temp.win-amd64-cpython-310
creating build\temp.win-amd64-cpython-310\Release
creating build\temp.win-amd64-cpython-310\Release\python
creating build\temp.win-amd64-cpython-310\Release\python\fasttext_module
creating build\temp.win-amd64-cpython-310\Release\python\fasttext_module\fasttext
creating build\temp.win-amd64-cpython-310\Release\python\fasttext_module\fasttext\pybind
creating build\temp.win-amd64-cpython-310\Release\src
"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Users\benja\AppData\Local\Programs\Python\Python310\lib\site-packages\pybind11\include -IC:\Users\benja\AppData\Local\Programs\Python\Python310\lib\site-packages\pybind11\include -Isrc -IC:\Users\benja\AppData\Local\Programs\Python\Python310\include -IC:\Users\benja\AppData\Local\Programs\Python\Python310\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" /EHsc /Tppython/fasttext_module/fasttext/pybind/fasttext_pybind.cc /Fobuild\temp.win-amd64-cpython-310\Release\python/fasttext_module/fasttext/pybind/fasttext_pybind.obj /EHsc /DVERSION_INFO=\\"0.9.2\\"
fasttext_pybind.cc
python/fasttext_module/fasttext/pybind/fasttext_pybind.cc(171): error C2065: 'ssize_t': undeclared identifier
python/fasttext_module/fasttext/pybind/fasttext_pybind.cc(171): error C2672: 'pybind11::init': no matching overloaded function found
python/fasttext_module/fasttext/pybind/fasttext_pybind.cc(170): error C2974: 'pybind11::init': invalid template argument for 'CFunc', type expected
C:\Users\benja\AppData\Local\Programs\Python\Python310\lib\site-packages\pybind11\include\pybind11\pybind11.h(1920): note: see declaration of 'pybind11::init'
python/fasttext_module/fasttext/pybind/fasttext_pybind.cc(170): error C2974: 'pybind11::init': invalid template argument for 'Func', type expected
C:\Users\benja\AppData\Local\Programs\Python\Python310\lib\site-packages\pybind11\include\pybind11\pybind11.h(1912): note: see declaration of 'pybind11::init'
python/fasttext_module/fasttext/pybind/fasttext_pybind.cc(170): error C2974: 'pybind11::init': invalid template argument for 'Args', type expected
C:\Users\benja\AppData\Local\Programs\Python\Python310\lib\site-packages\pybind11\include\pybind11\pybind11.h(1900): note: see declaration of 'pybind11::init'
python/fasttext_module/fasttext/pybind/fasttextpybind.cc(171): error C2672: 'pybind11::class
note: This error originates from a subprocess, and is likely not a problem with pip. error: legacy-install-failure
× Encountered error while trying to install package. ╰─> fasttext
note: This is an issue with the package mentioned above, not pip. hint: See above for output from the failure.`
Has anybody experienced the same? How did you fix it?
I am getting the same error. If anybody knows how to solve it then please let us know!
I am getting the same error. If anybody knows how to solve it then please let us know!
+1
Download the wheel from https://www.lfd.uci.edu/~gohlke/pythonlibs/#fasttext and then install it using pip install <.whl file>
This worked for me: pip install fasttext-wheel (or pip3 install fasttext-wheel) https://pypi.org/project/fasttext-wheel/
yes it really worked for me, thanks
This worked for me: pip install fasttext-wheel (or pip3 install fasttext-wheel) https://pypi.org/project/fasttext-wheel/
Please elaborate on how to use it to solve the above errors.
I pip installed fastText yesterday without any issues. When I tried the same today, it failed with the following error: "error: command 'gcc' failed with exit status 1". I assume it's related to the latest release of version 0.9.2. Everything works as expected when I execute 'pip install fasttext==0.9.1' instead.