0

im trying to install machine using pip but i get error after error. after spending whole day still i have not any idea why its no working pip install machine

WARNING: Ignoring invalid distribution -ip (c:\python310\lib\site-packages)
WARNING: Ignoring invalid distribution - (c:\python310\lib\site-packages)
Collecting machine
  Using cached machine-0.0.1-py2.py3-none-any.whl (4.2 kB)
Collecting pycrypto
  Using cached pycrypto-2.6.1.tar.gz (446 kB)
  Preparing metadata (setup.py) ... done
Using legacy 'setup.py install' for pycrypto, since package 'wheel' is not installed.
WARNING: Ignoring invalid distribution -ip (c:\python310\lib\site-packages)
WARNING: Ignoring invalid distribution - (c:\python310\lib\site-packages)
Installing collected packages: pycrypto, machine
  Running setup.py install for pycrypto ... error
  error: subprocess-exited-with-error

  × Running setup.py install for pycrypto did not run successfully.
  │ exit code: 1
  ╰─> [180 lines of output]
      running install
     ...
      C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt\inttypes.h(87): error C2143: syntax error: missing '{' before '__cdecl'
      C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt\inttypes.h(94): error C2143: syntax error: missing '{' before '__cdecl'
      C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt\inttypes.h(100): error C2143: syntax error: missing '{' before '__cdecl'
      error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> pycrypto

Edited: what i was in wrong about machine was that it haven't any relation to micropython machine that i want

in other word pipe install machine havent any relation to from machine import Pin in micropython

Jos Verlinde
  • 1,468
  • 12
  • 25
H.hashemi
  • 49
  • 5
  • 2
    As stated in [this answer](https://stackoverflow.com/a/69516560/7867968), I'd check out `pycryptodome` rather than `pycrypto`. `pycrypto` is likely incompatible with python 3.10 – C.Nivs Feb 01 '22 at 17:39
  • i was in wrong from yesterday morning to tonight. machine in this subject have not any relation to micropython machine.how ever i don't need any machine again but my problem with machine still did not solved even with `pycryptodome`. BTW it is not important for me – H.hashemi Feb 01 '22 at 17:57
  • I'm not able to reproduce your error with `pycryptodome`. I'm not sure what your comment means. I'm on a Windows 10 machine and am able to `pip install pycryptodome` into a 3.10 environment just fine. Can you clarify? – C.Nivs Feb 01 '22 at 18:42
  • i was working with micropython. in micropython there is something like this:`import machine` that is complete different from `pip install machine`. infact machine related to micropython not python. on the other hand i was not able to install machine on my win11 pc how ever its not important for me any more.i also read all of methods to solve the problem like what u said about `pip install pycryptodome` .an other thing is that when u try to install machine using `pip install machine` u will get the error that i mentioned above. – H.hashemi Feb 02 '22 at 08:01

0 Answers0