I am getting following error while trying to install kiteconnect. Could you please suggest what could be done to fix it? Python 3.8.5 (default, Sep 4 2020, 07:30:14)
pip install kiteconnect Collecting kiteconnect Downloading kiteconnect-3.8.2.tar.gz (24 kB) Collecting requests>=2.18.4 Downloading requests-2.25.0-py2.py3-none-any.whl (61 kB) |████████████████████████████████| 61 kB 732 kB/s Requirement already satisfied: six>=1.11.0 in ./anaconda3/envs/Trade/lib/python3.8/site-packages (from kiteconnect) (1.15.0) Requirement already satisfied: pyOpenSSL>=17.5.0 in ./anaconda3/envs/Trade/lib/python3.8/site-packages (from kiteconnect) (19.1.0) Collecting enum34>=1.1.6 Downloading enum34-1.1.10-py3-none-any.whl (11 kB) Collecting python-dateutil>=2.6.1 Downloading python_dateutil-2.8.1-py2.py3-none-any.whl (227 kB) |████████████████████████████████| 227 kB 812 kB/s Collecting autobahn[twisted]>=17.10.1 Downloading autobahn-20.7.1-py2.py3-none-any.whl (1.5 MB) |████████████████████████████████| 1.5 MB 1.7 MB/s Collecting urllib3<1.27,>=1.21.1 Downloading urllib3-1.26.2-py2.py3-none-any.whl (136 kB) |████████████████████████████████| 136 kB 2.1 MB/s Collecting chardet<4,>=3.0.2 Downloading chardet-3.0.4-py2.py3-none-any.whl (133 kB) |████████████████████████████████| 133 kB 2.0 MB/s Requirement already satisfied: idna<3,>=2.5 in ./anaconda3/envs/Trade/lib/python3.8/site-packages (from requests>=2.18.4->kiteconnect) (2.10) Requirement already satisfied: certifi>=2017.4.17 in ./anaconda3/envs/Trade/lib/python3.8/site-packages (from requests>=2.18.4->kiteconnect) (2020.11.8) Requirement already satisfied: cryptography>=2.8 in ./anaconda3/envs/Trade/lib/python3.8/site-packages (from pyOpenSSL>=17.5.0->kiteconnect) (3.2.1) Collecting txaio>=20.3.1 Downloading txaio-20.4.1-py2.py3-none-any.whl (30 kB) Requirement already satisfied: twisted>=20.3.0; extra == "twisted" in ./anaconda3/envs/Trade/lib/python3.8/site-packages (from autobahn[twisted]>=17.10.1->kiteconnect) (20.3.0) Requirement already satisfied: zope.interface>=3.6.0; extra == "twisted" in ./anaconda3/envs/Trade/lib/python3.8/site-packages (from autobahn[twisted]>=17.10.1->kiteconnect) (5.1.2) Requirement already satisfied: attrs>=19.2.0; extra == "twisted" in ./anaconda3/envs/Trade/lib/python3.8/site-packages (from autobahn[twisted]>=17.10.1->kiteconnect) (20.3.0) Requirement already satisfied: cffi!=1.11.3,>=1.8 in ./anaconda3/envs/Trade/lib/python3.8/site-packages (from cryptography>=2.8->pyOpenSSL>=17.5.0->kiteconnect) (1.14.3) Requirement already satisfied: Automat>=0.3.0 in ./anaconda3/envs/Trade/lib/python3.8/site-packages (from twisted>=20.3.0; extra == "twisted"->autobahn[twisted]>=17.10.1->kiteconnect) (20.2.0) Requirement already satisfied: hyperlink>=17.1.1 in ./anaconda3/envs/Trade/lib/python3.8/site-packages (from twisted>=20.3.0; extra == "twisted"->autobahn[twisted]>=17.10.1->kiteconnect) (20.0.1) Requirement already satisfied: constantly>=15.1 in ./anaconda3/envs/Trade/lib/python3.8/site-packages (from twisted>=20.3.0; extra == "twisted"->autobahn[twisted]>=17.10.1->kiteconnect) (15.1.0) Requirement already satisfied: incremental>=16.10.1 in ./anaconda3/envs/Trade/lib/python3.8/site-packages (from twisted>=20.3.0; extra == "twisted"->autobahn[twisted]>=17.10.1->kiteconnect) (17.5.0) Requirement already satisfied: PyHamcrest!=1.10.0,>=1.9.0 in ./anaconda3/envs/Trade/lib/python3.8/site-packages (from twisted>=20.3.0; extra == "twisted"->autobahn[twisted]>=17.10.1->kiteconnect) (2.0.2) Requirement already satisfied: setuptools in ./anaconda3/envs/Trade/lib/python3.8/site-packages (from zope.interface>=3.6.0; extra == "twisted"->autobahn[twisted]>=17.10.1->kiteconnect) (50.3.1.post20201107) Requirement already satisfied: pycparser in ./anaconda3/envs/Trade/lib/python3.8/site-packages (from cffi!=1.11.3,>=1.8->cryptography>=2.8->pyOpenSSL>=17.5.0->kiteconnect) (2.20) Building wheels for collected packages: kiteconnect Building wheel for kiteconnect (setup.py) ... done WARNING: Legacy build of wheel for 'kiteconnect' created no files. Command arguments: /home/tatis/anaconda3/envs/Trade/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-sjpg6jp3/kiteconnect/setup.py'"'"'; __file__='"'"'/tmp/pip-install-sjpg6jp3/kiteconnect/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-lbwtts0q Command output: [use --verbose to show] Running setup.py clean for kiteconnect Failed to build kiteconnect Installing collected packages: urllib3, chardet, requests, enum34, python-dateutil, txaio, autobahn, kiteconnect Running setup.py install for kiteconnect ... done DEPRECATION: kiteconnect was installed using the legacy 'setup.py install' method, because a wheel could not be built for it. pip 21.0 will remove support for this functionality. A possible replacement is to fix the wheel build issue reported above. You can find discussion regarding this at https://github.com/pypa/pip/issues/8368. Successfully installed autobahn-20.7.1 chardet-3.0.4 enum34-1.1.10 kiteconnect-3.8.2 python-dateutil-2.8.1 requests-2.25.0 txaio-20.4.1 urllib3-1.26.2
It's because on a windows machine we require a certain version of the visual c++ compiler for Twisted to work. Get precompiled whl from https://www.lfd.uci.edu/~gohlke/pythonlibs/#twisted and install it. After Twisted is installed, kiteconnect will install without issues
We have removed external twisted download dependency in our new setup. You can just try installing the latest version using pip install --upgrade kiteconnect.
Very surprising to see why they can't make work simple command 'pip install kiteconnect'
Anyway, i had to reinstall my pc so found same problem 'kiteconnect not found', so followed below steps to solve, see if that helps you.
h. https://kite.trade/forum/discussion/7695/unable-to-install-twisted-on-python-3-8 - url was not found but told me some issue with twisted
i. To install twisted refer: https://stackoverflow.com/questions/57000214/how-do-i-pip-install-twisted-without-getting-an-error
j. It referred to url: download https://www.lfd.uci.edu/~gohlke/pythonlibs/#twisted Twisted-20.3.0-cp38-cp38-win32.whl
k. downloaded and installed as i have python 3.8.6
l. pip install Twisted-20.3.0-cp38-cp38-win32.whl
m. WORKED now: pip install kiteconnect
pip install --upgrade kiteconnect
.