I'm trying to run 'conda install something' on macOS Mojave but i'm getting this error at every turn:
conda install update
This is the entire traceback:
Traceback (most recent call last):
File "/anaconda2/bin/conda", line 13, in <module>
sys.exit(main())
File "/anaconda2/lib/python2.7/site-packages/conda/cli/main.py", line 149, in main
from ..exceptions import conda_exception_handler
File "/anaconda2/lib/python2.7/site-packages/conda/exceptions.py", line 18, in <module>
from ._vendor.auxlib.entity import EntityEncoder
File "/anaconda2/lib/python2.7/site-packages/conda/_vendor/auxlib/entity.py", line 253, in <module>
from .collection import AttrDict, frozendict, make_immutable
File "/anaconda2/lib/python2.7/site-packages/conda/_vendor/auxlib/collection.py", line 10, in <module>
from .compat import isiterable, iteritems, odict, text_type
File "/anaconda2/lib/python2.7/site-packages/conda/_vendor/auxlib/compat.py", line 10, in <module>
from ._vendor.five import WhateverIO as StringIO, with_metaclass
File "/anaconda2/lib/python2.7/site-packages/conda/_vendor/auxlib/_vendor/five.py", line 80, in <module>
absolute_to_nanoseconds = CoreServices.AbsoluteToNanoseconds
File "/anaconda2/lib/python2.7/ctypes/__init__.py", line 379, in __getattr__
func = self.__getitem__(name)
File "/anaconda2/lib/python2.7/ctypes/__init__.py", line 384, in __getitem__
func = self._FuncPtr((name_or_ordinal, self))
AttributeError: dlsym(RTLD_DEFAULT, AbsoluteToNanoseconds): symbol not found
how can i fix it?
A similar error happened to me on macOS Big Sur and removing miniconda2 and installing miniconda3 worked for me.
I followed the instructions on https://docs.conda.io/en/latest/miniconda.html which is basically:
rm -rf ~/miniconda2
rm -rf ~/.condarc ~/.conda ~/.continuum
bash Miniconda3-latest-MacOSX-x86_64.sh # after downloading the installable
Related
I get the following error, How to rectify this issue?
from ovirtsdk.xml import params
ImportError: No module named ovirtsdk.xml
This is the complete log file, Why I get this error and How to rectify it?
python manage.py createcachetable
Traceback (most recent call last):
File "manage.py", line 9, in <module>
execute_from_command_line(sys.argv)
File "/home/hari/openuds/testuds-master/Python-2.7.14/env/lib/python2.7/site-packages/django/core/management/__init__.py", line 353, in execute_from_command_line
utility.execute()
File "/home/hari/openuds/testuds-master/Python-2.7.14/env/lib/python2.7/site-packages/django/core/management/__init__.py", line 327, in execute
django.setup()
File "/home/hari/openuds/testuds-master/Python-2.7.14/env/lib/python2.7/site-packages/django/__init__.py", line 18, in setup
apps.populate(settings.INSTALLED_APPS)
File "/home/hari/openuds/testuds-master/Python-2.7.14/env/lib/python2.7/site-packages/django/apps/registry.py", line 115, in populate
app_config.ready()
File "/home/hari/openuds/testuds-master/server/src/uds/__init__.py", line 72, in ready
from . import services # to make sure that the packages are initialized at this point
File "/home/hari/openuds/testuds-master/server/src/uds/services/__init__.py", line 73, in <module>
__init__()
File "/home/hari/openuds/testuds-master/server/src/uds/services/__init__.py", line 63, in __init__
__import__('uds.services.' + name, globals(), locals(), [])
File "/home/hari/openuds/testuds-master/server/src/uds/services/OVirt/__init__.py", line 31, in <module>
from .OVirtProvider import Provider
File "/home/hari/openuds/testuds-master/server/src/uds/services/OVirt/OVirtProvider.py", line 44, in <module>
from . import client
File "/home/hari/openuds/testuds-master/server/src/uds/services/OVirt/client/__init__.py", line 33, in <module>
from . import oVirtClient3;
File "/home/hari/openuds/testuds-master/server/src/uds/services/OVirt/client/oVirtClient3.py", line 7, in <module>
from ovirtsdk.xml import params
ImportError: No module named ovirtsdk.xml
You are missing the ovirt-engine-sdk-python package. Note that it requires version 3 of that package, so you can install it via pip like this:
$ pip install ovirt-engine-sdk-python==3.6.9.2
Don't run:
$ pip install ovirt-engine-sdk-python
which would install latest(4) version of the SDK, which isn't compatible with above code.
I am getting the below error while using the command:
python get-pip.py
Error:
c:\Python>python get-pip.py
Traceback (most recent call last):
File "get-pip.py", line 20061, in <module>
main()
File "get-pip.py", line 194, in main
bootstrap(tmpdir=tmpdir)
File "get-pip.py", line 82, in bootstrap
import pip
File "C:\Users\dell\AppData\Local\Temp\tmpa0q8wceq\pip.zip\pip\__init__.py", l
ine 26, in <module>
File "C:\Users\dell\AppData\Local\Temp\tmpa0q8wceq\pip.zip\pip\utils\__init__.
py", line 27, in <module>
File "C:\Users\dell\AppData\Local\Temp\tmpa0q8wceq\pip.zip\pip\_vendor\pkg_res
ources\__init__.py", line 35, in <module>
File "c:\Python\lib\plistlib.py", line 65, in <module>
from xml.parsers.expat import ParserCreate
File "c:\Python\lib\xml\parsers\expat.py", line 4, in <module>
from pyexpat import *
ImportError: DLL load failed: The specified module could not be found.
I'm pretty sure that pip comes with python 3 and up. If you have troubles running only "pip" from the terminal i'd recommend you try: python -m pip ...
Try to use the 'Alternative instructions' from this post.
Hope this can help.
I'm trying to create a conda environment using git-bash and win10:
$ conda create --name my_env
An unexpected error has occurred.
Traceback (most recent call last):
File "c:\Miniconda2\Scripts\conda-script.py", line 5, in <module>
sys.exit(conda.cli.main())
File "c:\Miniconda2\lib\site-packages\conda\cli\main.py", line 164, in main
return conda_exception_handler(_main, *args)
File "c:\Miniconda2\lib\site-packages\conda\exceptions.py", line 607, in conda_exception_handler
print_unexpected_error_message(e)
File "c:\Miniconda2\lib\site-packages\conda\exceptions.py", line 561, in print_unexpected_error_message
info_stdout, info_stderr = get_info()
File "c:\Miniconda2\lib\site-packages\conda\exceptions.py", line 531, in get_info
args.func(args, p)
File "c:\Miniconda2\lib\site-packages\conda\cli\main_info.py", line 142, in execute
from conda.api import get_index
File "c:\Miniconda2\lib\site-packages\conda\api.py", line 1, in <module>
from .core.index import get_index
File "c:\Miniconda2\lib\site-packages\conda\core\index.py", line 9, in <module>
from .repodata import collect_all_repodata
File "c:\Miniconda2\lib\site-packages\conda\core\repodata.py", line 22, in <module>
from requests.packages.urllib3.exceptions import InsecureRequestWarning
ImportError: cannot import name InsecureRequestWarning
How can I fix this?
Try this
pip install -U requests
Im trying to install ansible-galaxy roles on Mac OS X El Capitan via CLI
$ ansible-galaxy install -r requirements.yml
I am getting this error:
ERROR! Unexpected Exception: (setuptools 1.1.6 (/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python), Requirement.parse('setuptools>=11.3'))
the full traceback was:
Traceback (most recent call last):
File "/usr/local/bin/ansible-galaxy", line 73, in <module>
mycli = getattr(__import__("ansible.cli.%s" % sub, fromlist=[myclass]), myclass)
File "/Library/Python/2.7/site-packages/ansible/cli/galaxy.py", line 38, in <module>
from ansible.galaxy.role import GalaxyRole
File "/Library/Python/2.7/site-packages/ansible/galaxy/role.py", line 35, in <module>
from ansible.playbook.role.requirement import RoleRequirement
File "/Library/Python/2.7/site-packages/ansible/playbook/__init__.py", line 25, in <module>
from ansible.playbook.play import Play
File "/Library/Python/2.7/site-packages/ansible/playbook/play.py", line 27, in <module>
from ansible.playbook.base import Base
File "/Library/Python/2.7/site-packages/ansible/playbook/base.py", line 35, in <module>
from ansible.parsing.dataloader import DataLoader
File "/Library/Python/2.7/site-packages/ansible/parsing/dataloader.py", line 32, in <module>
from ansible.parsing.vault import VaultLib
File "/Library/Python/2.7/site-packages/ansible/parsing/vault/__init__.py", line 67, in <module>
from cryptography.hazmat.primitives.hashes import SHA256 as c_SHA256
File "/Library/Python/2.7/site-packages/cryptography/hazmat/primitives/hashes.py", line 15, in <module>
from cryptography.hazmat.backends.interfaces import HashBackend
File "/Library/Python/2.7/site-packages/cryptography/hazmat/backends/__init__.py", line 7, in <module>
import pkg_resources
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2797, in <module>
parse_requirements(__requires__), Environment()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 580, in resolve
raise VersionConflict(dist,req) # XXX put more info here
VersionConflict: (setuptools 1.1.6 (/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python), Requirement.parse('setuptools>=11.3'))
Run the following to upgrade setuptools under the python user:
pip install --upgrade setuptools --user python
For some reason, the way things are installed inside OS X (and in my case, under CentOS 7 inside a Docker container), the setuptools package doesn't get installed correctly under the right user.
I am learning Python and the documentation I am following suggested installing Firebird. I ran sudo pip install fdb.
I saw a build directory which I understand just contains the source code and not the binaries so I deleted that. When I do pip freeze | grep fdb, I cannot find Firebird.
I tried running sudo pip install fdb again and I am getting this error now (and the build directory is returning):
Downloading/unpacking fdb
Downloading fdb-0.9.9.tar.gz (481Kb): 481Kb downloaded
Running setup.py egg_info for package fdb
Traceback (most recent call last):
File "<string>", line 14, in <module>
File "/Users/nayef/Documents/Django/build/fdb/setup.py", line 7, in <module>
from fdb import __version__
File "fdb/__init__.py", line 23, in <module>
from fdb.fbcore import *
File "fdb/fbcore.py", line 26, in <module>
from . import ibase
File "fdb/ibase.py", line 1164, in <module>
isc_attach_database = fb_library.isc_attach_database
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py", line 366, in __getattr__
func = self.__getitem__(name)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py", line 371, in __getitem__
func = self._FuncPtr((name_or_ordinal, self))
AttributeError: dlsym(RTLD_DEFAULT, isc_attach_database): symbol not found
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 14, in <module>
File "/Users/nayef/Documents/Django/build/fdb/setup.py", line 7, in <module>
from fdb import __version__
File "fdb/__init__.py", line 23, in <module>
from fdb.fbcore import *
File "fdb/fbcore.py", line 26, in <module>
from . import ibase
File "fdb/ibase.py", line 1164, in <module>
isc_attach_database = fb_library.isc_attach_database
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py", line 366, in __getattr__
func = self.__getitem__(name)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py", line 371, in __getitem__
func = self._FuncPtr((name_or_ordinal, self))
AttributeError: dlsym(RTLD_DEFAULT, isc_attach_database): symbol not found
----------------------------------------
Command python setup.py egg_info failed with error code 1 in /Users/nayef/Documents/Django/build/fdb
Storing complete log in /Users/nayef/Library/Logs/pip.log
What am I doing wrong here? I'm not sure what's wrong with pip. I never faced any issues with it.
This isn't pip failing, this is the fdb package installation failing.
It seems you have some drivers missing, specifically, the firebird header files.
Do you have firebird installed? Make sure you install the Python bindings only after the driver has been installed.