These error messages may have been caused by an Xcode update I just did recently but I am not sure. I'm running MacOS 10.15.4.
This is the error I receive upon running conda info in my terminal.
(base) Kevin-Brysons-MacBook-Pro:~ kevinbryson$ conda info
>>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<
Traceback (most recent call last):
File "/Users/kevinbryson/opt/anaconda3/lib/python3.7/site-packages/conda/exceptions.py", line 1079, in __call__
return func(*args, **kwargs)
File "/Users/kevinbryson/opt/anaconda3/lib/python3.7/site-packages/conda/cli/main.py", line 84, in _main
exit_code = do_call(args, p)
File "/Users/kevinbryson/opt/anaconda3/lib/python3.7/site-packages/conda/cli/conda_argparse.py", line 80, in do_call
module = import_module(relative_mod, __name__.rsplit('.', 1)[0])
File "/Users/kevinbryson/opt/anaconda3/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/Users/kevinbryson/opt/anaconda3/lib/python3.7/site-packages/conda/cli/main_info.py", line 19, in <module>
from ..core.index import _supplement_index_with_system
File "/Users/kevinbryson/opt/anaconda3/lib/python3.7/site-packages/conda/core/index.py", line 10, in <module>
from .package_cache_data import PackageCacheData
File "/Users/kevinbryson/opt/anaconda3/lib/python3.7/site-packages/conda/core/package_cache_data.py", line 15, in <module>
from .path_actions import CacheUrlAction, ExtractPackageAction
File "/Users/kevinbryson/opt/anaconda3/lib/python3.7/site-packages/conda/core/path_actions.py", line 30, in <module>
from ..gateways.connection.download import download
File "/Users/kevinbryson/opt/anaconda3/lib/python3.7/site-packages/conda/gateways/connection/download.py", line 13, in <module>
import ctypes
File "/Users/kevinbryson/opt/anaconda3/lib/python3.7/ctypes/__init__.py", line 7, in <module>
from _ctypes import Union, Structure, Array
ImportError: dlopen(/Users/kevinbryson/opt/anaconda3/lib/python3.7/lib-dynload/_ctypes.cpython-37m-darwin.so, 2): Library not loaded: #rpath/libffi.6.dylib
Referenced from: /Users/kevinbryson/opt/anaconda3/lib/python3.7/lib-dynload/_ctypes.cpython-37m-darwin.so
Reason: image not found
`$ /Users/kevinbryson/opt/anaconda3/bin/conda info`
I am getting similar error reports upon running conda env list, but not conda list.
I have the normal anaconda3 distribution and have not seen issues like this with anaconda before. I think I can just wipe the install directory at ~/opt but I would rather not have to redo all my settings. I've seen similar issues like https://github.com/conda/conda/issues/6183 but their solutions did not work for me despite the similar situation (I tried running the conda update -c rdonnellyr -c main --all command.
Related
I have been using PyQt6 for a while without a problem. Now I'm trying to do the exercises from a textbook, using pyqtgraph. It does not seem to come bundled with PyQt6 because the import statement failed. I tried installing it with:
pip install pyqtgraph
I tried various combinations of sudo, pip, pip3 (pip points to pip3), python/python3.8/python3.9 -m pip install pyqtgraph (python links to python3). I forced a reinstall of pip from a curl and deleted old site-package versions from .local. I even did a git clone pyqtgraph and tried to build it from scratch. Nothing worked. I always get the same error:
Traceback (most recent call last):
File "/home/richard/.local/bin/pip", line 8, in <module>
sys.exit(main())
File "/home/richard/.local/lib/python3.9/site-packages/pip/_internal/cli/main.py", line 68, in main
command = create_command(cmd_name, isolated=("--isolated" in cmd_args))
File "/home/richard/.local/lib/python3.9/site-packages/pip/_internal/commands/__init__.py", line 109, in create_command
module = importlib.import_module(module_path)
File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
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 "<frozen importlib._bootstrap_external>", line 850, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "/home/richard/.local/lib/python3.9/site-packages/pip/_internal/commands/install.py", line 14, in <module>
from pip._internal.cli.req_command import (
File "/home/richard/.local/lib/python3.9/site-packages/pip/_internal/cli/req_command.py", line 20, in <module>
from pip._internal.index.collector import LinkCollector
File "/home/richard/.local/lib/python3.9/site-packages/pip/_internal/index/collector.py", line 42, in <module>
from pip._internal.network.session import PipSession
File "/home/richard/.local/lib/python3.9/site-packages/pip/_internal/network/session.py", line 31, in <module>
from pip._internal.network.auth import MultiDomainBasicAuth
File "/home/richard/.local/lib/python3.9/site-packages/pip/_internal/network/auth.py", line 22, in <module>
from pip._internal.vcs.versioncontrol import AuthInfo
File "/home/richard/.local/lib/python3.9/site-packages/pip/_internal/vcs/__init__.py", line 7, in <module>
import pip._internal.vcs.mercurial
ModuleNotFoundError: No module named 'pip._internal.vcs.mercurial'
I also reinstalled mercurial.
I can't find any posts on pip._internal.vcs.mercurial, although there are plenty of posts on missing pip._internal, none of which helps.
I am receiving this error on multiple commands, similar to the problem explained in this question. But I am not even able to run it in sudo, non-sudo(if thats a thing) and also root account(I specifically logged into the root account to run this, but failed)
Here is the error I am thrown every time.
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.8/site-packages/pip/_internal/cli/main.py", line 73, in main
command = create_command(cmd_name, isolated=("--isolated" in cmd_args))
File "/usr/lib/python3.8/site-packages/pip/_internal/commands/__init__.py", line 96, in create_command
module = importlib.import_module(module_path)
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 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 "/usr/lib/python3.8/site-packages/pip/_internal/commands/freeze.py", line 12, in <module>
from pip._internal.operations.freeze import freeze
File "/usr/lib/python3.8/site-packages/pip/_internal/operations/freeze.py", line 17, in <module>
from pip._internal.req.constructors import (
File "/usr/lib/python3.8/site-packages/pip/_internal/req/__init__.py", line 11, in <module>
from .req_file import parse_requirements
File "/usr/lib/python3.8/site-packages/pip/_internal/req/req_file.py", line 25, in <module>
from pip._internal.req.constructors import (
File "/usr/lib/python3.8/site-packages/pip/_internal/req/constructors.py", line 28, in <module>
from pip._internal.req.req_install import InstallRequirement
File "/usr/lib/python3.8/site-packages/pip/_internal/req/req_install.py", line 30, in <module>
from pip._internal.operations.install.wheel import install_wheel
File "/usr/lib/python3.8/site-packages/pip/_internal/operations/install/wheel.py", line 33, in <module>
from pip._internal.utils.wheel import parse_wheel
File "/usr/lib/python3.8/site-packages/pip/_internal/utils/wheel.py", line 12, in <module>
from pip._vendor.six import PY2, ensure_str
ImportError: cannot import name 'ensure_str' from 'six' (/usr/lib/python3.8/site-packages/six.py)
Note : I was initially trying to install tensorflow, then other commands like pip freeze and pip uninstall some-package also threw this error.
I have already tried reinstalling pip without any errors. I am on Manjaro, so i ran
pacman -Rcn python-pip
and then
pacman -S python-pip
$ pacman -S extra/python-six did the trick!
I recently upgraded my pip to 19.3. When I did that I cannot use any pip commands. OS - Mac
When I googled and researched more, most of the suggestions were to downgrade the pip package. However, even when I tried that I am getting the same result. In fact, force installs or uninstall or sudo commands nothing works.
Traceback (most recent call last):
File "/Users/.virtualenvs/myvenv/bin/pip", line 10, in <module>
sys.exit(main())
File "/Users/.virtualenvs/myvenv/lib/python3.7/site-packages/pip/_internal/main.py", line 45, in main
command = create_command(cmd_name, isolated=("--isolated" in cmd_args))
File "/Users/.virtualenvs/myvenv/lib/python3.7/site-packages/pip/_internal/commands/__init__.py", line 96, in create_command
module = importlib.import_module(module_path)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/Users/.virtualenvs/myvenv/lib/python3.7/site-packages/pip/_internal/commands/install.py", line 24, in <module>
from pip._internal.cli.req_command import RequirementCommand
File "/Users/.virtualenvs/myvenv/lib/python3.7/site-packages/pip/_internal/cli/req_command.py", line 21, in <module>
from pip._internal.operations.prepare import RequirementPreparer
File "/Users/.virtualenvs/myvenv/lib/python3.7/site-packages/pip/_internal/operations/prepare.py", line 17, in <module>
from pip._internal.download import unpack_url
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
File "/Users/.virtualenvs/myvenv/lib/python3.7/site-packages/wrapt/importer.py", line 158, in load_module
notify_module_loaded(module)
File "/Users/.virtualenvs/myvenv/lib/python3.7/site-packages/wrapt/decorators.py", line 443, in _synchronized
return wrapped(*args, **kwargs)
File "/Users/.virtualenvs/myvenv/lib/python3.7/site-packages/wrapt/importer.py", line 136, in notify_module_loaded
hook(module)
File "/Users/.virtualenvs/myvenv/lib/python3.7/site-packages/pip_system_certs/wrapt_pip.py", line 8, in apply_patches
override_ssl_handler(download)
File "/Users/.virtualenvs/myvenv/lib/python3.7/site-packages/pip_system_certs/wrapt_pip.py", line 17, in override_ssl_handler
class SslContextHttpAdapter(download.HTTPAdapter):
AttributeError: module 'pip._internal.download' has no attribute 'HTTPAdapter'
Can somebody help, please?
This appears to be because you installed the pip-system-certs package, which hooks into pip internals in a way that was never supported. This promptly broke as soon as you updated pip and the stuff pip-system-certs wanted to mess with got changed.
You will at least need to get rid of pip-system-certs. It looks like it was installed in a virtualenv, so you can probably just deactivate the env and make a new one... but if so, it seems like you would have already tried that. If you didn't already try that, make sure to try it next time! If you did already try that, then you probably wrecked more stuff than we can see, and you may need more drastic measures, such as a full Python reinstall.
What worked for me was to go to <your conda environment>\Lib\site-packages and remove all occurences of pip-system-certs. In my case it was one file and two folders.
pip-tools~=4.2.0 is compatible with pip>=19.3
I am getting the following error when trying to launch shell_plus after installing django_extensions. Here are the steps i followed
1-Installed django_extensions using
pip install django_extensions
2-Added django_extensions to installed apps
Then I get the following error
$ ./manage.py shell_plus
Traceback (most recent call last):
File "./manage.py", line 15, in <module>
execute_from_command_line(sys.argv)
File "/Users/admin/Development/project/virtual/lib/python3.5/site-packages/django/core/management/__init__.py", line 371, in execute_from_command_line
utility.execute()
File "/Users/admin/Development/project/virtual/lib/python3.5/site-packages/django/core/management/__init__.py", line 365, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/Users/admin/Development/project/virtual/lib/python3.5/site-packages/django/core/management/__init__.py", line 216, in fetch_command
klass = load_command_class(app_name, subcommand)
File "/Users/admin/Development/project/virtual/lib/python3.5/site-packages/django/core/management/__init__.py", line 36, in load_command_class
module = import_module('%s.management.commands.%s' % (app_name, name))
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 986, in _gcd_import
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 673, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 662, in exec_module
File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
File "/Users/admin/Development/project/virtual/lib/python3.5/site-packages/django_extensions/management/commands/shell_plus.py", line 14, in <module>
from django_extensions.management.shells import import_objects
File "/Users/admin/Development/project/virtual/lib/python3.5/site-packages/django_extensions/management/shells.py", line 5, in <module>
from typing import ( # NOQA
ImportError: cannot import name 'Type'
Any suggestions on what might be going wrong ?
Python 3.5 comes with its own version of typing module. What is most likely happening is that you have the other typing module specified in your requirements (the one that doesn't include Type class) and its getting picked up by django_extensions instead of the native Python one. Check your installed modules, or try running:
pip uninstall typing
Question title says it all. I'm not a Python expert, not sure where to go from here. I tried everything I could think of.
I'm using pip3 and python3 with Django 1.8.
Following instructions from https://github.com/omab/python-social-auth I did sudo pip3 install python-social-auth and all the dependencies.
Shell output:
$ python3 manage.py shell
Traceback (most recent call last):
File "./manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/usr/local/lib/python3.4/dist-packages/django/core/management/__init__.py", line 338, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python3.4/dist-packages/django/core/management/__init__.py", line 312, in execute
django.setup()
File "/usr/local/lib/python3.4/dist-packages/django/__init__.py", line 18, in setup
apps.populate(settings.INSTALLED_APPS)
File "/usr/local/lib/python3.4/dist-packages/django/apps/registry.py", line 108, in populate
app_config.import_models(all_models)
File "/usr/local/lib/python3.4/dist-packages/django/apps/config.py", line 198, in import_models
self.models_module = import_module(models_module_name)
File "/usr/lib/python3.4/importlib/__init__.py", line 109, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 2254, in _gcd_import
File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
File "<frozen importlib._bootstrap>", line 2226, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 1200, in _load_unlocked
File "<frozen importlib._bootstrap>", line 1129, in _exec
File "<frozen importlib._bootstrap>", line 1471, in exec_module
File "<frozen importlib._bootstrap>", line 321, in _call_with_frames_removed
File "/usr/local/lib/python3.4/dist-packages/social/apps/django_app/default/models.py", line 8, in <module>
from social.utils import setting_name
File "/usr/local/lib/python3.4/dist-packages/social/utils.py", line 13, in <module>
from requests.packages.urllib3.poolmanager import PoolManager
ImportError: No module named 'requests.packages'
I'm not sure why the python-social-auth module tries to call requests.packages since that does not seem to exist in the "requests" module.
I solved my own problem.
sudo pip3 install requests --upgrade
Fixed it by upgrading my system's "requests" package.
this question may be getting a bunch of new visitors...
requests.packages has been removed from requests:
https://github.com/kennethreitz/requests/pull/4067
install the vendored libraries separately
pip install urllib3