hanzala123 / arch2appimage

This is a python script that downloads Arch Linux packages (Official/Chaotic AUR) and converts to an AppImage executable
GNU General Public License v3.0
339 stars 11 forks source link

ModuleNotFoundError: No module named 'inquirer' #20

Closed kha84 closed 1 year ago

kha84 commented 1 year ago

My system is running Debian 11 Stable aarch64. Today I clonned the project and installed all the python dependencies as per guide:

pi@orangepi4-lts:~/projects/arch2appimage $ pip3 install -r requirements.txt
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: inquirer==2.10.0 in /home/pi/.local/lib/python3.7/site-packages (from -r requirements.txt (line 1)) (2.10.0)
Requirement already satisfied: requests==2.28.1 in /home/pi/.local/lib/python3.7/site-packages (from -r requirements.txt (line 2)) (2.28.1)
Requirement already satisfied: rich==12.5.1 in /home/pi/.local/lib/python3.7/site-packages (from -r requirements.txt (line 3)) (12.5.1)
Requirement already satisfied: zstandard==0.18.0 in /home/pi/.local/lib/python3.7/site-packages (from -r requirements.txt (line 4)) (0.18.0)
Requirement already satisfied: blessed>=1.19.0 in /home/pi/.local/lib/python3.7/site-packages (from inquirer==2.10.0->-r requirements.txt (line 1)) (1.19.1)
Requirement already satisfied: readchar>=3.0.6 in /home/pi/.local/lib/python3.7/site-packages (from inquirer==2.10.0->-r requirements.txt (line 1)) (4.0.3)
Requirement already satisfied: python-editor>=1.0.4 in /home/pi/.local/lib/python3.7/site-packages (from inquirer==2.10.0->-r requirements.txt (line 1)) (1.0.4)
Requirement already satisfied: idna<4,>=2.5 in /home/pi/.local/lib/python3.7/site-packages (from requests==2.28.1->-r requirements.txt (line 2)) (3.4)
Requirement already satisfied: charset-normalizer<3,>=2 in /home/pi/.local/lib/python3.7/site-packages (from requests==2.28.1->-r requirements.txt (line 2)) (2.1.1)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /home/pi/.local/lib/python3.7/site-packages (from requests==2.28.1->-r requirements.txt (line 2)) (1.26.12)
Requirement already satisfied: certifi>=2017.4.17 in /home/pi/.local/lib/python3.7/site-packages (from requests==2.28.1->-r requirements.txt (line 2)) (2022.9.14)
Requirement already satisfied: commonmark<0.10.0,>=0.9.0 in /home/pi/.local/lib/python3.7/site-packages (from rich==12.5.1->-r requirements.txt (line 3)) (0.9.1)
Requirement already satisfied: typing-extensions<5.0,>=4.0.0 in /home/pi/.local/lib/python3.7/site-packages (from rich==12.5.1->-r requirements.txt (line 3)) (4.3.0)
Requirement already satisfied: pygments<3.0.0,>=2.6.0 in /home/pi/.local/lib/python3.7/site-packages (from rich==12.5.1->-r requirements.txt (line 3)) (2.13.0)
Requirement already satisfied: wcwidth>=0.1.4 in /home/pi/.local/lib/python3.7/site-packages (from blessed>=1.19.0->inquirer==2.10.0->-r requirements.txt (line 1)) (0.2.5)
Requirement already satisfied: six>=1.9.0 in /home/pi/.local/lib/python3.7/site-packages (from blessed>=1.19.0->inquirer==2.10.0->-r requirements.txt (line 1)) (1.16.0)
Requirement already satisfied: setuptools>=41.0 in /usr/local/lib/python3.7/site-packages (from readchar>=3.0.6->inquirer==2.10.0->-r requirements.txt (line 1)) (47.1.0)

However when I try to run the script it complains on a missing "inquirer" module:

pi@orangepi4-lts:~/projects/arch2appimage $ python3 arch2appimage.py
Traceback (most recent call last):
  File "/home/pi/projects/arch2appimage/arch2appimage.py", line 9, in <module>
    from utils import Utils
  File "/home/pi/projects/arch2appimage/utils.py", line 7, in <module>
    import inquirer
ModuleNotFoundError: No module named 'inquirer'

pi@orangepi4-lts:~/projects/arch2appimage $ pip3 list | grep -i inquirer
inquirer           2.10.0
kha84 commented 1 year ago

Ah sorry, I just realized it is my own mess of various Python versions being installed.

kha84 commented 1 year ago

It would be good to specify that in requirements the minimal python version to be used. I'm not a python expert as you can see :) but it looks like this script requires at least 3.8+ given walrus operator being used

kha84 commented 1 year ago

Closing this. In my case I had a mess of python v3.7 (compiled from sources) and v3.9 installed from repo, so pip3 was actually executed out of 3.7. Installing all the dependencies with using 3.9 helped:

python3 -m pip install -r requirements.txt