bitsadmin/wesng

--muc-lookup does not detect mechanicalsoup

Closed this issue · 3 comments

[!] Cannot lookup superseeding KBs in the Microsoft Update Catalog!
    Reason: Python package mechanicalsoup not installed.
    Install with 'pip install mechanicalsoup' and run again

G:\Device Guard\#Hardening 10 2004+\wesng-master>pip install mechanicalsoup
Requirement already satisfied: mechanicalsoup in c:\users\ty\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (0.12.0)
Requirement already satisfied: lxml in c:\users\ty\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from mechanicalsoup) (4.5.2)
Requirement already satisfied: requests>=2.0 in c:\users\ty\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from mechanicalsoup) (2.24.0)
Requirement already satisfied: beautifulsoup4>=4.4 in c:\users\ty\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from mechanicalsoup) (4.9.1)
Requirement already satisfied: six>=1.4 in c:\users\ty\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from mechanicalsoup) (1.15.0)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\ty\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from requests>=2.0->mechanicalsoup) (2020.6.20)
Requirement already satisfied: chardet<4,>=3.0.2 in c:\users\ty\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from requests>=2.0->mechanicalsoup) (3.0.4)
Requirement already satisfied: idna<3,>=2.5 in c:\users\ty\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from requests>=2.0->mechanicalsoup) (2.10)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in c:\users\ty\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from requests>=2.0->mechanicalsoup) (1.25.9)
Requirement already satisfied: soupsieve>1.2 in c:\users\ty\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from beautifulsoup4>=4.4->mechanicalsoup) (2.0.1)

Could it be that you have multiple instances/versions of python installed where maybe the pip install installs the libraries into the first instance of Python whereas the python you use is another instance which doesn't have mechanicalsoup installed? In Windows you can check this by executing the following two commands in cmd.exe:

C:\>where pip
C:\Program Files\Python37\Scripts\pip.exe
C:\Program Files\Python27\Scripts\pip.exe

C:\>where python
C:\Program Files\Python37\python.exe
C:\Program Files\Python27\python.exe

C:\>

In Linux you can use the which command to validate the binary that will be executed.

Hope that gives you a pointer to solve this issue!

C:\windows\system32>where python
C:\Program Files\Python38\python.exe
C:\Users\Ty\AppData\Local\Microsoft\WindowsApps\python.exe

Thank you @bitsadmin, Microsoft forced me to install python from the windows store, on top of an installation I had already made. Microsoft would not allow it to function otherwise, so it seems its caused this incompatibility. Do you have any tips on how to fix this problem?

First line of the commandline output above disappeared, fixed it now.

What is the output of your where pip command? In your case it should point to C:\Program Files\Python38\Scripts\pip.exe. You can force it to use the pip from that Python installation by executing "C:\Program Files\Python38\Scripts\pip.exe" install mechanicalsoup.

Hope that works!

Closed the issue because it does not seem to be an issue with wes-ng. Feel free to reopen in case this doesn't work and it does appear to be an issue of wes-ng.