Reputation: 25
I am trying to install the modules shodan and requests but this error keeps showing up and i do not know why. It worked fine for my PC but when i tried it on my laptop this error keeps showing up.
I went to the scripts director of python and entered the following command:
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.
Upvotes: 1
Views: 122
Reputation: 25
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
Upvotes: 1
Reputation: 672
Try running the pip package manager directly:
pip install shodan
Upvotes: 0
Reputation: 11
This might be because your OS is 32 bit and the python version your using is 64 bit. Try installing 32 bit version of python and installing these libraries.
Upvotes: 0