[SOLVED] ImportError: No module named requests

Share your tips or issues concerning the WAPT Console or WAPT Agent here
Forum Rules
Community Forum Rules
* English support on www.reddit.com/r/wapt
* French community support is available on this forum
* Please prefix the topic title with [RESOLVED] if it is resolved.
* Please do not edit a topic that is tagged [RESOLVED]. Open a new topic referencing the old one.
* Specify the installed WAPT version, full version, and build number (2.2.1.11957 / 2.2.2.12337 / etc.) as well as the Enterprise/Discovery edition.
* Versions 1.8.2 and earlier are no longer supported. The only questions accepted regarding version 1.8.2 are related to upgrading to a supported version (2.1, 2.2, etc.).
* Specify the server OS (Linux/Windows) and version (Debian Buster/Bullseye - CentOS 7 - Windows Server 2012/2016/2019).
* Specify the OS of the administration/package creation machine and the machine with the problematic agent, if applicable (Windows 7/10/11/Debian 11/etc.).
* Avoid asking multiple questions when opening a topic, otherwise it may be ignored. If there are multiple topics, open separate topics, preferably one after the other and not all at the same time (i.e., do not spam the forum).
* Include code snippets, screenshots, and other images directly in the post. Links to Pastebin, Bitly, and other third-party sites will be systematically removed.
* As with any community forum, support is provided voluntarily by members. If you require commercial support, you can contact Tranquil IT's sales department at 02.40.97.57.55
Emmanuel64
Messages: 46
Registration: February 23, 2024 - 09:37

March 11, 2024 - 10:56

Good morning

When I try to install a package under development using "pyScrypter" as described in the documentation, I get the following error in the console:

Code: Select all

Traceback (most recent call last):
  File "C:\Program Files (x86)\wapt\wapt-get.py", line 18, in <module>
    from waptutils import __version__
  File "C:\Program Files (x86)\wapt\waptutils.py", line 33, in <module>
    import requests
ModuleNotFoundError: No module named 'requests'
I tested it on 3 up-to-date W11 machines, the last one being my DEV machine for WAPT, which has no antivirus other than the one from W11 (which I disabled for testing purposes)
I saw in another post (from 2018) that someone tried reinstalling, same result

I am on WAPT 2.5.4.15342

Could you help me?


THANKS
WAPT Enterprise
Version 2.6.1.17576
User avatar
sfonteneau
WAPT Expert
Messages: 2318
Registered: July 10, 2014 - 11:52 PM
Contact :

March 11, 2024 - 10:59

Good morning

Can you check that the file

Code: Select all

C:\Program Files (x86)\wapt\lib\site-packages\requests\__init__.py
is present?

It normally comes with Wapt by default
Emmanuel64
Messages: 46
Registration: February 23, 2024 - 09:37

March 11, 2024 - 11:29

Hello,

he is indeed present on all posts.
WAPT Enterprise
Version 2.6.1.17576
User avatar
sfonteneau
WAPT Expert
Messages: 2318
Registered: July 10, 2014 - 11:52 PM
Contact :

March 11, 2024 - 11:45

You can try this:

Code: Select all

C:\Windows\System32>waptpython
Python 3.8.18 (default, Feb  6 2024, 14:16:28) [MSC v.1929 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import requests
>>>
Emmanuel64
Messages: 46
Registration: February 23, 2024 - 09:37

March 11, 2024 - 12:06

Unfortunately, same error message
WAPT Enterprise
Version 2.6.1.17576
User avatar
sfonteneau
WAPT Expert
Messages: 2318
Registered: July 10, 2014 - 11:52 PM
Contact :

March 11, 2024 - 1:10 PM

What does this give?

Code: Select all

C:\Windows\System32>waptpython
Python 3.8.18 (default, Feb  6 2024, 14:16:28) [MSC v.1929 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.path
['C:\\Program Files (x86)\\wapt\\python38.zip', 'C:\\Program Files (x86)\\wapt', 'C:\\Program Files (x86)\\wapt\\DLLs', 'C:\\Users\\username\\AppData\\Roaming\\Python\\Python38\\site-packages', 'C:\\Program Files (x86)\\wapt\\lib\\site-packages', 'C:\\Program Files (x86)\\wapt\\lib\\site-packages\\win32', 'C:\\Program Files (x86)\\wapt\\lib\\site-packages\\win32\\lib', 'C:\\Program Files (x86)\\wapt\\lib\\site-packages\\Pythonwin']
>>>
Emmanuel64
Messages: 46
Registration: February 23, 2024 - 09:37

March 11, 2024 - 2:21 PM

I don't have exactly the same exit as you:
['C:\\Program Files (x86)\\wapt\\python38.zip', 'C:\\Program Files (x86)\\wapt', 'C:\\Program Files (x86)\\wapt\\DLLs', 'C:\\Program Files (x86)\\wapt\\lib\\site-packages', 'C:\\Program Files (x86)\\wapt\\lib\\site-packages\\win32', 'C:\\Program Files (x86)\\wapt\\lib\\site-packages\\win32\\lib', 'C:\\Program Files (x86)\\wapt\\lib\\site-packages\\Pythonwin']
Could this be due to my Python version (3.10.4 x64) and pystcripter (4.3.4 x64)?

Thank you for your help
WAPT Enterprise
Version 2.6.1.17576
User avatar
dcardon
WAPT Expert
Messages: 1932
Registration: June 18, 2014 - 09:58
Location: Saint Sébastien sur Loire
Contact :

March 11, 2024 - 3:05 PM

Hello Emmanuel,
Emmanuel64 wrote: March 11, 2024 - 2:21 PM I don't have exactly the same exit as you:
['C:\\Program Files (x86)\\wapt\\python38.zip', 'C:\\Program Files (x86)\\wapt', 'C:\\Program Files (x86)\\wapt\\DLLs', 'C:\\Program Files (x86)\\wapt\\lib\\site-packages', 'C:\\Program Files (x86)\\wapt\\lib\\site-packages\\win32', 'C:\\Program Files (x86)\\wapt\\lib\\site-packages\\win32\\lib', 'C:\\Program Files (x86)\\wapt\\lib\\site-packages\\Pythonwin']
Could this be due to my Python version (3.10.4 x64) and pystcripter (4.3.4 x64)?
Could you tell me which part of the documentation you followed? There's no need to install an additional Python version (WAPT already includes Python 3.8), and there's no reason why your Python 3.10 should be able to find WAPT's site-packages Python, so your problem is perfectly normal. And where did you download PyScripter? I don't recall the 64-bit version being available on the store. And it's preferable to use PyCripter3.

Sincerely,

Denis
Denis Cardon - Tranquil IT
Share your experiences on WAPT! Send us your blog and article URLs in the "Your Opinion of the forum, and we'll feature them on the WAPT
Emmanuel64
Messages: 46
Registration: February 23, 2024 - 09:37

March 11, 2024 - 5:14 PM

When I installed WaptDev, I got an error opening PyScripter:

Nothing appears with the `img` tag. Here's the link to see the error message.


So I downloaded Python. :roll:

I just uninstalled everything and reinstalled the "WaptDev" package.

Could you tell me where I should point the Python installation in PyScripter?

Thanks.
WAPT Enterprise
Version 2.6.1.17576
Emmanuel64
Messages: 46
Registration: February 23, 2024 - 09:37

March 11, 2024 - 10:10 PM

Good evening.

Uninstalling all the components (including the console) and then reinstalling the tools allowed me to solve my problem.

I had followed the steps incorrectly.


Thank you for your help
WAPT Enterprise
Version 2.6.1.17576
Locked