Divio ImportError: cannot import name 's3boto' - divio

Recently I am getting the following error for my project. I changed nothing but suddenly this error appeared during deployment:
[0m[91m from storages.backends import s3boto
[0m[91mImportError: cannot import name 's3boto'
Here is the complete output log:
[0m[91m settings.INSTALLED_APPS
File "/usr/local/lib/python3.6/site-packages/django/conf/__init__.py", line 56, in __getattr__
[0m[91m self._setup(name)
File "/usr/local/lib/python3.6/site-packages/django/conf/__init__.py", line 43, in _setup
[0m[91m self._wrapped = Settings(settings_module)
File "/usr/local/lib/python3.6/site-packages/django/conf/__init__.py", line 106, in __init__
[0m[91m mod = importlib.import_module(self.SETTINGS_MODULE)
File "/usr/local/lib/python3.6/importlib/__init__.py", line 126, in import_module
[0m[91m return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
[0m[91m File "<frozen importlib._bootstrap>", line 971, in _find_and_load
[0m[91m File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
[0m[91m File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
[0m[91m File "<frozen importlib._bootstrap_external>", line 678, in exec_module
[0m[91m File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
[0m[91m File "/app/settings.py", line 16, in <module>
[0m[91m aldryn_addons.settings.load(locals())
File "/usr/local/lib/python3.6/site-packages/aldryn_addons/settings.py", line 191, in load
[0m[91m settings_json_path=settings_json_path,
File "/usr/local/lib/python3.6/site-packages/aldryn_addons/settings.py", line 231, in load_addon_settings
[0m[91m aldryn_config.Form().to_settings(addon_settings, settings),
File "/app/addons/aldryn-django/aldryn_config.py", line 213, in to_settings
[0m[91m self.storage_settings_for_media(settings, env=env)
File "/app/addons/aldryn-django/aldryn_config.py", line 377, in storage_settings_for_media
[0m[91m from aldryn_django.storage import parse_storage_url
File "/usr/local/lib/python3.6/site-packages/aldryn_django/storage.py", line 17, in <module>
[0m[91m from storages.backends import s3boto
[0m[91mImportError: cannot import name 's3boto'
[0m

The legacy S3BotoStorage backend was removed in version 1.9.
So, you will need either to pin django-storages in your project's requirements.in:
django-storages<1.9

I fixed this issue by upgrading Aldryn Django version to 1.11.29.2

Related

I cannot run pip anymore [duplicate]

This question already has answers here:
pip throws "TypeError: deprecated() " error
(2 answers)
Closed 4 months ago.
So when I am trying to execute "$ python3 -m pip" on my linux I have this error:
python3 -m pip
Traceback (most recent call last):
File "/usr/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/usr/lib/python3/dist-packages/pip/__main__.py", line 23, in <module>
from pip._internal.cli.main import main as _main # isort:skip # noqa
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 23, in <module>
from pip._vendor.packaging.utils import canonicalize_name
File "/usr/lib/python3/dist-packages/pip/_vendor/__init__.py", line 94, in <module>
vendored("requests.packages.urllib3.contrib.pyopenssl")
File "/usr/lib/python3/dist-packages/pip/_vendor/__init__.py", line 36, in vendored
__import__(modulename, globals(), locals(), level=0)
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
File "<frozen importlib._bootstrap>", line 627, in _load_backward_compatible
File "<frozen zipimport>", line 259, in load_module
File "/usr/share/python-wheels/urllib3-1.26.5-py2.py3-none-any.whl/urllib3/contrib/pyopenssl.py", line 50, in <module>
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
File "<frozen importlib._bootstrap>", line 627, in _load_backward_compatible
File "<frozen zipimport>", line 259, in load_module
File "/usr/local/lib/python3.9/dist-packages/pyOpenSSL-22.1.0-py3.9.egg/OpenSSL/__init__.py", line 8, in <module>
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
File "<frozen importlib._bootstrap>", line 627, in _load_backward_compatible
File "<frozen zipimport>", line 259, in load_module
File "/usr/local/lib/python3.9/dist-packages/pyOpenSSL-22.1.0-py3.9.egg/OpenSSL/SSL.py", line 19, in <module>
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
File "<frozen importlib._bootstrap>", line 627, in _load_backward_compatible
File "<frozen zipimport>", line 259, in load_module
File "/usr/local/lib/python3.9/dist-packages/pyOpenSSL-22.1.0-py3.9.egg/OpenSSL/crypto.py", line 3224, in <module>
TypeError: deprecated() got an unexpected keyword argument 'name'
I have the same error when I run it like "$ pip" as user, it only works when I run it as sudo "$ sudo python3 -m pip" or "$ sudo pip". I tried to solve the problem myself by install pyopenssl myself with the latest version but it still dont works. Can someone solve this? Thx
After doing some research I found out that the same issue was encountered by many other people on this thread:
Answer
So the solution was to uninstall pyOpenSSL with
"$ sudo python3 -m pip uninstall pyOpenSSL"
I don't think there is another solution. Need to wait for the next update of the pyOpenSSL package and pray for the compatibility issue to get corrected.

Django or python version issue: ModuleNotFoundError: No module named 'database'

when i try to start my Django project i get this error which i am unable to solve:
ModuleNotFoundError: No module named 'database'
The error stack:
Traceback (most recent call last):
File "/home/olw/candidatis/database-rest/venv/lib/python3.10/site-packages/django/core/management/base.py", line 414, in run_from_argv
self.execute(*args, **cmd_options)
File "/home/olw/candidatis/database-rest/venv/lib/python3.10/site-packages/django/core/management/base.py", line 455, in execute
self.check()
File "/home/olw/candidatis/database-rest/venv/lib/python3.10/site-packages/django/core/management/base.py", line 487, in check
all_issues = checks.run_checks(
File "/home/olw/candidatis/database-rest/venv/lib/python3.10/site-packages/django/core/checks/registry.py", line 88, in run_checks
new_errors = check(app_configs=app_configs, databases=databases)
File "/home/olw/candidatis/database-rest/venv/lib/python3.10/site-packages/django/core/checks/caches.py", line 17, in check_default_cache_is_configured
if DEFAULT_CACHE_ALIAS not in settings.CACHES:
File "/home/olw/candidatis/database-rest/venv/lib/python3.10/site-packages/django/conf/__init__.py", line 87, in __getattr__
self._setup(name)
File "/home/olw/candidatis/database-rest/venv/lib/python3.10/site-packages/django/conf/__init__.py", line 74, in _setup
self._wrapped = Settings(settings_module)
File "/home/olw/candidatis/database-rest/venv/lib/python3.10/site-packages/django/conf/__init__.py", line 183, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 992, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1004, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'database'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/olw/candidatis/database-rest/manage.py", line 22, in <module>
main()
File "/home/olw/candidatis/database-rest/manage.py", line 18, in main
execute_from_command_line(sys.argv)
File "/home/olw/candidatis/database-rest/venv/lib/python3.10/site-packages/django/core/management/__init__.py", line 446, in execute_from_command_line
utility.execute()
File "/home/olw/candidatis/database-rest/venv/lib/python3.10/site-packages/django/core/management/__init__.py", line 440, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/olw/candidatis/database-rest/venv/lib/python3.10/site-packages/django/core/management/base.py", line 427, in run_from_argv
connections.close_all()
File "/home/olw/candidatis/database-rest/venv/lib/python3.10/site-packages/django/db/utils.py", line 212, in close_all
for alias in self:
File "/home/olw/candidatis/database-rest/venv/lib/python3.10/site-packages/django/utils/connection.py", line 73, in __iter__
return iter(self.settings)
File "/home/olw/candidatis/database-rest/venv/lib/python3.10/site-packages/django/utils/functional.py", line 49, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "/home/olw/candidatis/database-rest/venv/lib/python3.10/site-packages/django/utils/connection.py", line 45, in settings
self._settings = self.configure_settings(self._settings)
File "/home/olw/candidatis/database-rest/venv/lib/python3.10/site-packages/django/db/utils.py", line 148, in configure_settings
databases = super().configure_settings(databases)
File "/home/olw/candidatis/database-rest/venv/lib/python3.10/site-packages/django/utils/connection.py", line 50, in configure_settings
settings = getattr(django_settings, self.settings_name)
File "/home/olw/candidatis/database-rest/venv/lib/python3.10/site-packages/django/conf/__init__.py", line 87, in __getattr__
self._setup(name)
File "/home/olw/candidatis/database-rest/venv/lib/python3.10/site-packages/django/conf/__init__.py", line 74, in _setup
self._wrapped = Settings(settings_module)
File "/home/olw/candidatis/database-rest/venv/lib/python3.10/site-packages/django/conf/__init__.py", line 183, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 992, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1004, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'database'
I already tried to install the databases package (This is the recommended answer you almost find anywhere)
Trying to make sense out of the stack trace it seems that python itself cannot import this module (So there is no issue in my code or something...).
My installed packages:
The python version i am using is Python 3.10.5
Anybody any idea ?
UPDATE APPS LIST
Here is my installed apps list ->
INSTALLED_APPS = [
"django.contrib.admin",
"django.contrib.auth",
"django.contrib.contenttypes",
"django.contrib.sessions",
"django.contrib.messages",
"django.contrib.staticfiles",
"django.contrib.admindocs.urls",
"rest",
"rest_framework",
"custom_db_logger",
]

ModuleNotFoundError: No module named 'app' on new Django installation

I am trying to set up a simple Django==4.0.6 dev environment on my Ubuntu 20.04. I'm creating a project folder, create and activate a venv first. Then I'm installing Dajngo using pip. I'm then creating a new project in the very same directory and then for testing this out, run the usual python manage.py command. Here's a quick list of commands I am using:
mkdir project && cd project
python3 -m venv venv
source venv/bin/activate
pip install django==4.0.6
django-admin startproject major .
python manage.py migrate
But I'm getting the following error:
Traceback (most recent call last):
File "/project/venv/lib/python3.8/site-packages/django/core/management/base.py", line 414, in run_from_argv
self.execute(*args, **cmd_options)
File "/project/venv/lib/python3.8/site-packages/django/core/management/base.py", line 460, in execute
output = self.handle(*args, **options)
File "/project/venv/lib/python3.8/site-packages/django/core/management/base.py", line 95, in wrapped
saved_locale = translation.get_language()
File "/project/venv/lib/python3.8/site-packages/django/utils/translation/__init__.py", line 210, in get_language
return _trans.get_language()
File "/project/venv/lib/python3.8/site-packages/django/utils/translation/__init__.py", line 65, in __getattr__
if settings.USE_I18N:
File "/project/venv/lib/python3.8/site-packages/django/conf/__init__.py", line 87, in __getattr__
self._setup(name)
File "/project/venv/lib/python3.8/site-packages/django/conf/__init__.py", line 74, in _setup
self._wrapped = Settings(settings_module)
File "/project/venv/lib/python3.8/site-packages/django/conf/__init__.py", line 183, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 961, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 961, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'app'
And further down, the rest of the error reads:
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "manage.py", line 22, in <module>
main()
File "manage.py", line 18, in main
execute_from_command_line(sys.argv)
File "/project/venv/lib/python3.8/site-packages/django/core/management/__init__.py", line 446, in execute_from_command_line
utility.execute()
File "/project/venv/lib/python3.8/site-packages/django/core/management/__init__.py", line 440, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/project/venv/lib/python3.8/site-packages/django/core/management/base.py", line 427, in run_from_argv
connections.close_all()
File "/project/venv/lib/python3.8/site-packages/django/db/utils.py", line 212, in close_all
for alias in self:
File "/project/venv/lib/python3.8/site-packages/django/utils/connection.py", line 73, in __iter__
return iter(self.settings)
File "/project/venv/lib/python3.8/site-packages/django/utils/functional.py", line 49, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "/project/venv/lib/python3.8/site-packages/django/utils/connection.py", line 45, in settings
self._settings = self.configure_settings(self._settings)
File "/project/venv/lib/python3.8/site-packages/django/db/utils.py", line 148, in configure_settings
databases = super().configure_settings(databases)
File "/project/venv/lib/python3.8/site-packages/django/utils/connection.py", line 50, in configure_settings
settings = getattr(django_settings, self.settings_name)
File "/project/venv/lib/python3.8/site-packages/django/conf/__init__.py", line 87, in __getattr__
self._setup(name)
File "/project/venv/lib/python3.8/site-packages/django/conf/__init__.py", line 74, in _setup
self._wrapped = Settings(settings_module)
File "/project/venv/lib/python3.8/site-packages/django/conf/__init__.py", line 183, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 961, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 961, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'app'
I wasn't able to find a similar case where someone got the same error using a plain new installation in a virtual environment.
I haven't modified any files in the installation, fresh installation only. I was wondering if this has to do anything with my non-env Python. But I couldn't figure out what it is following the traceback.
Update:
I have tested this on every other machine and it works fine as it is a simple installation process for any Django project.
Is your $DJANGO_SETTINGS_MODULE environment variable set to something with app in it by any chance?
Related documentation: https://docs.djangoproject.com/en/4.0/topics/settings/#designating-the-settings
To fix, unset that environment variable.
if you created folder 'app' manually and there don't exists _ _ init _ _.py - you receive those Error.

Why does QtConsole error out when I try to convert it to bundle in pyinstaller?

My qtconsole code is this:
import sys
from qtpy import QtWidgets
from qtconsole.rich_jupyter_widget import RichJupyterWidget
from qtconsole.manager import QtKernelManager
# The ID of an installed kernel, e.g. 'bash' or 'ir'.
USE_KERNEL = 'python3'
def make_jupyter_widget_with_kernel():
"""Start a kernel, connect to it, and create a RichJupyterWidget to use it
"""
kernel_manager = QtKernelManager(kernel_name=USE_KERNEL)
kernel_manager.start_kernel()
kernel_client = kernel_manager.client()
kernel_client.start_channels()
jupyter_widget = RichJupyterWidget()
jupyter_widget.kernel_manager = kernel_manager
jupyter_widget.kernel_client = kernel_client
return jupyter_widget
class MainWindow(QtWidgets.QMainWindow):
"""A window that contains a single Qt console."""
def __init__(self):
super().__init__()
self.jupyter_widget = make_jupyter_widget_with_kernel()
self.setCentralWidget(self.jupyter_widget)
def shutdown_kernel(self):
print('Shutting down kernel...')
self.jupyter_widget.kernel_client.stop_channels()
self.jupyter_widget.kernel_manager.shutdown_kernel()
if __name__ == "__main__":
app = QtWidgets.QApplication(sys.argv)
window = MainWindow()
window.show()
app.aboutToQuit.connect(window.shutdown_kernel)
sys.exit(app.exec_())
it successfully compiles when I run it but when I click on the finished pyinstaller (pyinstaller --onefile main.py or pyinstaller --windowed --onedir Yuro.py) bundle, this qtconsole errors out with message:
File "main.py", line 38, in <module>
File "main.py", line 28, in __init__
File "main.py", line 14, in make_jupyter_widget_with_kernel
File "jupyter_client/utils.py", line 26, in wrapped
File "jupyter_client/utils.py", line 23, in wrapped
File "nest_asyncio.py", line 70, in run_until_complete
File "asyncio/futures.py", line 201, in result
File "asyncio/tasks.py", line 256, in __step
File "jupyter_client/manager.py", line 362, in _async_start_kernel
File "jupyter_client/manager.py", line 347, in _async_start_kernel
File "jupyter_client/utils.py", line 26, in wrapped
File "jupyter_client/utils.py", line 23, in wrapped
File "nest_asyncio.py", line 70, in run_until_complete
File "asyncio/futures.py", line 201, in result
File "asyncio/tasks.py", line 256, in __step
File "jupyter_client/manager.py", line 308, in _async_pre_start_kernel
File "jupyter_client/manager.py", line 138, in kernel_spec
File "jupyter_client/kernelspec.py", line 294, in get_kernel_spec
File "jupyter_client/kernelspec.py", line 247, in _get_kernel_spec_by_name
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "PyInstaller/loader/pyimod03_importers.py", line 495, in exec_module
File "ipykernel/kernelspec.py", line 16, in <module>
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "PyInstaller/loader/pyimod03_importers.py", line 495, in exec_module
File "ipykernel/ipkernel.py", line 38, in <module>
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "PyInstaller/loader/pyimod03_importers.py", line 495, in exec_module
File "ipykernel/debugger.py", line 20, in <module>
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "PyInstaller/loader/pyimod03_importers.py", line 495, in exec_module
File "debugpy/server/__init__.py", line 9, in <module>
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "PyInstaller/loader/pyimod03_importers.py", line 495, in exec_module
File "debugpy/_vendored/__init__.py", line 18, in <module>
FileNotFoundError: [Errno 2] No such file or directory: '/var/folders/2n/h8v95wf976v7byjf7s78jfxh0000gn/T/_MEIu7ujzo/debugpy/_vendored'
I took this qtconsole code from the qtconsole github: "https://github.com/jupyter/qtconsole/blob/master/examples/embed_qtconsole.py." Thank you in advance for your help.

how to fix Error with pip after 20 update

I’m using Python 3.6.7 64x on windows 10.
Today after my updating (pip) I got this error when I’m trying to install any lib.
Traceback (most recent call last):
File "c:\users\admin\appdata\local\programs\python\python36\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "c:\users\admin\appdata\local\programs\python\python36\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\Admin\AppData\Local\Programs\Python\Python36\Scripts\pip.exe\__main__.py", line 7, in <module>
File "c:\users\admin\appdata\local\programs\python\python36\lib\site-packages\pip\_internal\cli\main.py", line 73, in main
command = create_command(cmd_name, isolated=("--isolated" in cmd_args))
File "c:\users\admin\appdata\local\programs\python\python36\lib\site-packages\pip\_internal\commands\__init__.py", line 96, in create_command
module = importlib.import_module(module_path)
File "c:\users\admin\appdata\local\programs\python\python36\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "c:\users\admin\appdata\local\programs\python\python36\lib\site-packages\pip\_internal\commands\install.py", line 24, in <module>
from pip._internal.cli.req_command import RequirementCommand, with_cleanup
ImportError: cannot import name 'with_cleanup'
I tried to repair the installation but it didn’t help.
So please will you tell me what I can do to fix this problem!
With all respect!
I didn't get any answer for my question, and I still don't know how to solve the problem with the 20 update of pip.
but I found a way to make pip work again by using 'easy_install pip==19.3.1' in the cmd. and now i'm using the pip 19.3.1 and it works well.
hope this will help somebody!
with all respect!

Resources