[英]Error keeps on showing up when i try to install a module on python
I am trying to install the modules shodan and requests but this error keeps showing up and i do not know why.我正在尝试安装模块 shodan 和请求,但此错误一直出现,我不知道为什么。 It worked fine for my PC but when i tried it on my laptop this error keeps showing up.它在我的 PC 上运行良好,但当我在我的笔记本电脑上尝试时,这个错误不断出现。
I went to the scripts director of python and entered the following command:我去了 python 的脚本主管并输入以下命令:
python -m pip install shodan
and和
python -m pip install requests
However, this error keeps showing up:但是,此错误不断出现:
Traceback (most recent call last):
File "C:\Users\TPBYOD\AppData\Local\Programs\Python\Python37-32\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "C:\Users\TPBYOD\AppData\Local\Programs\Python\Python37-32\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\TPBYOD\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pip\__main__.py", line 16, in <module>
from pip._internal import main as _main # isort:skip # noqa
File "C:\Users\TPBYOD\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pip\_internal\__init__.py", line 19, in <module>
from pip._vendor.urllib3.exceptions import DependencyWarning
File "C:\Users\TPBYOD\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pip\_vendor\urllib3\__init__.py", line 8, in <module>
from .connectionpool import (
File "C:\Users\TPBYOD\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pip\_vendor\urllib3\connectionpool.py", line 7, in <module>
from socket import error as SocketError, timeout as SocketTimeout
File "C:\Users\TPBYOD\AppData\Local\Programs\Python\Python37-32\lib\socket.py", line 49, in <module>
import _socket
ImportError: DLL load failed: %1 is not a valid Win32 application.
i've resolved the issue already.我已经解决了这个问题。 Thank you.谢谢你。 All i did was reinstall my python and ensured that python was added to both my current user's variable and my system variables我所做的只是重新安装我的 python 并确保将 python 添加到我当前用户的变量和我的系统变量中
This might be because your OS is 32 bit and the python version your using is 64 bit.这可能是因为您的操作系统是 32 位,而您使用的 python 版本是 64 位。 Try installing 32 bit version of python and installing these libraries.尝试安装 python 的 32 位版本并安装这些库。
Try running the pip package manager directly:尝试直接运行 pip package 管理器:
pip install shodan
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.