[英]Python cannot find SSL Module in Game but in computer can find no problem
I'm trying to run the line:我正在尝试运行该行:
r = requests.get('https://api.twitch.tv/helix/streams?user_login='+CHAN[1:], headers=headers)
but am getting the following error:但我收到以下错误:
Can't connect to HTTPS URL because the SSL module is not available
Now here's where things get confusing.现在这就是事情变得混乱的地方。 I can run this same exact line in
Visual Studio 2019
on my computer, no problem.我可以在我的计算机上的
Visual Studio 2019
中运行同样的行,没问题。 I can run this same exact line no problem on online compilers, no problem.我可以在在线编译器上运行相同的确切行没问题,没问题。 But when I try to run this in the game
Assetto Corsa
I get this error.但是当我尝试在游戏《
Assetto Corsa
》中运行它时,我得到了这个错误。
Why will this run on my computer but not in a game that runs on my computer?为什么这会在我的电脑上运行,而不是在我电脑上运行的游戏中? How do I solve it?
我该如何解决? Is there a python SSL module I can manually install in my game folder maybe?
是否有一个 python SSL 模块我可以手动安装在我的游戏文件夹中?
Side Notes that Might Help:可能有帮助的旁注:
Assetto corsa
does have it's own python in its folder ( python33.zip
). Assetto corsa
在其文件夹中确实有自己的 python ( python33.zip
)。
As far as I could see on github, apps include explicitly the code of the libraries they're using either as.pyd files or as source code.据我在 github 上看到的,应用程序明确地包含了他们使用的库的代码,它们可以是 as.pyd 文件,也可以是源代码。
You can see https://github.com/martinbjeldbak/openTracker for including the requests
module.您可以查看https://github.com/martinbjeldbak/openTracker以包含
requests
模块。
What I did to find it and other examples was running a search Assetto Corsa
in github and filter the results by python (there are less than 80).我为找到它和其他示例所做的是在 github 中运行搜索
Assetto Corsa
并按 python 过滤结果(少于 80 个)。
I hope this helps you我希望这可以帮助你
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.