pycrypto
が必要です
dnspython
でいくつかの関数を使用する必要があるため図書館。オンラインで
pycrypto
を示唆する投稿を見つけました死んでいる。ただし、
dnspython
が必要ですそして、それを使用する以外に選択肢はありません。私も
pycryptodome
をインストールしようとしました彼らが示唆するように、それは
pycrypto
の代替品ですしかし、
dnspython
を使用する私のプログラムライブラリでエラーが発生しました:
Traceback (most recent call last):
File "test-3-dnssec.py", line 40, in <module>
dns.dnssec.validate(answer[0],answer[1],{name:answer[0]})
File "C:\Python36\lib\site-packages\dns\dnssec.py", line 417, in _validate
_validate_rrsig(rrset, rrsig, keys, origin, now)
File "C:\Python36\lib\site-packages\dns\dnssec.py", line 371, in _validate_rrsig
if pubkey.verify(digest, sig):
File "C:\Python36\lib\site-packages\Crypto\PublicKey\RSA.py", line 372, in verify
raise NotImplementedError("Use module Crypto.Signature.pkcs1_15 instead")
NotImplementedError: Use module Crypto.Signature.pkcs1_15 instead
これによると同様のエラー、
pycryptodome
を使用しているため
pycrypto
の代わりに
。
Pycryptodome
私の場合、pycryptoの代替品ではありません。
Visual Studio 2017をインストールしました。ライブラリのギハブページ:
cd "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build"
vcvarsall amd64
cd \
set CL=-FI"%VCINSTALLDIR%\tools\msvc\14.13.26128\include\stdint.h"
pip install pycrypto
残念ながら、これは役に立ちませんでした。私も
pip install pycrypto
を実行しようとしましたVCコマンドプロンプトからでもインストールできません。また、環境変数に次のパスを追加しました。
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build
インストール試行の要約:
----------------------------------------
Command "c:\python36\python.exe -u -c "import setuptools,
tokenize;__file__='C:\\Users\\xx\\AppData\\Local\\Temp\\pip-install-u7xhxrk
\\pycrypto\\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\e\AppData\Local\Temp\pip-record
a7yh6xa5\install-record.txt --single-version-externally-managed --compile"
failed with error code 1 in C:\Users\e\AppData\Local\Temp\pip-install-u7xhxrk
\pycrypto\
詳細については、これも出力にあります。
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Isrc/ -Isrc/inc-msvc/ -Ic:\python36\include -Ic:\python36\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\cppwinrt" /Tcsrc/winrand.c /Fobuild\temp.win-amd64-3.6\Release\src/winrand.obj
winrand.c
C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(27): error C2061: syntax error: identifier 'intmax_t'
C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(28): error C2061: syntax error: identifier 'rem'
C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(28): error C2059: syntax error: ';'
C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(29): error C2059: syntax error: '}'
C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(31): error C2061: syntax error: identifier 'imaxdiv_t'
C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(31): error C2059: syntax error: ';'
C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(41): error C2143: syntax error: missing '{' before '__cdecl'
C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(42): error C2146: syntax error: missing ')' before identifier '_Number'
C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(42): error C2061: syntax error: identifier '_Number'
C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(42): error C2059: syntax error: ';'
C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(43): error C2059: syntax error: ')'
C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(46): error C2143: syntax error: missing '{' before '__cdecl'
C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(47): error C2146: syntax error: missing ')' before identifier '_Numerator'
C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(47): error C2061: syntax error: identifier '_Numerator'
C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(47): error C2059: syntax error: ';'
C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(47): error C2059: syntax error: ','
C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(49): error C2059: syntax error: ')'
C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(51): error C2143: syntax error: missing '{' before '__cdecl'
C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(57): error C2143: syntax error: missing '{' before '__cdecl'
C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(64): error C2143: syntax error: missing '{' before '__cdecl'
C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(70): error C2143: syntax error: missing '{' before '__cdecl'
C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(77): error C2143: syntax error: missing '{' before '__cdecl'
C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(83): error C2143: syntax error: missing '{' before '__cdecl'
C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(90): error C2143: syntax error: missing '{' before '__cdecl'
C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(96): error C2143: syntax error: missing '{' before '__cdecl'
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.14.26428\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
問題を理解できますか?
回答 1 件
関連記事
- Python Webスクレイピング:スクレイピング後にファイルへの書き込みに失敗しました
- Ubuntu2004にAMDGPUドライバーをインストールするときにamdgpu-dkmsのビルドに失敗しました
- Pythonでアーケードパッケージをインストールする際の問題
- いくつかの引数が渡されたWindowsバッチファイル内のforループでPythonスクリプトを実行する
- Windows10でPython3を使用してcassandracqlshを実行します
- python:windows:Subporcess新しいコマンドウィンドウでbatファイルを開き、実行します
- Pythonバージョン39でnumpyのインストールに失敗しました
- pip実行可能ファイルが見つからないため、awssamのデプロイに失敗しました。Python
- Linuxにcordova-resとsharpパッケージをインストール中にシャープインストールが失敗しました(npm)
- pyodideとpythonモジュールを含むwepページがiOSで読み込めないのに、Androidとデスクトップでは読み込めるのはなぜですか?
さて、私は正確な問題を経験しており、次の手順を実行することで解決できました。
ユーザー変数で、環境変数にVisual Studio VCディレクトリを追加します。
変数はシステム変数ではなくユーザー変数にある必要があることに注意してください。
cmdを開いた後、次のコマンドを入力します。
次に、pip installを実行します