-2

New to python but not to coding and just getting to grips with installing modules. Seem to get pretty far when installing ccxt with py -m pip install ccxt except it keeps throwing an error:

ERROR: Command errored out with exit status 1:
 command: 'C:\Users\samib\AppData\Local\Programs\Python\Python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\samib\\AppData\\Local\\Temp\\pip-install-7wa5a9m4\\pycares_61a5dda285624907b00263dfe14e0ed6\\setup.py'"'"'; __file__='"'"'C:\\Users\\samib\\AppData\\Local\\Temp\\pip-install-7wa5a9m4\\pycares_61a5dda285624907b00263dfe14e0ed6\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\samib\AppData\Local\Temp\pip-record-yolmpi02\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\samib\AppData\Local\Programs\Python\Python39\Include\pycares'
     cwd: C:\Users\samib\AppData\Local\Temp\pip-install-7wa5a9m4\pycares_61a5dda285624907b00263dfe14e0ed6\
Complete output (17 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
creating build\lib.win-amd64-3.9\pycares
copying src\pycares\errno.py -> build\lib.win-amd64-3.9\pycares
copying src\pycares\utils.py -> build\lib.win-amd64-3.9\pycares
copying src\pycares\_version.py -> build\lib.win-amd64-3.9\pycares
copying src\pycares\__init__.py -> build\lib.win-amd64-3.9\pycares
copying src\pycares\__main__.py -> build\lib.win-amd64-3.9\pycares
running build_ext
generating cffi module 'build\\temp.win-amd64-3.9\\Release\\_cares.c'
creating build\temp.win-amd64-3.9
creating build\temp.win-amd64-3.9\Release
building '_cares' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\samib\AppData\Local\Programs\Python\Python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\samib\\AppData\\Local\\Temp\\pip-install-7wa5a9m4\\pycares_61a5dda285624907b00263dfe14e0ed6\\setup.py'"'"'; __file__='"'"'C:\\Users\\samib\\AppData\\Local\\Temp\\pip-install-7wa5a9m4\\pycares_61a5dda285624907b00263dfe14e0ed6\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\samib\AppData\Local\Temp\pip-record-yolmpi02\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\samib\AppData\Local\Programs\Python\Python39\Include\pycares' Check the logs for full command output.

is anyone one with the machines and able to help me decipher this and hopefully help me fix the ish?

also getting this issue in the IDLE. my code reads import ccxt, print(ccxt.exchanges) and this is all im getting back:

Traceback (most recent call last):
  File "C:/Users/samib/Documents/arbbot.py", line 1, in <module>
    from ccxt import ccxt
  File "C:/Users/samib/Documents\ccxt\__init__.py", line 29, in <module>
    from ccxt.base.exchange import Exchange                     # noqa: F401
  File "C:/Users/samib/Documents\ccxt\base\__init__.py", line 24, in <module>
    from ccxt.base import exchange
  File "C:/Users/samib/Documents\ccxt\base\exchange.py", line 32, in <module>
    from cryptography.hazmat import backends
ModuleNotFoundError: No module named 'cryptography'
Chandan
  • 11,465
  • 1
  • 6
  • 25
Sam.D
  • 1
  • 1
  • 1

2 Answers2

0

As your error message says ModuleNotFoundError: No module named 'cryptography', I'd try to install that module:

pip install cryptography
zabop
  • 6,750
  • 3
  • 39
  • 84
0

to remove that Microsoft Visuallc++ error you wll have to install Build tools from https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=BuildTools&rel=16 and later you can do

pip install cryptography

As you can see it gets installed enter image description here

Sachin Rajput
  • 238
  • 7
  • 26