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.
Related
I have been trying to install the requests module in Ubuntu 16.04 and followed a lot of suggestions available here, but in vain. pip3 is already installed on my machine. The python versions in my machines are 2.7 and 3.5. When I am running the command "pip3 install requests", I am getting the following output:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/pip/_vendor/__init__.py", line 33, in vendored
__import__(vendored_name, globals(), locals(), level=0)
ImportError: No module named 'pip._vendor.cachecontrol'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/pa/.local/lib/python3.5/site-packages/certifi/core.py", line 12, in
<module>
from importlib.resources import path as get_path, read_text
ImportError: No module named 'importlib.resources'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/pip3", line 9, in <module>
from pip import main
File "/usr/lib/python3/dist-packages/pip/__init__.py", line 13, in <module>
from pip.exceptions import InstallationError, CommandError, PipError
File "/usr/lib/python3/dist-packages/pip/exceptions.py", line 6, in <module>
from pip._vendor.six import iteritems
File "/usr/lib/python3/dist-packages/pip/_vendor/__init__.py", line 64, in <module>
vendored("cachecontrol")
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 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
File "<frozen importlib._bootstrap>", line 634, in _load_backward_compatible
File "/usr/share/python-wheels/CacheControl-0.11.5-py2.py3-none-
any.whl/cachecontrol/__init__.py", line 9, in <module>
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
File "<frozen importlib._bootstrap>", line 634, in _load_backward_compatible
File "/usr/share/python-wheels/CacheControl-0.11.5-py2.py3-none-
any.whl/cachecontrol/wrapper.py", line 1, in <module>
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
File "<frozen importlib._bootstrap>", line 634, in _load_backward_compatible
File "/usr/share/python-wheels/CacheControl-0.11.5-py2.py3-none-
any.whl/cachecontrol/adapter.py", line 3, in <module>
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
File "<frozen importlib._bootstrap>", line 634, in _load_backward_compatible
File "/usr/share/python-wheels/requests-2.9.1-py2.py3-none-
any.whl/requests/__init__.py", line 58, in <module>
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
File "<frozen importlib._bootstrap>", line 634, in _load_backward_compatible
File "/usr/share/python-wheels/requests-2.9.1-py2.py3-none-
any.whl/requests/utils.py", line 25, in <module>
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
File "<frozen importlib._bootstrap>", line 634, in _load_backward_compatible
File "/usr/share/python-wheels/requests-2.9.1-py2.py3-none-
any.whl/requests/certs.py", line 17, in <module>
File "/home/pa/.local/lib/python3.5/site-packages/certifi/__init__.py", line 1, in
<module>
from .core import contents, where
File "/home/pa/.local/lib/python3.5/site-packages/certifi/core.py", line 44, in
<module>
Resource = Union[str, "os.PathLike"]
File "/usr/lib/python3.5/typing.py", line 552, in __getitem__
dict(self.__dict__), parameters, _root=True)
File "/usr/lib/python3.5/typing.py", line 512, in __new__
for t2 in all_params - {t1} if not isinstance(t2, TypeVar)):
File "/usr/lib/python3.5/typing.py", line 512, in <genexpr>
for t2 in all_params - {t1} if not isinstance(t2, TypeVar)):
File "/usr/lib/python3.5/typing.py", line 190, in __subclasscheck__
self._eval_type(globalns, localns)
File "/usr/lib/python3.5/typing.py", line 177, in _eval_type
eval(self.__forward_code__, globalns, localns),
File "<string>", line 1, in <module>
AttributeError: module 'os' has no attribute 'PathLike'
I tried it via Pycharm also, but couldn't do it. Is there any alternative way? Any kind of help would be appreciated?
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.
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.
I'm working on a Django project.
When starting the server I get "ValueError: Unable to configure handler 'mail_admins'".
I'm in the correct directory, with virtual environment started.
I can't make migrations, same error apears.
Everything was working fine was able to start the server on this method in the past with no problem, until today.
Thanks in advance!
Version:
Windows 10
Python 3.8.1
Django==3.1.5
frego#Yisus-Robles MINGW64 ~/Desktop/news
$ python manage.py runserver
Traceback (most recent call last):
File "c:\users\frego\appdata\local\programs\python\python38\lib\logging\config.py", line 563, in configure
handler = self.configure_handler(handlers[name])
File "c:\users\frego\appdata\local\programs\python\python38\lib\logging\config.py", line 744, in configure_handler
result = factory(**kwargs)
File "C:\Users\frego\.virtualenvs\frego-6ij68a4f\lib\site-packages\django\utils\log.py", line 89, in __init__
self.reporter_class = import_string(reporter_class or settings.DEFAULT_EXCEPTION_REPORTER)
File "C:\Users\frego\.virtualenvs\frego-6ij68a4f\lib\site-packages\django\utils\module_loading.py", line 17, in import_string
module = import_module(module_path)
File "c:\users\frego\appdata\local\programs\python\python38\lib\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 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 783, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "C:\Users\frego\.virtualenvs\frego-6ij68a4f\lib\site-packages\django\views\__init__.py", line 1, in <module>
from django.views.generic.base import View
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 971, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 914, in _find_spec
File "<frozen importlib._bootstrap_external>", line 1342, in find_spec
File "<frozen importlib._bootstrap_external>", line 1314, in _get_spec
File "<frozen importlib._bootstrap_external>", line 1443, in find_spec
File "<frozen importlib._bootstrap_external>", line 1483, in _fill_cache
OSError: [WinError 1392] El archivo o directorio est▒ da▒ado o es ilegible: 'C:\\Users\\frego\\.virtualenvs\\frego-6ij68a4f\\lib\\site-packages\\django\\views\\generic'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\frego\.virtualenvs\frego-6ij68a4f\lib\site-packages\django\core\management\__init__.py", line 357, in execute
autoreload.check_errors(django.setup)()
File "C:\Users\frego\.virtualenvs\frego-6ij68a4f\lib\site-packages\django\utils\autoreload.py", line 53, in wrapper
fn(*args, **kwargs)
File "C:\Users\frego\.virtualenvs\frego-6ij68a4f\lib\site-packages\django\__init__.py", line 19, in setup
configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
File "C:\Users\frego\.virtualenvs\frego-6ij68a4f\lib\site-packages\django\utils\log.py", line 71, in configure_logging
logging.config.dictConfig(DEFAULT_LOGGING)
File "c:\users\frego\appdata\local\programs\python\python38\lib\logging\config.py", line 808, in dictConfig
dictConfigClass(config).configure()
File "c:\users\frego\appdata\local\programs\python\python38\lib\logging\config.py", line 570, in configure
raise ValueError('Unable to configure handler '
ValueError: Unable to configure handler 'mail_admins'
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 "C:\Users\frego\.virtualenvs\frego-6ij68a4f\lib\site-packages\django\core\management\__init__.py", line 401, in execute_from_command_line
utility.execute()
File "C:\Users\frego\.virtualenvs\frego-6ij68a4f\lib\site-packages\django\core\management\__init__.py", line 370, in execute
_parser = self.fetch_command('runserver').create_parser('django', 'runserver')
File "C:\Users\frego\.virtualenvs\frego-6ij68a4f\lib\site-packages\django\core\management\__init__.py", line 244, in fetch_command
klass = load_command_class(app_name, subcommand)
File "C:\Users\frego\.virtualenvs\frego-6ij68a4f\lib\site-packages\django\core\management\__init__.py", line 37, in load_command_class
module = import_module('%s.management.commands.%s' % (app_name, name))
File "c:\users\frego\appdata\local\programs\python\python38\lib\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 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 783, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "C:\Users\frego\.virtualenvs\frego-6ij68a4f\lib\site-packages\django\core\management\commands\runserver.py", line 10, in <module>
from django.core.servers.basehttp import (
File "C:\Users\frego\.virtualenvs\frego-6ij68a4f\lib\site-packages\django\core\servers\basehttp.py", line 17, in <module>
from django.core.handlers.wsgi import LimitedStream
File "C:\Users\frego\.virtualenvs\frego-6ij68a4f\lib\site-packages\django\core\handlers\wsgi.py", line 5, in <module>
from django.core.handlers import base
File "C:\Users\frego\.virtualenvs\frego-6ij68a4f\lib\site-packages\django\core\handlers\base.py", line 15, in <module>
from .exception import convert_exception_to_response
File "C:\Users\frego\.virtualenvs\frego-6ij68a4f\lib\site-packages\django\core\handlers\exception.py", line 18, in <module>
from django.views import debug
File "C:\Users\frego\.virtualenvs\frego-6ij68a4f\lib\site-packages\django\views\__init__.py", line 1, in <module>
from django.views.generic.base import View
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 971, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 914, in _find_spec
File "<frozen importlib._bootstrap_external>", line 1342, in find_spec
File "<frozen importlib._bootstrap_external>", line 1314, in _get_spec
File "<frozen importlib._bootstrap_external>", line 1443, in find_spec
File "<frozen importlib._bootstrap_external>", line 1483, in _fill_cache
OSError: [WinError 1392] El archivo o directorio est▒ da▒ado o es ilegible: 'C:\\Users\\frego\\.virtualenvs\\frego-6ij68a4f\\lib\\site-packages\\django\\views\\generic'
It seems that the error is arisen from the LOGGING in the settings of the project. Take a look in the LOGGING['handlers'].
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!