zerodha / pykiteconnect

The official Python client library for the Kite Connect trading APIs
MIT License
979 stars 469 forks source link

Cannot install kite3 with --target option #42

Closed mintuhouse closed 2 years ago

mintuhouse commented 6 years ago

Need the below command to be working for deployment to AWS Lambda using serverless framework pip install --target <somepath> kiteconnect==3.7.0.b10

Running setup.py install for kiteconnect ... error
    Complete output from command /home/hasan/projects/personal/algotrading/sdtrade/serverless/venv/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-lu6bg_3b/kiteconnect/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-_bfgzwka/install-record.txt --single-version-externally-managed --compile --install-headers /home/hasan/projects/personal/algotrading/sdtrade/serverless/venv/include/site/python3.6/kiteconnect --home=/tmp/pip-target-3r_29h40:
    running install
    Checking .pth file support in /tmp/pip-target-3r_29h40/lib/python/
    /home/hasan/projects/personal/algotrading/sdtrade/serverless/venv/bin/python3 -E -c pass
    TEST FAILED: /tmp/pip-target-3r_29h40/lib/python/ does NOT support .pth files
    error: bad install directory or PYTHONPATH

....

I have found a few references mentioning that above error happens when you try to install a namespaced package (don't know if its relevant to kiteconnect)

Can you get the above command to work?

Note: It works with old version of kiteconnect and every other library numpy, pandas I tried

ranjanrak commented 3 years ago

I just tried the below install command using --target switch and it's working fine. pip install --target <somepath> kiteconnect==3.9.2