问题描述
我想为特定的 Python 程序安装 Autopy。
但是当我运行 import requests
url = "https://www.virustotal.com/vtapi/v2/file/scan"
api_key = "MyApiKey"
params = {"apikey": api_key}
files = {"file": ("app.exe",open("C:/Users/Administrator/Desktop/malware detection/app.exe","rb")}
try:
response = requests.post(url,files=files,params=params)
print(response.json())
except Exception as e:
print(e)
时会出现此错误:
https://drive.google.com/file/d/11vFBWXxNCnBptY3Qm_maP41yQ-lYFgAc/view?usp=sharing
我有 Rust Nightly 和 Visual Studio 的 C++ 编译器。
请帮忙。
我使用的是 Windows 机器,Python 3.9,我使用 Visual Studio Code 作为代码编辑器。
提前致谢!
解决方法
我明白了,我需要 Python 3.9 的 AutoPy,但 AutoPy 只支持 Python 3.8。因此发生了错误。只需安装 Python 3.8 就可以了。
Python 下载 - https://www.python.org/downloads/