我正在尝试在Ubuntu中安装Python Ta-Lib,但是当我运行:
pip install TA-Lib我得到了这个错误:
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-YfCSFn/TA-Lib/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-swmI7D-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-YfCSFn/TA-Lib/我已经安装了:
sudo apt-get install python3-dev并安装了Ta-lib
我该如何解决这个问题呢?
发布于 2017-07-31 09:13:06
看起来其他人也有this problem。
引用被接受的答案:
根据错误中的“
setuptools”,您的PiP似乎无法访问Setuptools。先尝试下面的命令,然后再次尝试运行pip安装。
> sudo pip install -U setuptools或者如果引用他的评论不起作用:
试试这个'sudo -H pip install TA-Lib‘
正如Filipe Ferminiano在评论中所说的那样,如果这仍然不能解决它,那么你可以尝试this link上所说的。
再次引用被接受的答案:
Your sudo is not getting the right python. This is a known behaviour of sudo in Ubuntu. See this question for more info. You need to make sure that sudo calls the right python, either by using the full path:
sudo /usr/local/epd/bin/python setup.py install或执行以下操作(在bash中):
alias sudo='sudo env PATH=$PATH'
sudo python setup.py install这就是问题he's talking about
如果一个被接受的答案解决了你的问题,请将其归功于它。
发布于 2018-01-21 02:35:33
我是能够在python3中加载。
步骤:
从http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz
tar -xvf ta-lib-0.4.0-src.tar.gz
cd /../ta-lib
./configure --prefix=/usr
make
sudo make install
sudo apt upgrade
pip install ta-lib或pip install TA-Lib
import talib下载
https://stackoverflow.com/questions/45406213
复制相似问题