when I try to run certbot in my console on my Linux Ubuntu Server 20.04.3 LTS, I get following error:
Traceback (most recent call last):
File "/usr/bin/certbot", line 11, in <module>
load_entry_point('certbot==0.40.0', 'console_scripts', 'certbot')()
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 490, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2854, in load_entry_point
return ep.load()
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2445, in load
return self.resolve()
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2451, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/usr/lib/python3/dist-packages/certbot/main.py", line 18, in <module>
from certbot import cert_manager
File "/usr/lib/python3/dist-packages/certbot/cert_manager.py", line 15, in <module>
from certbot import ocsp
File "/usr/lib/python3/dist-packages/certbot/ocsp.py", line 25, in <module>
from certbot.storage import RenewableCert # pylint: disable=unused-import
File "/usr/lib/python3/dist-packages/certbot/storage.py", line 15, in <module>
from certbot import cli
File "/usr/lib/python3/dist-packages/certbot/cli.py", line 33, in <module>
from certbot.plugins import disco as plugins_disco
File "/usr/lib/python3/dist-packages/certbot/plugins/disco.py", line 183, in <module>
class PluginsRegistry(collections.Mapping):
AttributeError: module 'collections' has no attribute 'Mapping'
I have already searched for a solution, but have not found one. Even posts that have the same error could not solve the problem for me. Strangely enough, it worked about two months ago.
I'm running Python 3.10.
In my case, I edited the file /usr/bin/certbot and changed #!/usr/bin/python3 to: #!/usr/bin/python3.8 because Certbot does not support Python 3.10 yet
Related
I recently installed python3 and I had tons of problems so decided to delete my wsl and reinstall everything since I didn't have important stuff there.
I installed python 3.10 and apparently pip but when I try to use pip to install something or just to use list I'm getting this:
Traceback (most recent call last):
File "/usr/bin/pip", line 11, in <module>
load_entry_point('pip==20.0.2', 'console_scripts', 'pip')()
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 490, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2854, in load_entry_point
return ep.load()
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2445, in load
return self.resolve()
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2451, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/usr/lib/python3/dist-packages/pip/_internal/cli/main.py", line 10, in <module>
from pip._internal.cli.autocompletion import autocomplete
File "/usr/lib/python3/dist-packages/pip/_internal/cli/autocompletion.py", line 9, in <module>
from pip._internal.cli.main_parser import create_main_parser
File "/usr/lib/python3/dist-packages/pip/_internal/cli/main_parser.py", line 7, in <module>
from pip._internal.cli import cmdoptions
File "/usr/lib/python3/dist-packages/pip/_internal/cli/cmdoptions.py", line 19, in <module>
from distutils.util import strtobool
ModuleNotFoundError: No module named 'distutils.util'
I'm not really sure how to fix it. I've tried a few things already
I have been attempting to get conan running inside of a docker container that also runs gitlab. I have been attempting to follow these two guides here:
https://docs.gitlab.com/omnibus/docker/ ****Using the Selinux version, im on RHEL 7
https://docs.gitlab.com/ee/user/packages/conan_repository/ *********Only get as far as the actual installing of conan
Whenever I then try to run the conan --version command I get an error message stating "no module named _sqlite3". So in order to try and fix that I have tried installing pysqlite3, libsqlite-dev, sqlite3, pretty much any sqlite named package (within the container of course) I can think of but to no success.
Here is the actual stack trace from the conan call in the event that it may give someone some insight into my issue.
Traceback (most recent call last):
File "/opt/gitlab/embedded/bin/conan", line 33, in <module>
sys.exit(load_entry_point('conan==1.32.0', 'console_scripts', 'conan')())
File "/opt/gitlab/embedded/lib/python3.7/site-packages/pkg_resources/__init__.py", line 473, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/opt/gitlab/embedded/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2843, in load_entry_point
return ep.load()
File "/opt/gitlab/embedded/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2447, in load
return self.resolve()
File "/opt/gitlab/embedded/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2453, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/opt/gitlab/embedded/lib/python3.7/site-packages/conans/conan.py", line 7, in <module>
from conans.client.command import main
File "/opt/gitlab/embedded/lib/python3.7/site-packages/conans/client/command.py", line 16, in <module>
from conans.client.conan_api import Conan, default_manifest_folder, _make_abs_path, ProfileData
File "/opt/gitlab/embedded/lib/python3.7/site-packages/conans/client/conan_api.py", line 11, in <module>
from conans.client.cache.cache import ClientCache
File "/opt/gitlab/embedded/lib/python3.7/site-packages/conans/client/cache/cache.py", line 16, in <module>
from conans.client.store.localdb import LocalDB
File "/opt/gitlab/embedded/lib/python3.7/site-packages/conans/client/store/localdb.py", line 2, in <module>
import sqlite3
File "/opt/gitlab/embedded/lib/python3.7/sqlite3/__init__.py", line 23, in <module>
from sqlite3.dbapi2 import *
File "/opt/gitlab/embedded/lib/python3.7/sqlite3/dbapi2.py", line 27, in <module>
from _sqlite3 import *
ModuleNotFoundError: No module named '_sqlite3'
Any help would be greatly appreciated.
Upon launching spyder 3.3.6, I receive the following error:
Traceback (most recent call last):
File "/usr/bin/spyder", line 11, in <module>
load_entry_point('spyder==3.3.6', 'gui_scripts', 'spyder3')()
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 473, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2843, in load_entry_point
return ep.load()
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2447, in load
return self.resolve()
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2453, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/usr/lib/python3/dist-packages/spyder/app/start.py", line 14, in <module>
import zmq
File "/usr/lib/python3/dist-packages/zmq/__init__.py", line 55, in <module>
from zmq import backend
File "/usr/lib/python3/dist-packages/zmq/backend/__init__.py", line 40, in <module>
reraise(*exc_info)
File "/usr/lib/python3/dist-packages/zmq/utils/sixcerpt.py", line 34, in reraise
raise value
File "/usr/lib/python3/dist-packages/zmq/backend/__init__.py", line 27, in <module>
_ns = select_backend(first)
File "/usr/lib/python3/dist-packages/zmq/backend/select.py", line 28, in select_backend
mod = __import__(name, fromlist=public_api)
File "/usr/lib/python3/dist-packages/zmq/backend/cython/__init__.py", line 6, in <module>
from . import (constants, error, message, context,
ImportError: cannot import name 'constants' from partially initialized module 'zmq.backend.cython' (most likely due to a circular import) (/usr/lib/python3/dist-packages/zmq/backend/cython/__init__.py)
Version of pyzmq is 20.0.0. Using pip, I've tried to update, uninstall-reinstall, and downgrade it to 19.0.2, but nothing helped. I'm using Debian testing, it's up to date.
Any ideas?
I have been trying to get sourcedefender (https://pypi.org/project/sourcedefender/) to work on a laptop running PiDesktop and and windows 7 machine both with the same issue. PiDesktop is running python 3.7 and the windows machine is running Python 3.8.
Both come back with
ImportError: cannot import name 'loader' from 'sourcedefender'
D:\Python Stuff>sourcedefender encrypt test_stuff.py
Traceback (most recent call last):
File "C:\Users\adam.hedley\AppData\Local\Programs\Python\Python38\Scripts\sourcedefender-script.py", line 11, in <module>
load_entry_point('sourcedefender==6.0.21', 'console_scripts', 'sourcedefender')()
File "C:\Users\adam.hedley\AppData\Local\Programs\Python\Python38\lib\site-packages\pkg_resources\__init__.py", line 490, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "C:\Users\adam.hedley\AppData\Local\Programs\Python\Python38\lib\site-packages\pkg_resources\__init__.py", line 2862, in load_entry_point
return ep.load()
File "C:\Users\adam.hedley\AppData\Local\Programs\Python\Python38\lib\site-packages\pkg_resources\__init__.py", line 2462, in load
return self.resolve()
File "C:\Users\adam.hedley\AppData\Local\Programs\Python\Python38\lib\site-packages\pkg_resources\__init__.py", line 2468, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "<frozen zipimport>", line 259, in load_module
File "C:\Users\adam.hedley\AppData\Local\Programs\Python\Python38\lib\site-packages\sourcedefender-6.0.21-py3.8.egg\sourcedefender\__init__.py", lin
e 3, in <module>
ImportError: cannot import name 'loader' from 'sourcedefender' (C:\Users\adam.hedley\AppData\Local\Programs\Python\Python38\lib\site-packages\sourcede
fender-6.0.21-py3.8.egg\sourcedefender\__init__.py)
Exactly the same result if I also try sourcedefender encrypt --ttl=1d test_stuff.py
I am hoping someone may have a simple solution.
I can't get pip to work on OS X. I've tried everything I could find here, installing, removing, reinstalling python, etc. but nothing works. I keep getting the following error message:
Traceback (most recent call last):
File "/usr/local/bin/pip", line 9, in <module>
load_entry_point('pip==8.1.1', 'console_scripts', 'pip')()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 357, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2394, in load_entry_point
return ep.load()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2108, in load
entry = __import__(self.module_name, globals(),globals(), ['__name__'])
File "/Library/Python/2.7/site-packages/pip-8.1.1-py2.7.egg/pip/__init__.py", line 14, in <module>
from pip.utils import get_installed_distributions, get_prog
ImportError: No module named utils