create account

[Python #6][Troubleshooting #1] Steem Python 库安装失败解决方法 by june0620

View this thread on: hive.blogpeakd.comecency.com
· @june0620 · (edited)
$7.65
[Python #6][Troubleshooting #1] Steem Python 库安装失败解决方法
学习python初级觉得差不多了, 心想steem python库应该可以玩弄下了,就试图安装steem库。
但谁知还真不简单。安装pycrypto过程中失败了。我都不知道pycrypto是什么。(我初学者好不好,不要给我磨难行不)

在网上搜了几个小时终于解决掉了问题。

把这几个小时的痛苦刻在steem区块链上。

### 安装失败信息:
```
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 来安装steem。几个小时的折腾,解决方法竟然这么简单。冤啊~

### 设置后的画面:

![image.png](https://steemitimages.com/0x0/https://files.steempeak.com/file/steempeak/june0620/BBcV3FgW-image.png)

### 参考网站

[https://blog.csdn.net/zidian666/article/details/81202831](https://blog.csdn.net/zidian666/article/details/81202831)
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
properties (23)
authorjune0620
permlinkpython-6-troubleshooting-1-steem-python
categorycn
json_metadata{"tags":["cn","zzan","sct","sct-cn","sct-freeboard","palnet","liv","lifestyle","dblog","partiko","cn-stem","steemstem\npython","coding"],"image":["https://steemitimages.com/0x0/https://files.steempeak.com/file/steempeak/june0620/BBcV3FgW-image.png"],"links":["https://blog.csdn.net/zidian666/article/details/81202831"],"app":"partiko","format":"markdown","canonical_url":"https://www.steemcoinpan.com/@june0620/python-6-troubleshooting-1-steem-python"}
created2019-10-25 11:22:03
last_update2019-10-25 11:24:00
depth0
children15
last_payout2019-11-01 11:22:03
cashout_time1969-12-31 23:59:59
total_payout_value3.894 HBD
curator_payout_value3.760 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length8,540
author_reputation118,592,211,436,406
root_title"[Python #6][Troubleshooting #1] Steem Python 库安装失败解决方法"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id91,889,809
net_rshares26,050,633,778,015
author_curate_reward""
vote details (55)
@bluengel ·
항상 행복한 💙 오늘 보내셔용~*^^*

Posted using [Partiko Android](https://partiko.app/referral/bluengel)
properties (22)
authorbluengel
permlinkbluengel-re-june0620-python-6-troubleshooting-1-steem-python-20191026t014810351z
categorycn
json_metadata{"app":"partiko","client":"android"}
created2019-10-26 01:48:12
last_update2019-10-26 01:48:12
depth1
children0
last_payout2019-11-02 01:48:12
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length92
author_reputation129,269,571,273,945
root_title"[Python #6][Troubleshooting #1] Steem Python 库安装失败解决方法"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id91,909,569
net_rshares0
@partiko ·
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!
properties (22)
authorpartiko
permlinkre-python-6-troubleshooting-1-steem-python-20191025t123034
categorycn
json_metadata"{"app": "partiko"}"
created2019-10-25 12:30:36
last_update2019-10-25 12:30:36
depth1
children0
last_payout2019-11-01 12:30:36
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length213
author_reputation39,207,160,334,751
root_title"[Python #6][Troubleshooting #1] Steem Python 库安装失败解决方法"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id91,891,426
net_rshares0
@teamcn-shop ·
你好鸭,june0620!

@yanhan给您叫了一份外卖!

由 @ericet 村长 迎着台风 踩着滑板 给您送来
**烤肉** <br> ![](https://ipfs.busy.org/ipfs/QmXkA7PZLtjDq5tarH3Z44XKgfuX5NtJ5rfo8nY2RKiFE3)
吃饱了吗?跟我猜拳吧! **石头,剪刀,布~**

如果您对我的服务满意,请不要吝啬您的点赞~
@onepagex
properties (22)
authorteamcn-shop
permlinkwherein-1572003389732
categorycn
json_metadata"{"app":"teamcn-shop bot/1.0"}"
created2019-10-25 11:36:42
last_update2019-10-25 11:36:42
depth1
children0
last_payout2019-11-01 11:36:42
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length210
author_reputation11,393,746,055,281
root_title"[Python #6][Troubleshooting #1] Steem Python 库安装失败解决方法"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id91,890,126
net_rshares0
@yanhan ·
@tipu curate
!shop

来自于 [WhereIn Android] (http://www.wherein.io)
properties (22)
authoryanhan
permlinkwherein-1572003389732
categorycn
json_metadata""
created2019-10-25 11:36:36
last_update2019-10-25 11:36:36
depth1
children1
last_payout2019-11-01 11:36:36
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length65
author_reputation323,731,670,852,703
root_title"[Python #6][Troubleshooting #1] Steem Python 库安装失败解决方法"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id91,890,125
net_rshares0
@tipu ·
<a href="https://tipu.online/curator?yanhan" target="_blank">Upvoted &#128076;</a> (Mana: 15/20)
properties (22)
authortipu
permlinkre-wherein-1572003389732-20191025t113651
categorycn
json_metadata""
created2019-10-25 11:36:51
last_update2019-10-25 11:36:51
depth2
children0
last_payout2019-11-01 11:36:51
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length96
author_reputation55,930,870,950,106
root_title"[Python #6][Troubleshooting #1] Steem Python 库安装失败解决方法"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id91,890,129
net_rshares0
@yanhan ·
迟来10分钟才呼叫总算赶到😅

来自于 [WhereIn Android] (http://www.wherein.io)
properties (22)
authoryanhan
permlinkwherein-1572003452661
categorycn
json_metadata""
created2019-10-25 11:37:36
last_update2019-10-25 11:37:36
depth1
children9
last_payout2019-11-01 11:37:36
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length61
author_reputation323,731,670,852,703
root_title"[Python #6][Troubleshooting #1] Steem Python 库安装失败解决方法"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id91,890,143
net_rshares0
@june0620 ·
哈哈 我的帖子来迟十分钟也赶上。哈哈哈哈

非常感谢 tipu
!shop

Posted using [Partiko Android](https://partiko.app/referral/june0620)
properties (22)
authorjune0620
permlinkjune0620-re-yanhan-wherein-1572003452661-20191025t115138322z
categorycn
json_metadata{"app":"partiko","client":"android"}
created2019-10-25 11:51:39
last_update2019-10-25 11:51:39
depth2
children7
last_payout2019-11-01 11:51:39
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length108
author_reputation118,592,211,436,406
root_title"[Python #6][Troubleshooting #1] Steem Python 库安装失败解决方法"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id91,890,411
net_rshares0
@annepink ·
刚看到你给我回复了 马上看你发帖没有  赶紧给你呼叫上...😜
这个号降到2级了...只有两次机会一下就用掉了😂 所以换yanhan给你呼叫✌

Posted using [Partiko Android](https://partiko.app/referral/annepink)
properties (22)
authorannepink
permlinkannepink-re-june0620-june0620-re-yanhan-wherein-1572003452661-20191025t120032335z
categorycn
json_metadata{"app":"partiko","client":"android"}
created2019-10-25 12:00:33
last_update2019-10-25 12:00:33
depth3
children6
last_payout2019-11-01 12:00:33
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length142
author_reputation1,032,301,773,928,016
root_title"[Python #6][Troubleshooting #1] Steem Python 库安装失败解决方法"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id91,890,593
net_rshares0
@teamcn-shop ·
你好鸭,小萍萍!

@june0620给您叫了一份外卖!

由 @annzhao 所长 迎着海啸 坐着火箭 给您送来
**花生阿姨牌花生** <br> ![](https://ipfs.busy.org/ipfs/QmUsnDSM4a1JHFXmMFhBmemXWedirEY587taTG3o8XSXnn)
吃饱了吗?跟我猜拳吧! **石头,剪刀,布~**

如果您对我的服务满意,请不要吝啬您的点赞~
@onepagex
properties (22)
authorteamcn-shop
permlinkjune0620-re-yanhan-wherein-1572003452661-20191025t115138322z
categorycn
json_metadata"{"app":"teamcn-shop bot/1.0"}"
created2019-10-25 11:51:45
last_update2019-10-25 11:51:45
depth2
children0
last_payout2019-11-01 11:51:45
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length213
author_reputation11,393,746,055,281
root_title"[Python #6][Troubleshooting #1] Steem Python 库安装失败解决方法"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id91,890,417
net_rshares0