[Python #6][Troubleshooting #1] Steem Python 라이브러리 설치 실패 해결 방법

in #kr5 years ago (edited)

파이썬을 초급단계는 대충 익힌 것 같아 이제 steem 파이썬 라이브러리를 건드릴 생각으로 설치를 시도했지만 실패.
pycrypto 설치 중 문제가 발생한듯하다. pycrypto ? 넌 또 뭐니?? 쉽게쉽게 넘어갈 때가 없네... ㅠㅠ

몇시간 동안 인터넷을 헤매며 겨우 해결했다. 고생한 거 생각해서라도 스팀 블록체인에 기록해야겠다.

에러 내용:

Collecting steem
  Using cached https://files.pythonhosted.org/packages/f8/cb/78489bf60c7c0212e5f65ecc04877b5a82f896fc3c84e2c0331c07c71552/steem-1.0.1-py2.py3-none-any.whl
Requirement already satisfied: w3lib in c:\users\user\desktop\python\pss\venv\lib\site-packages (from steem) (1.21.0)
Requirement already satisfied: prettytable in c:\users\user\desktop\python\pss\venv\lib\site-packages (from steem) (0.7.2)
Requirement already satisfied: ujson in c:\users\user\desktop\python\pss\venv\lib\site-packages (from steem) (1.35)
Requirement already satisfied: urllib3 in c:\users\user\desktop\python\pss\venv\lib\site-packages (from steem) (1.25.6)
Requirement already satisfied: langdetect in c:\users\user\desktop\python\pss\venv\lib\site-packages (from steem) (1.0.7)
Requirement already satisfied: appdirs in c:\users\user\desktop\python\pss\venv\lib\site-packages (from steem) (1.4.3)
Requirement already satisfied: voluptuous in c:\users\user\desktop\python\pss\venv\lib\site-packages (from steem) (0.11.7)
Requirement already satisfied: toolz in c:\users\user\desktop\python\pss\venv\lib\site-packages (from steem) (0.10.0)
Requirement already satisfied: certifi in c:\users\user\desktop\python\pss\venv\lib\site-packages (from steem) (2019.9.11)
Requirement already satisfied: funcy in c:\users\user\desktop\python\pss\venv\lib\site-packages (from steem) (1.13)
Requirement already satisfied: future in c:\users\user\desktop\python\pss\venv\lib\site-packages (from steem) (0.18.1)
Requirement already satisfied: ecdsa>=0.13 in c:\users\user\desktop\python\pss\venv\lib\site-packages (from steem) (0.13.3)
Requirement already satisfied: pylibscrypt>=1.6.1 in c:\users\user\desktop\python\pss\venv\lib\site-packages (from steem) (1.8.0)
Collecting pycrypto>=1.9.1 (from steem)
  Using cached https://files.pythonhosted.org/packages/60/db/645aa9af249f059cc3a368b118de33889219e0362141e75d4eaf6f80f163/pycrypto-2.6.1.tar.gz
Requirement already satisfied: scrypt>=0.8.0 in c:\users\user\desktop\python\pss\venv\lib\site-packages (from steem) (0.8.13)
Requirement already satisfied: six>=1.4.1 in c:\users\user\desktop\python\pss\venv\lib\site-packages (from w3lib->steem) (1.12.0)
Installing collected packages: pycrypto, steem
  Running setup.py install for pycrypto: started
    Running setup.py install for pycrypto: finished with status 'error'
    Complete output from command C:\Users\USER\Desktop\python\PSS\venv\Scripts\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\USER\\AppData\\Local\\Temp\\pycharm-packaging\\pycrypto\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r
', '
');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\USER\AppData\Local\Temp\pip-record-mx7kzh8o\install-record.txt --single-version-externally-managed --compile --install-headers C:\Users\USER\Desktop\python\PSS\venv\include\site\python3.7\pycrypto:
    running install
    running build
    running build_py
    creating build
    creating build\lib.win32-3.7
    creating build\lib.win32-3.7\Crypto
    copying lib\Crypto\pct_warnings.py -> build\lib.win32-3.7\Crypto
    copying lib\Crypto\__init__.py -> build\lib.win32-3.7\Crypto
    ......
    ......
    creating build\temp.win32-3.7\Release
    creating build\temp.win32-3.7\Release\src
    C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.23.28105\bin\HostX86\x86\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MT -Isrc/ -Isrc/inc-msvc/ -IC:\Users\USER\Desktop\python\PSS\venv\include -IC:\Users\USER\AppData\Local\Programs\Python\Python37-32\include -IC:\Users\USER\AppData\Local\Programs\Python\Python37-32\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.23.28105\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt" /Tcsrc/winrand.c /Fobuild\temp.win32-3.7\Release\src/winrand.obj
    winrand.c
    C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt\inttypes.h(27): error C2061: 구문 오류: 식별자 'intmax_t'
    C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt\inttypes.h(28): error C2061: 구문 오류: 식별자 'rem'
    C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt\inttypes.h(28): error C2059: 구문 오류: ';'
    C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt\inttypes.h(29): error C2059: 구문 오류: '}'
    C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt\inttypes.h(31): error C2061: 구문 오류: 식별자 'imaxdiv_t'
    C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt\inttypes.h(31): error C2059: 구문 오류: ';'
    C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt\inttypes.h(41): error C2143: 구문 오류: '{'이(가) '__cdecl' 앞에 없습니다.
    C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt\inttypes.h(42): error C2146: 구문 오류: ')'이(가) '_Number' 식별자 앞에 없습니다.
    C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt\inttypes.h(42): error C2061: 구문 오류: 식별자 '_Number'
    C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt\inttypes.h(42): error C2059: 구문 오류: ';'
    C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt\inttypes.h(43): error C2059: 구문 오류: ')'
    C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt\inttypes.h(46): error C2143: 구문 오류: '{'이(가) '__cdecl' 앞에 없습니다.
    C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt\inttypes.h(47): error C2146: 구문 오류: ')'이(가) '_Numerator' 식별자 앞에 없습니다.
    C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt\inttypes.h(47): error C2061: 구문 오류: 식별자 '_Numerator'
    C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt\inttypes.h(47): error C2059: 구문 오류: ';'
    C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt\inttypes.h(47): error C2059: 구문 오류: ','
    C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt\inttypes.h(49): error C2059: 구문 오류: ')'
    C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt\inttypes.h(51): error C2143: 구문 오류: '{'이(가) '__cdecl' 앞에 없습니다.
    C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt\inttypes.h(57): error C2143: 구문 오류: '{'이(가) '__cdecl' 앞에 없습니다.
    C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt\inttypes.h(64): error C2143: 구문 오류: '{'이(가) '__cdecl' 앞에 없습니다.
    C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt\inttypes.h(70): error C2143: 구문 오류: '{'이(가) '__cdecl' 앞에 없습니다.
    C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt\inttypes.h(77): error C2143: 구문 오류: '{'이(가) '__cdecl' 앞에 없습니다.
    C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt\inttypes.h(83): error C2143: 구문 오류: '{'이(가) '__cdecl' 앞에 없습니다.
    C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt\inttypes.h(90): error C2143: 구문 오류: '{'이(가) '__cdecl' 앞에 없습니다.
    C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt\inttypes.h(96): error C2143: 구문 오류: '{'이(가) '__cdecl' 앞에 없습니다.
    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.23.28105\\bin\\HostX86\\x86\\cl.exe' failed with exit status 2
    
    ----------------------------------------

Command "C:\Users\USER\Desktop\python\PSS\venv\Scripts\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\USER\\AppData\\Local\\Temp\\pycharm-packaging\\pycrypto\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r
', '
');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\USER\AppData\Lo

해결 방법:

cmd 창에서 set CL=/FI"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.23.28105\include\stdint.h" 을 입력하고 설정(엔터) 후 다시 pip install steem 으로 설치하니 성공이다. 몇시간을 허비한 것 치고는 너무 간단하지 않은가? 억울하다.

설치 후 화면:

image.png

참고 사이트

https://blog.csdn.net/zidian666/article/details/81202831

Sort:  

Hi😚 写好多呦... 虽然看不懂😅
@tipu cutate
!shop

Posted using Partiko Android

输给萍萍了,手真快!!shop

Posted using Partiko Android

没有 在你那里呢😂

Posted using Partiko Android

你俩真好, 我真幸福 😀😀

Posted using Partiko Android

你是香帅吧🤭

Posted using Partiko Android

哈哈,不愁没踢谱赞了。!shop

Posted using Partiko Android

Hi~ june0620!
@also.einstein has gifted you 1 SHOP!

Currently you have: 119 SHOP

View or Exchange SHOP Please go to steem-engine.com.

Are you bored? Play Rock,Paper,Scissors game with me!

奇怪,明明是你先评论的。

Posted using Partiko Android

可能你等级高 你都6级了💪

Posted using Partiko Android

还有这原因啊,等级高总算有个好处了。

Posted using Partiko Android

Hi~ 萍萍!
@also.einstein has gifted you 1 SHOP!

Currently you have: 116.001 SHOP

View or Exchange SHOP Please go to steem-engine.com.

Are you bored? Play Rock,Paper,Scissors game with me!


You lose! 你输了!愿赌服输,请给我点赞~

谢谢你的 tipu😀😄

Posted using Partiko Android

Hi~ june0620!
@annepink has gifted you 1 SHOP!

Currently you have: 118 SHOP

View or Exchange SHOP Please go to steem-engine.com.

Are you bored? Play Rock,Paper,Scissors game with me!


You lose! 你输了!乖乖的给我点赞吧!

Thank you so much for participating in the Partiko Delegation Plan Round 1! We really appreciate your support! As part of the delegation benefits, we just gave you a 3.00% upvote! Together, let’s change the world!

Hi~ june0620!
@ravenkim has gifted you 1 SHOP!

Currently you have: 120 SHOP

View or Exchange SHOP Please go to steem-engine.com.

Are you bored? Play Rock,Paper,Scissors game with me!


You win!!!! 你赢了! 给你1枚SHOP币!

!shop

항상 행복한 💙 오늘 보내셔용~^^

Posted using Partiko Android

감사합니다^^
행복한 밤 보내셔요^^
!shop

Posted using Partiko Android

Hi~ bluengel!
@june0620 has gifted you 1 SHOP!

Currently you have: 57 SHOP

View or Exchange SHOP Please go to steem-engine.com.

Are you bored? Play Rock,Paper,Scissors game with me!

你好鸭,june0620!

@bluengel给您叫了一份外卖!

@liumei 阿花 迎着台风 骑着飞毯 给您送来
贺老师现炒花生

吃饱了吗?跟我猜拳吧! 石头,剪刀,布~

如果您对我的服务满意,请不要吝啬您的点赞~
@onepagex

Congratulations @june0620! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

You distributed more than 13000 upvotes. Your next target is to reach 14000 upvotes.

You can view your badges on your Steem Board and compare to others on the Steem Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

To support your work, I also upvoted your post!

Do not miss the last post from @steemitboard:

SteemFest⁴ commemorative badge refactored
Vote for @Steemitboard as a witness to get one more award and increased upvotes!

Coin Marketplace

STEEM 0.19
TRX 0.15
JST 0.029
BTC 63166.66
ETH 2575.67
USDT 1.00
SBD 2.77