Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModuleNotFoundError: No module named 'ConfigParser' #458

Closed
HughPH opened this issue Oct 28, 2020 · 3 comments
Closed

ModuleNotFoundError: No module named 'ConfigParser' #458

HughPH opened this issue Oct 28, 2020 · 3 comments
Labels
bug Something isn't working distro: debian stale This is an older thread that's inactive v2 Old version of Howdy (2.*)

Comments

@HughPH
Copy link

HughPH commented Oct 28, 2020

Python never fails to give me a headache.

Howdy just wasn't even starting the webcam, so I ran python3 /lib/security/howdy/pam.py and I got ModuleNotFoundError: No module named 'ConfigParser'

So I installed it:

$ sudo pip3 install ConfigParser
Collecting ConfigParser
  Downloading configparser-5.0.1-py3-none-any.whl (22 kB)
Installing collected packages: ConfigParser
Successfully installed ConfigParser-5.0.1
WARNING: You are using pip version 20.2.1; however, version 20.2.4 is available.
You should consider upgrading via the '/usr/bin/python3 -m pip install --upgrade pip' command.

Then ran pam.py again:

$ sudo python3 /lib/security/howdy/pam.py 
Traceback (most recent call last):
  File "/lib/security/howdy/pam.py", line 10, in <module>
    import ConfigParser
ModuleNotFoundError: No module named 'ConfigParser'

One final thing to make sure it's in the right place...

$ sudo python3 -m pip install ConfigParser
Requirement already satisfied: ConfigParser in /usr/local/lib/python3.8/dist-packages (5.0.1)

And just a quick check of sys.path:

$ sudo python3 -c "import sys; print(sys.path)"
['', '/usr/lib/python38.zip', '/usr/lib/python3.8', '/usr/lib/python3.8/lib-dynload', '/usr/local/lib/python3.8/dist-packages',  '/usr/local/lib/python3.8/dist-packages/dlib-19.16.0-py3.8-linux-x86_64.egg', '/usr/lib/python3/dist-packages']

Looks like the /usr/local/lib/python3.8/dist-packages path is in there... so what's going on?


I've searched for similar issues already, and my issue has not been reported yet.

Linux distribution (if applicable): Ubuntu 20.04

Howdy version (sudo howdy version): 2.6.1

@arifer612
Copy link
Contributor

arifer612 commented Nov 9, 2020

You need to have python 2 for it to work. This is because the pam-python module only operates on python 2. If you have python 2 you should not have to worry about ConfigParser not being installed because it should be part of the standard library.

If you're just running pam.py, you would then have to run it using the python2 binary so it should be more like:

sudo python2 /lib/security/howdy/pam.py

@boltgolt
Copy link
Owner

@arifer612 is exactly right! ConfigParser is not the issue here, did you notice any errors in /var/log/auth.log?

@boltgolt boltgolt added bug Something isn't working distro: debian labels Nov 23, 2020
@boltgolt boltgolt added the stale This is an older thread that's inactive label Jun 14, 2021
@pavelkq
Copy link

pavelkq commented Nov 28, 2022

My Debian 11 uses python3 as a default despite of I set up python2. How could I force to use python2 for howdi?

@saidsay-so saidsay-so added the v2 Old version of Howdy (2.*) label Apr 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working distro: debian stale This is an older thread that's inactive v2 Old version of Howdy (2.*)
Projects
None yet
Development

No branches or pull requests

5 participants