I have a question about the setup of gensim.
when I try to install the package with a specific version (in my case gensim==4.1.2) it looks like the Numpy dependency is trying to install it's latest version (currently 1.22.3)
This make a problem in a case I am trying to install the gensim==4.1.2 with python 3.7 but the Numpy package requires python 3.8 or higher.
I installed Numpy 1.21.4 but it's not enough, the package still trying to install the latest version.
I also tried to install the package without it's dependencies, but it didn't work.
Python packages usually install the specific version of the required dependency to avoid this kind of errors.
Collecting gensim==4.1.2 (from -r .\requirements.txt (line 16))
Using cached
https://files.pythonhosted.org/packages/4b/6d/22a9a2b934344fbf25ab2613543eeeb724ffd3ba7376e8fed88aabe885c8/gensim-4.1.2.tar.gz Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "c:\users\liron\documents\git crawler\gitcraler_test\git-crawler-gui\venv\lib\site-packages\setuptools\sandbox.py", line 154, in save_modules
yield saved
File "c:\users\liron\documents\git crawler\gitcraler_test\git-crawler-gui\venv\lib\site-packages\setuptools\sandbox.py", line 195, in setup_context
yield
File "c:\users\liron\documents\git crawler\gitcraler_test\git-crawler-gui\venv\lib\site-packages\setuptools\sandbox.py", line 250, in run_setup
_execfile(setup_script, ns)
File "c:\users\liron\documents\git crawler\gitcraler_test\git-crawler-gui\venv\lib\site-packages\setuptools\sandbox.py", line 45, in _execfile
exec(code, globals, locals)
File "C:\Users\liron\AppData\Local\Temp\easy_install-fonekmbv\numpy-1.22.3\setup.py", line 34, in <module>
'gensim.models.doc2vec_inner': 'gensim/models/doc2vec_inner.cpp',
RuntimeError: Python version >= 3.8 required.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\liron\AppData\Local\Temp\pip-install-2r_9imzr\gensim\setup.py", line 392, in <module>
include_package_data=True,
File "c:\users\liron\documents\git crawler\gitcraler_test\git-crawler-gui\venv\lib\site-packages\setuptools\__init__.py", line 144, in setup
_install_setup_requires(attrs)
File "c:\users\liron\documents\git crawler\gitcraler_test\git-crawler-gui\venv\lib\site-packages\setuptools\__init__.py", line 139, in _install_setup_requires
dist.fetch_build_eggs(dist.setup_requires)
File "c:\users\liron\documents\git crawler\gitcraler_test\git-crawler-gui\venv\lib\site-packages\setuptools\dist.py", line 724, in fetch_build_eggs
replace_conflicting=True,
File "c:\users\liron\documents\git crawler\gitcraler_test\git-crawler-gui\venv\lib\site-packages\pkg_resources\__init__.py", line 782, in resolve
replace_conflicting=replace_conflicting
File "c:\users\liron\documents\git crawler\gitcraler_test\git-crawler-gui\venv\lib\site-packages\pkg_resources\__init__.py", line 1065, in best_match
return self.obtain(req, installer)
File "c:\users\liron\documents\git crawler\gitcraler_test\git-crawler-gui\venv\lib\site-packages\pkg_resources\__init__.py", line 1077, in obtain
return installer(requirement)
File "c:\users\liron\documents\git crawler\gitcraler_test\git-crawler-gui\venv\lib\site-packages\setuptools\dist.py", line 791, in fetch_build_egg
return cmd.easy_install(req)
File "c:\users\liron\documents\git crawler\gitcraler_test\git-crawler-gui\venv\lib\site-packages\setuptools\command\easy_install.py", line 679, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "c:\users\liron\documents\git crawler\gitcraler_test\git-crawler-gui\venv\lib\site-packages\setuptools\command\easy_install.py", line 705, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "c:\users\liron\documents\git crawler\gitcraler_test\git-crawler-gui\venv\lib\site-packages\setuptools\command\easy_install.py", line 890, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "c:\users\liron\documents\git crawler\gitcraler_test\git-crawler-gui\venv\lib\site-packages\setuptools\command\easy_install.py", line 1158, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "c:\users\liron\documents\git crawler\gitcraler_test\git-crawler-gui\venv\lib\site-packages\setuptools\command\easy_install.py", line 1144, in run_setup
run_setup(setup_script, args)
File "c:\users\liron\documents\git crawler\gitcraler_test\git-crawler-gui\venv\lib\site-packages\setuptools\sandbox.py", line 253, in run_setup
raise
File "C:\Users\liron\AppData\Local\Programs\Python\Python37-32\lib\contextlib.py", line 130, in __exit__
self.gen.throw(type, value, traceback)
File "c:\users\liron\documents\git crawler\gitcraler_test\git-crawler-gui\venv\lib\site-packages\setuptools\sandbox.py", line 195, in setup_context
yield
File "C:\Users\liron\AppData\Local\Programs\Python\Python37-32\lib\contextlib.py", line 130, in __exit__
self.gen.throw(type, value, traceback)
File "c:\users\liron\documents\git crawler\gitcraler_test\git-crawler-gui\venv\lib\site-packages\setuptools\sandbox.py", line 166, in save_modules
saved_exc.resume()
File "c:\users\liron\documents\git crawler\gitcraler_test\git-crawler-gui\venv\lib\site-packages\setuptools\sandbox.py", line 141, in resume
six.reraise(type, exc, self._tb)
File "c:\users\liron\documents\git crawler\gitcraler_test\git-crawler-gui\venv\lib\site-packages\setuptools\_vendor\six.py", line 685, in reraise
raise value.with_traceback(tb)
File "c:\users\liron\documents\git crawler\gitcraler_test\git-crawler-gui\venv\lib\site-packages\setuptools\sandbox.py", line 154, in save_modules
yield saved
File "c:\users\liron\documents\git crawler\gitcraler_test\git-crawler-gui\venv\lib\site-packages\setuptools\sandbox.py", line 195, in setup_context
yield
File "c:\users\liron\documents\git crawler\gitcraler_test\git-crawler-gui\venv\lib\site-packages\setuptools\sandbox.py", line 250, in run_setup
_execfile(setup_script, ns)
File "c:\users\liron\documents\git crawler\gitcraler_test\git-crawler-gui\venv\lib\site-packages\setuptools\sandbox.py", line 45, in _execfile
exec(code, globals, locals)
File "C:\Users\liron\AppData\Local\Temp\easy_install-fonekmbv\numpy-1.22.3\setup.py", line 34, in <module>
'gensim.models.doc2vec_inner': 'gensim/models/doc2vec_inner.cpp',
RuntimeError: Python version >= 3.8 required.