smartapi is not getting installed
-
hello,
i am trying to install library that is,pip install smartapi
but its showing some error,
code_textPS D:\new> pip install smartapi Collecting smartapi Using cached SmartAPI-1.1.0-py3-none-any.whl Collecting rdflib (from smartapi) Using cached rdflib-7.0.0-py3-none-any.whl.metadata (11 kB) Collecting rdflib-jsonld (from smartapi) Using cached rdflib_jsonld-0.6.2-py2.py3-none-any.whl.metadata (3.4 kB) Collecting simplejson (from smartapi) Using cached simplejson-3.19.2-cp312-cp312-win_amd64.whl.metadata (3.2 kB) Requirement already satisfied: pytz in c:\users\www.abcom.in\appdata\local\programs\python\python312\lib\site-packages (from smartapi) (2023.3.post1) Requirement already satisfied: python-dateutil in c:\users\www.abcom.in\appdata\local\programs\python\python312\lib\site-packages (from smartapi) (2.8.2) Collecting PyCrypto (from smartapi) Using cached pycrypto-2.6.1.tar.gz (446 kB) Preparing metadata (setup.py) ... done Collecting isodate (from smartapi) Using cached isodate-0.6.1-py2.py3-none-any.whl.metadata (9.6 kB) Requirement already satisfied: six in c:\users\www.abcom.in\appdata\local\programs\python\python312\lib\site-packages (from isodate->smartapi) (1.16.0) Requirement already satisfied: pyparsing<4,>=2.1.0 in c:\users\www.abcom.in\appdata\local\programs\python\python312\lib\site-packages (from rdflib->smartapi) (3.1.1) Using cached isodate-0.6.1-py2.py3-none-any.whl (41 kB) Using cached rdflib-7.0.0-py3-none-any.whl (531 kB) Using cached rdflib_jsonld-0.6.2-py2.py3-none-any.whl (4.0 kB) Using cached simplejson-3.19.2-cp312-cp312-win_amd64.whl (75 kB) Building wheels for collected packages: PyCrypto Building wheel for PyCrypto (setup.py) ... error error: subprocess-exited-with-error × python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [2 lines of output] warning: GMP or MPIR library not found; Not building Crypto.PublicKey._fastmath. error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/ [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for PyCrypto Running setup.py clean for PyCrypto Failed to build PyCrypto
please guide me.
Thankyou.
Rajat Mishra. -
Hello @mst_rajatmishra
This is how it's should work
https://github.com/angel-one/smartapi-pythonRegards,
SmartAPI Team -
Hii @Moderator_3
Showing this.
literally very confusingPS D:\new> pip uninstall smartapi WARNING: Skipping smartapi as it is not installed. PS D:\new> pip install smartapi-python Requirement already satisfied: smartapi-python in c:\users\www.abcom.in\appdata\local\programs\python\python312\lib\site-packages (1.4.8) Requirement already satisfied: requests>=2.18.4 in c:\users\www.abcom.in\appdata\local\programs\python\python312\lib\site-packages (from smartapi-python) (2.31.0) Requirement already satisfied: six>=1.11.0 in c:\users\www.abcom.in\appdata\local\programs\python\python312\lib\site-packages (from smartapi-python) (1.16.0) Requirement already satisfied: python-dateutil>=2.6.1 in c:\users\www.abcom.in\appdata\local\programs\python\python312\lib\site-packages (from smartapi-python) (2.8.2) Requirement already satisfied: charset-normalizer<4,>=2 in c:\users\www.abcom.in\appdata\local\programs\python\python312\lib\site-packages (from requests>=2.18.4->smartapi-python) (3.3.2) Requirement already satisfied: idna<4,>=2.5 in c:\users\www.abcom.in\appdata\local\programs\python\python312\lib\site-packages (from requests>=2.18.4->smartapi-python) (3.6) Requirement already satisfied: urllib3<3,>=1.21.1 in c:\users\www.abcom.in\appdata\local\programs\python\python312\lib\site-packages (from requests>=2.18.4->smartapi-python) (2.1.0) Requirement already satisfied: certifi>=2017.4.17 in c:\users\www.abcom.in\appdata\local\programs\python\python312\lib\site-packages (from requests>=2.18.4->smartapi-python) (2023.5.7)
Thank you
Rajat Mishra -
Hello @mst_rajatmishra
1- Can you please unistall the smartAPI with the below command
pip uninstall smartapi
2- Then reinstall smartAPI with the below command.
pip install smartapi-pythonReagrds,
SmartAPI Team -
Hii @Moderator_1
when i am running pip install smartapi its showing the above error and when i am running
pip install smartapi-python
its just showing
Requirement already satisfied: smartapi-python in c:\users\www.abcom.in\appdata\local\programs\python\python312\lib\site-packages (1.4.8) Requirement already satisfied: requests>=2.18.4 in c:\users\www.abcom.in\appdata\local\programs\python\python312\lib\site-packages (from smartapi-python) (2.31.0) Requirement already satisfied: six>=1.11.0 in c:\users\www.abcom.in\appdata\local\programs\python\python312\lib\site-packages (from smartapi-python) (1.16.0) Requirement already satisfied: python-dateutil>=2.6.1 in c:\users\www.abcom.in\appdata\local\programs\python\python312\lib\site-packages (from smartapi-python) (2.8.2) Requirement already satisfied: charset-normalizer<4,>=2 in c:\users\www.abcom.in\appdata\local\programs\python\python312\lib\site-packages (from requests>=2.18.4->smartapi-python) (3.3.2) Requirement already satisfied: idna<4,>=2.5 in c:\users\www.abcom.in\appdata\local\programs\python\python312\lib\site-packages (from requests>=2.18.4->smartapi-python) (3.6) Requirement already satisfied: urllib3<3,>=1.21.1 in c:\users\www.abcom.in\appdata\local\programs\python\python312\lib\site-packages (from requests>=2.18.4->smartapi-python) (2.1.0) Requirement already satisfied: certifi>=2017.4.17 in c:\users\www.abcom.in\appdata\local\programs\python\python312\lib\site-packages (from requests>=2.18.4->smartapi-python) (2023.5.7)
but then after running program its showing
from smartapi import SmartConnect ModuleNotFoundError: No module named 'smartapi'
Please Help in finding Problem.
Thankyou.
Rajat Mishra -
Hi @mst_rajatmishra,
Please use the below command instead:
pip install smartapi-python
Regards
SmartAPI Team