Open DeWaRs1206 opened 2 years ago
Probably this is related to my including the cython generated C files in the repository.
I suspect you can install from sources, possibly making new C files like this:
$ make cython $ make install
On Jul 25, 2022, at 5:20 PM, Emmanuel Iturbide @.***> wrote:
Hello,
I have an issue installing ta-lib on Ubuntu 18.04 running Python3.7. Since numpy 1.22.0, python 3.7 is not supported anymore. Installing TA-Lib using python3.7 -m pip install ta-lib fail with the following error:
22 35.43 × python setup.py egg_info did not run successfully.
22 35.43 │ exit code: 1
22 35.43 ╰─> [69 lines of output]
22 35.43 Traceback (most recent call last):
22 35.43 File "/home/ipaidthat/ipaidthat/virtualenv/lib/python3.7/site-packages/setuptools/sandbox.py", line 154, in save_modules
22 35.43 yield saved
22 35.43 File "/home/ipaidthat/ipaidthat/virtualenv/lib/python3.7/site-packages/setuptools/sandbox.py", line 195, in setup_context
22 35.43 yield
22 35.43 File "/home/ipaidthat/ipaidthat/virtualenv/lib/python3.7/site-packages/setuptools/sandbox.py", line 250, in run_setup
22 35.43 _execfile(setup_script, ns)
22 35.43 File "/home/ipaidthat/ipaidthat/virtualenv/lib/python3.7/site-packages/setuptools/sandbox.py", line 45, in _execfile
22 35.43 exec(code, globals, locals)
22 35.43 File "/tmp/easy_install-w16fzpau/numpy-1.23.1/setup.py", line 39, in
22 35.43 '/opt/local/lib',
22 35.43 RuntimeError: Python version >= 3.8 required.
22 35.43
22 35.43 During handling of the above exception, another exception occurred:
22 35.43
22 35.43 Traceback (most recent call last):
22 35.43 File "
", line 36, in 22 35.43 File "
", line 34, in 22 35.43 File "/tmp/pip-install-37w8pv_f/ta-lib_193ef70f3e0d407db9633f7ab6149049/setup.py", line 170, in
22 35.43 **requires)
22 35.43 File "/home/ipaidthat/ipaidthat/virtualenv/lib/python3.7/site-packages/setuptools/init.py", line 128, in setup
22 35.43 _install_setup_requires(attrs)
22 35.43 File "/home/ipaidthat/ipaidthat/virtualenv/lib/python3.7/site-packages/setuptools/init.py", line 123, in _install_setup_requires
22 35.43 dist.fetch_build_eggs(dist.setup_requires)
22 35.43 File "/home/ipaidthat/ipaidthat/virtualenv/lib/python3.7/site-packages/setuptools/dist.py", line 513, in fetch_build_eggs
22 35.43 replace_conflicting=True,
22 35.43 File "/home/ipaidthat/ipaidthat/virtualenv/lib/python3.7/site-packages/pkg_resources/init.py", line 774, in resolve
22 35.43 replace_conflicting=replace_conflicting
22 35.43 File "/home/ipaidthat/ipaidthat/virtualenv/lib/python3.7/site-packages/pkg_resources/init.py", line 1057, in best_match
22 35.43 return self.obtain(req, installer)
22 35.43 File "/home/ipaidthat/ipaidthat/virtualenv/lib/python3.7/site-packages/pkg_resources/init.py", line 1069, in obtain
22 35.43 return installer(requirement)
22 35.43 File "/home/ipaidthat/ipaidthat/virtualenv/lib/python3.7/site-packages/setuptools/dist.py", line 580, in fetch_build_egg
22 35.43 return cmd.easy_install(req)
22 35.43 File "/home/ipaidthat/ipaidthat/virtualenv/lib/python3.7/site-packages/setuptools/command/easy_install.py", line 698, in easy_install
22 35.43 return self.install_item(spec, dist.location, tmpdir, deps)
22 35.43 File "/home/ipaidthat/ipaidthat/virtualenv/lib/python3.7/site-packages/setuptools/command/easy_install.py", line 724, in install_item
22 35.43 dists = self.install_eggs(spec, download, tmpdir)
22 35.43 File "/home/ipaidthat/ipaidthat/virtualenv/lib/python3.7/site-packages/setuptools/command/easy_install.py", line 909, in install_eggs
22 35.43 return self.build_and_install(setup_script, setup_base)
22 35.43 File "/home/ipaidthat/ipaidthat/virtualenv/lib/python3.7/site-packages/setuptools/command/easy_install.py", line 1177, in build_and_install
22 35.43 self.run_setup(setup_script, setup_base, args)
22 35.43 File "/home/ipaidthat/ipaidthat/virtualenv/lib/python3.7/site-packages/setuptools/command/easy_install.py", line 1163, in run_setup
22 35.43 run_setup(setup_script, args)
22 35.43 File "/home/ipaidthat/ipaidthat/virtualenv/lib/python3.7/site-packages/setuptools/sandbox.py", line 253, in run_setup
22 35.43 raise
22 35.43 File "/usr/lib/python3.7/contextlib.py", line 130, in exit
22 35.43 self.gen.throw(type, value, traceback)
22 35.43 File "/home/ipaidthat/ipaidthat/virtualenv/lib/python3.7/site-packages/setuptools/sandbox.py", line 195, in setup_context
22 35.43 yield
22 35.43 File "/usr/lib/python3.7/contextlib.py", line 130, in exit
22 35.43 self.gen.throw(type, value, traceback)
22 35.43 File "/home/ipaidthat/ipaidthat/virtualenv/lib/python3.7/site-packages/setuptools/sandbox.py", line 166, in save_modules
22 35.43 saved_exc.resume()
22 35.43 File "/home/ipaidthat/ipaidthat/virtualenv/lib/python3.7/site-packages/setuptools/sandbox.py", line 141, in resume
22 35.43 six.reraise(type, exc, self._tb)
22 35.43 File "/home/ipaidthat/ipaidthat/virtualenv/lib/python3.7/site-packages/setuptools/_vendor/six.py", line 685, in reraise
22 35.43 raise value.with_traceback(tb)
22 35.43 File "/home/ipaidthat/ipaidthat/virtualenv/lib/python3.7/site-packages/setuptools/sandbox.py", line 154, in save_modules
22 35.43 yield saved
22 35.43 File "/home/ipaidthat/ipaidthat/virtualenv/lib/python3.7/site-packages/setuptools/sandbox.py", line 195, in setup_context
22 35.43 yield
22 35.43 File "/home/ipaidthat/ipaidthat/virtualenv/lib/python3.7/site-packages/setuptools/sandbox.py", line 250, in run_setup
22 35.43 _execfile(setup_script, ns)
22 35.43 File "/home/ipaidthat/ipaidthat/virtualenv/lib/python3.7/site-packages/setuptools/sandbox.py", line 45, in _execfile
22 35.43 exec(code, globals, locals)
22 35.43 File "/tmp/easy_install-w16fzpau/numpy-1.23.1/setup.py", line 39, in
22 35.43 '/opt/local/lib',
22 35.43 RuntimeError: Python version >= 3.8 required.
Is there a way specify the version of numpy which should be use during the installation ?
Switching to Python 3.8 isn't an option yet for me.
Thanks for your help.
DeWaRs
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.
@mrjbq7 thanks for your quick answer. Unfortunately, I don't really understand it.
I try to run these commands from the ta-lib pip code source, the ta-lib source folder, cython source folder, but I always get
(virtualenv) root@f5dedc0e326d:/home/ipaidthat/cython# make cython
make: *** No rule to make target 'cython'. Stop.
Could you please elaborate a bit ?
Thanks in advance.
This project's source code:
$ git clone https://github.com/mrjbq7/ta-lib.git
$ cd ta-lib
$ make cython
$ make install
Those last two are conveniences in the Makefile for:
cython --directive emit_code_comments=False talib/_ta_lib.pyx
And
python3 setup.py install
No luck :(
(virtualenv) root@f5dedc0e326d:/home/manu# git clone https://github.com/mrjbq7/ta-lib.git
Cloning into 'ta-lib'...
remote: Enumerating objects: 2301, done.
remote: Counting objects: 100% (7/7), done.
remote: Compressing objects: 100% (7/7), done.
remote: Total 2301 (delta 1), reused 1 (delta 0), pack-reused 2294
Receiving objects: 100% (2301/2301), 11.65 MiB | 6.04 MiB/s, done.
Resolving deltas: 100% (1415/1415), done.
(virtualenv) root@f5dedc0e326d:/home/manu# cd ta-lib
(virtualenv) root@f5dedc0e326d:/home/manu/ta-lib# ls
AUTHORS COPYRIGHT Dockerfile MANIFEST.in README.md requirements.txt requirements_test.txt talib
CHANGELOG DEVELOPMENT LICENSE Makefile docs requirements_dev.txt setup.py tools
(virtualenv) root@f5dedc0e326d:/home/manu/ta-lib# pip install cython
Collecting cython
Downloading Cython-0.29.30-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl (1.9 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.9/1.9 MB 9.1 MB/s eta 0:00:00
Installing collected packages: cython
Successfully installed cython-0.29.30
(virtualenv) root@f5dedc0e326d:/home/manu/ta-lib# make cython
cython --directive emit_code_comments=False talib/_ta_lib.pyx
(virtualenv) root@f5dedc0e326d:/home/manu/ta-lib# make install
python3 setup.py install
Traceback (most recent call last):
File "/home/manu/manu/virtualenv/lib/python3.7/site-packages/setuptools/sandbox.py", line 154, in save_modules
yield saved
File "/home/manu/manu/virtualenv/lib/python3.7/site-packages/setuptools/sandbox.py", line 195, in setup_context
yield
File "/home/manu/manu/virtualenv/lib/python3.7/site-packages/setuptools/sandbox.py", line 250, in run_setup
_execfile(setup_script, ns)
File "/home/manu/manu/virtualenv/lib/python3.7/site-packages/setuptools/sandbox.py", line 45, in _execfile
exec(code, globals, locals)
File "/tmp/easy_install-3bm0fh4q/numpy-1.23.1/setup.py", line 39, in <module>
'/usr/local/lib64',
RuntimeError: Python version >= 3.8 required.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "setup.py", line 185, in <module>
**requires)
File "/home/manu/manu/virtualenv/lib/python3.7/site-packages/setuptools/__init__.py", line 128, in setup
_install_setup_requires(attrs)
File "/home/manu/manu/virtualenv/lib/python3.7/site-packages/setuptools/__init__.py", line 123, in _install_setup_requires
dist.fetch_build_eggs(dist.setup_requires)
File "/home/manu/manu/virtualenv/lib/python3.7/site-packages/setuptools/dist.py", line 513, in fetch_build_eggs
replace_conflicting=True,
File "/home/manu/manu/virtualenv/lib/python3.7/site-packages/pkg_resources/__init__.py", line 774, in resolve
replace_conflicting=replace_conflicting
File "/home/manu/manu/virtualenv/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1057, in best_match
return self.obtain(req, installer)
File "/home/manu/manu/virtualenv/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1069, in obtain
return installer(requirement)
File "/home/manu/manu/virtualenv/lib/python3.7/site-packages/setuptools/dist.py", line 580, in fetch_build_egg
return cmd.easy_install(req)
File "/home/manu/manu/virtualenv/lib/python3.7/site-packages/setuptools/command/easy_install.py", line 698, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "/home/manu/manu/virtualenv/lib/python3.7/site-packages/setuptools/command/easy_install.py", line 724, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "/home/manu/manu/virtualenv/lib/python3.7/site-packages/setuptools/command/easy_install.py", line 909, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "/home/manu/manu/virtualenv/lib/python3.7/site-packages/setuptools/command/easy_install.py", line 1177, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "/home/manu/manu/virtualenv/lib/python3.7/site-packages/setuptools/command/easy_install.py", line 1163, in run_setup
run_setup(setup_script, args)
File "/home/manu/manu/virtualenv/lib/python3.7/site-packages/setuptools/sandbox.py", line 253, in run_setup
raise
File "/usr/lib/python3.7/contextlib.py", line 130, in __exit__
self.gen.throw(type, value, traceback)
File "/home/manu/manu/virtualenv/lib/python3.7/site-packages/setuptools/sandbox.py", line 195, in setup_context
yield
File "/usr/lib/python3.7/contextlib.py", line 130, in __exit__
self.gen.throw(type, value, traceback)
File "/home/manu/manu/virtualenv/lib/python3.7/site-packages/setuptools/sandbox.py", line 166, in save_modules
saved_exc.resume()
File "/home/manu/manu/virtualenv/lib/python3.7/site-packages/setuptools/sandbox.py", line 141, in resume
six.reraise(type, exc, self._tb)
File "/home/manu/manu/virtualenv/lib/python3.7/site-packages/setuptools/_vendor/six.py", line 685, in reraise
raise value.with_traceback(tb)
File "/home/manu/manu/virtualenv/lib/python3.7/site-packages/setuptools/sandbox.py", line 154, in save_modules
yield saved
File "/home/manu/manu/virtualenv/lib/python3.7/site-packages/setuptools/sandbox.py", line 195, in setup_context
yield
File "/home/manu/manu/virtualenv/lib/python3.7/site-packages/setuptools/sandbox.py", line 250, in run_setup
_execfile(setup_script, ns)
File "/home/manu/manu/virtualenv/lib/python3.7/site-packages/setuptools/sandbox.py", line 45, in _execfile
exec(code, globals, locals)
File "/tmp/easy_install-3bm0fh4q/numpy-1.23.1/setup.py", line 39, in <module>
'/usr/local/lib64',
RuntimeError: Python version >= 3.8 required.
Makefile:7: recipe for target 'install' failed
make: *** [install] Error 1
(virtualenv) root@f5dedc0e326d:/home/manu/ta-lib#
Did I miss something ?
EDIT: update the console output as one error was misleading
My workaround for now is the following:
Install cython
pip3.7 install cython
Fix the version of numpy to 1.21.6 in setup.py
sed -i 's/\"numpy\"/\"numpy==1.21.6\"/' setup.py
Run the installation:
python3 setup.py install
Your error is because your environment doesn’t have cython.
make: cython: Command not found
On Jul 26, 2022, at 1:56 PM, Emmanuel Iturbide @.***> wrote:
No luck :(
(virtualenv) @.***:/home/manu# git clone https://github.com/mrjbq7/ta-lib.git Cloning into 'ta-lib'... remote: Enumerating objects: 2301, done. remote: Counting objects: 100% (7/7), done. remote: Compressing objects: 100% (7/7), done. remote: Total 2301 (delta 1), reused 1 (delta 0), pack-reused 2294 Receiving objects: 100% (2301/2301), 11.65 MiB | 6.04 MiB/s, done. Resolving deltas: 100% (1415/1415), done.
(virtualenv) @.***:/home/manu# cd ta-lib
(virtualenv) @.***:/home/manu/ta-lib# ls AUTHORS COPYRIGHT Dockerfile MANIFEST.in README.md requirements.txt requirements_test.txt talib CHANGELOG DEVELOPMENT LICENSE Makefile docs requirements_dev.txt setup.py tools
(virtualenv) @.:/home/manu/ta-lib# make cython cython --directive emit_code_comments=False talib/_ta_lib.pyx make: cython: Command not found Makefile:18: recipe for target 'cython' failed make: [cython] Error 127
(virtualenv) @.***:/home/manu/ta-lib# pip install cython Collecting cython Downloading Cython-0.29.30-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl (1.9 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.9/1.9 MB 9.1 MB/s eta 0:00:00 Installing collected packages: cython Successfully installed cython-0.29.30
(virtualenv) @.***:/home/manu/ta-lib# make cython cython --directive emit_code_comments=False talib/_ta_lib.pyx
(virtualenv) @.***:/home/manu/ta-lib# make install python3 setup.py install Traceback (most recent call last): File "/home/manu/manu/virtualenv/lib/python3.7/site-packages/setuptools/sandbox.py", line 154, in save_modules yield saved File "/home/manu/manu/virtualenv/lib/python3.7/site-packages/setuptools/sandbox.py", line 195, in setup_context yield File "/home/manu/manu/virtualenv/lib/python3.7/site-packages/setuptools/sandbox.py", line 250, in run_setup _execfile(setup_script, ns) File "/home/manu/manu/virtualenv/lib/python3.7/site-packages/setuptools/sandbox.py", line 45, in _execfile exec(code, globals, locals) File "/tmp/easy_install-3bm0fh4q/numpy-1.23.1/setup.py", line 39, in
'/usr/local/lib64', RuntimeError: Python version >= 3.8 required. During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "setup.py", line 185, in
requires) File "/home/manu/manu/virtualenv/lib/python3.7/site-packages/setuptools/init.py", line 128, in setup _install_setup_requires(attrs) File "/home/manu/manu/virtualenv/lib/python3.7/site-packages/setuptools/init.py", line 123, in _install_setup_requires dist.fetch_build_eggs(dist.setup_requires) File "/home/manu/manu/virtualenv/lib/python3.7/site-packages/setuptools/dist.py", line 513, in fetch_build_eggs replace_conflicting=True, File "/home/manu/manu/virtualenv/lib/python3.7/site-packages/pkg_resources/init.py", line 774, in resolve replace_conflicting=replace_conflicting File "/home/manu/manu/virtualenv/lib/python3.7/site-packages/pkg_resources/init.py", line 1057, in best_match return self.obtain(req, installer) File "/home/manu/manu/virtualenv/lib/python3.7/site-packages/pkg_resources/init.py", line 1069, in obtain return installer(requirement) File "/home/manu/manu/virtualenv/lib/python3.7/site-packages/setuptools/dist.py", line 580, in fetch_build_egg return cmd.easy_install(req) File "/home/manu/manu/virtualenv/lib/python3.7/site-packages/setuptools/command/easy_install.py", line 698, in easy_install return self.install_item(spec, dist.location, tmpdir, deps) File "/home/manu/manu/virtualenv/lib/python3.7/site-packages/setuptools/command/easy_install.py", line 724, in install_item dists = self.install_eggs(spec, download, tmpdir) File "/home/manu/manu/virtualenv/lib/python3.7/site-packages/setuptools/command/easy_install.py", line 909, in install_eggs return self.build_and_install(setup_script, setup_base) File "/home/manu/manu/virtualenv/lib/python3.7/site-packages/setuptools/command/easy_install.py", line 1177, in build_and_install self.run_setup(setup_script, setup_base, args) File "/home/manu/manu/virtualenv/lib/python3.7/site-packages/setuptools/command/easy_install.py", line 1163, in run_setup run_setup(setup_script, args) File "/home/manu/manu/virtualenv/lib/python3.7/site-packages/setuptools/sandbox.py", line 253, in run_setup raise File "/usr/lib/python3.7/contextlib.py", line 130, in exit self.gen.throw(type, value, traceback) File "/home/manu/manu/virtualenv/lib/python3.7/site-packages/setuptools/sandbox.py", line 195, in setup_context yield File "/usr/lib/python3.7/contextlib.py", line 130, in exit self.gen.throw(type, value, traceback) File "/home/manu/manu/virtualenv/lib/python3.7/site-packages/setuptools/sandbox.py", line 166, in save_modules saved_exc.resume() File "/home/manu/manu/virtualenv/lib/python3.7/site-packages/setuptools/sandbox.py", line 141, in resume six.reraise(type, exc, self._tb) File "/home/manu/manu/virtualenv/lib/python3.7/site-packages/setuptools/_vendor/six.py", line 685, in reraise raise value.with_traceback(tb) File "/home/manu/manu/virtualenv/lib/python3.7/site-packages/setuptools/sandbox.py", line 154, in save_modules yield saved File "/home/manu/manu/virtualenv/lib/python3.7/site-packages/setuptools/sandbox.py", line 195, in setup_context yield File "/home/manu/manu/virtualenv/lib/python3.7/site-packages/setuptools/sandbox.py", line 250, in run_setup _execfile(setup_script, ns) File "/home/manu/manu/virtualenv/lib/python3.7/site-packages/setuptools/sandbox.py", line 45, in _execfile exec(code, globals, locals) File "/tmp/easy_install-3bm0fh4q/numpy-1.23.1/setup.py", line 39, in '/usr/local/lib64', RuntimeError: Python version >= 3.8 required. Makefile:7: recipe for target 'install' failed make: ** [install] Error 1 (virtualenv) @.:/home/manu/ta-lib# Did I miss something ?— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.
Yes, but after installing cython, I have the same error related to python 3.8
That’s strange to me since I test in python 3.6 and above:
https://github.com/mrjbq7/ta-lib/blob/master/.github/workflows/tests.yml
On Jul 26, 2022, at 2:50 PM, Emmanuel Iturbide @.***> wrote:
Yes, but after installing cython, I have the same error related to python 3.8
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.
Hello,
I have an issue installing ta-lib on Ubuntu 18.04 running Python3.7. Since numpy 1.22.0, python 3.7 is not supported anymore. Installing TA-Lib using
python3.7 -m pip install ta-lib
fail with the following error:Is there a way specify the version of numpy which should be use during the installation ?
Switching to Python 3.8 isn't an option yet for me.
Thanks for your help.
DeWaRs