I'm running a script in a virtual environment on a new machine. Running the script gives me the following traceback.
Traceback:
Traceback (most recent call last):
File "zoneMapRGB.py", line 11, in <module>
from skimage import io, color
File "/opt/python/3.6/lib/python3.6/site-packages/skimage/io/__init__.py", line 11, in <module>
from ._io import *
File "/opt/python/3.6/lib/python3.6/site-packages/skimage/io/_io.py", line 7, in <module>
from ..color import rgb2grey
File "/opt/python/3.6/lib/python3.6/site-packages/skimage/color/__init__.py", line 1, in <module>
from .colorconv import (convert_colorspace,
File "/opt/python/3.6/lib/python3.6/site-packages/skimage/color/colorconv.py", line 368, in <module>
rgb_from_xyz = linalg.inv(xyz_from_rgb)
File "/opt/python/3.6/lib/python3.6/site-packages/scipy/linalg/basic.py", line 947, in inv
a1 = _asarray_validated(a, check_finite=check_finite)
File "/opt/python/3.6/lib/python3.6/site-packages/scipy/_lib/_util.py", line 228, in _asarray_validated
import scipy.sparse
File "/opt/python/3.6/lib/python3.6/site-packages/scipy/sparse/__init__.py", line 229, in <module>
from .csr import *
File "/opt/python/3.6/lib/python3.6/site-packages/scipy/sparse/csr.py", line 15, in <module>
from ._sparsetools import csr_tocsc, csr_tobsr, csr_count_blocks, \
ImportError: /opt/matlab/extern/engines/python/dist/matlab/engine/glnxa64/../../../../../../../sys/os/glnxa64/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /opt/python/3.6/lib/python3.6/site-packages/scipy/sparse/_sparsetools.cpython-36m-x86_64-linux-gnu.so)
It seems scipy is trying to get libstdc++.so.6 from a matlab folder instead of the python directory. Is there any way to correct this behavior?
Related
(base) kiin#kiin ~ % python3 -m anki_vector.configure
Traceback (most recent call last):
File "/Users/kiin/opt/anaconda3/lib/python3.9/runpy.py", line 188, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "/Users/kiin/opt/anaconda3/lib/python3.9/runpy.py", line 111, in _get_module_details
__import__(pkg_name)
File "/Users/kiin/.local/lib/python3.9/site-packages/anki_vector/__init__.py", line 22, in <module>
from . import messaging
File "/Users/kiin/.local/lib/python3.9/site-packages/anki_vector/messaging/__init__.py", line 43, in <module>
from . import client
File "/Users/kiin/.local/lib/python3.9/site-packages/anki_vector/messaging/client.py", line 23, in <module>
from .alexa_pb2_grpc import *
File "/Users/kiin/.local/lib/python3.9/site-packages/anki_vector/messaging/alexa_pb2_grpc.py", line 2, in <module>
import grpc
File "/Users/kiin/.local/lib/python3.9/site-packages/grpc/__init__.py", line 22, in <module>
from grpc import _compression
File "/Users/kiin/.local/lib/python3.9/site-packages/grpc/_compression.py", line 15, in <module>
from grpc._cython import cygrpc
ImportError: dlopen(/Users/kiin/.local/lib/python3.9/site-packages/grpc/_cython/cygrpc.cpython-39-darwin.so, 0x0002): symbol not found in flat namespace (_CFRelease)
I've tried uninstalling and reinstalling the SDK, as well as downgrade to Python 3.8. Same errors for both.
i have problem with import pandas package on one of my hosting accounts:
Pandas is installed (v 1.5.1)
I've tested import pandas on other hosting accounts
It is shared hosting. I cannot do sudo commands. Anaconda also can't be installed
I'm using python 3.9.0
I've tested it on virtual env ( response listed below ) and also without virtual env
source ~/.virtualenvs/MY_VIRTUAL_ENV_NAME/bin/activate
$ python3
>>> import pandas as pa
and i recive response:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/MY_LOGIN/.virtualenvs/MY_VIRTUAL_ENV_NAME/lib/python3.9/site-packages/pandas/__init__.py", line 48, in <module>
from pandas.core.api import (
File "/home/MY_LOGIN/.virtualenvs/MY_VIRTUAL_ENV_NAME/lib/python3.9/site-packages/pandas/core/api.py", line 47, in <module>
from pandas.core.groupby import (
File "/home/MY_LOGIN/.virtualenvs/MY_VIRTUAL_ENV_NAME/lib/python3.9/site-packages/pandas/core/groupby/__init__.py", line 1, in <module>
from pandas.core.groupby.generic import (
File "/home/MY_LOGIN/.virtualenvs/MY_VIRTUAL_ENV_NAME/lib/python3.9/site-packages/pandas/core/groupby/generic.py", line 76, in <module>
from pandas.core.frame import DataFrame
File "/home/MY_LOGIN/.virtualenvs/MY_VIRTUAL_ENV_NAME/lib/python3.9/site-packages/pandas/core/frame.py", line 170, in <module>
from pandas.core.generic import NDFrame
File "/home/MY_LOGIN/.virtualenvs/MY_VIRTUAL_ENV_NAME/lib/python3.9/site-packages/pandas/core/generic.py", line 147, in <module>
from pandas.core.describe import describe_ndframe
File "/home/MY_LOGIN/.virtualenvs/MY_VIRTUAL_ENV_NAME/lib/python3.9/site-packages/pandas/core/describe.py", line 45, in <module>
from pandas.io.formats.format import format_percentiles
File "/home/MY_LOGIN/.virtualenvs/MY_VIRTUAL_ENV_NAME/lib/python3.9/site-packages/pandas/io/formats/format.py", line 105, in <module>
from pandas.io.common import (
File "/home/MY_LOGIN/.virtualenvs/MY_VIRTUAL_ENV_NAME/lib/python3.9/site-packages/pandas/io/common.py", line 8, in <module>
import bz2
File "/home/MY_LOGIN/.local/lib/python3.9/bz2.py", line 18, in <module>
from _bz2 import BZ2Compressor, BZ2Decompressor
ImportError: libbz2.so.1.0: cannot open shared object file: No such file or directory
I am trying to run one git repo on Google cloud. But the system could not find the library path.
myname#cloudshell:~/text-to-text-transfer-transformer (lastproject-258210)$ python3 -c "import t5; print(t5.data.MixtureRegistry.names())"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/myname/text-to-text-transfer-transformer/t5/__init__.py", line 17, in <module>
import t5.data
File "/home/name/text-to-text-transfer-transformer/t5/data/__init__.py", line 17, in <module>
import t5.data.mixtures
File "/home/myname/text-to-text-transfer-transformer/t5/data/mixtures.py", line 26, in <module>
import t5.data.tasks # pylint: disable=unused-import
File "/home/myname/text-to-text-transfer-transformer/t5/data/tasks.py", line 25, in <module>
from t5.data.utils import set_global_cache_dirs
File "/home/myname/text-to-text-transfer-transformer/t5/data/utils.py", line 32, in <module>
from t5.data import sentencepiece_vocabulary
File "/home/myname/text-to-text-transfer-transformer/t5/data/sentencepiece_vocabulary.py", line 23, in <module>
import tensorflow_text as tf_text
File "/usr/local/lib/python3.7/site-packages/tensorflow_text-1.15.0rc0-py3.7-linux-x86_64.egg/tensorflow_text/__init__.py", line 21, in <module>
from tensorflow_text.python import metrics
File "/usr/local/lib/python3.7/site-packages/tensorflow_text-1.15.0rc0-py3.7-linux-x86_64.egg/tensorflow_text/python/metrics/__init__.py", line 20, in <module>
from tensorflow_text.python.metrics.text_similarity_metric_ops import *
File "/usr/local/lib/python3.7/site-packages/tensorflow_text-1.15.0rc0-py3.7-linux-x86_64.egg/tensorflow_text/python/metrics/text_similarity_metric_ops.py", line 28, in <module>
gen_text_similarity_metric_ops = load_library.load_op_library(resource_loader.get_path_to_datafile('_text_similarity_metric_ops.so'))
File "/usr/local/lib/python3.7/site-packages/tensorflow_core/python/framework/load_library.py", line 61, in load_op_library
lib_handle = py_tf.TF_LoadLibrary(library_filename)
tensorflow.python.framework.errors_impl.NotFoundError: libtensorflow_framework.so.1: cannot open shared object file: No such file or directory
I tried to print out the location of the libtensorflow:
myname#cloudshell:~/text-to-text-transfer-transformer (lastproject-258210)$ python3 -c 'import tensorflow as tf; print(tf.sysconfig.get_lib())'
/usr/local/lib/python3.7/site-packages/tensorflow_core
The question is how could I change the path so the system will find the path.Thanks for your help in advance!
You should be using the tensorflow-text version specified in the pip package (1.15rc0), which matches tensorflow 1.15.0. Are you manually installing a different version?
I have anaconda installed. Running python 2.7. I have uninstalled, reinstalled, and upgraded numpy to 1.11.0, uninstalled and reinstalled pandas, and I still get this traceback when I try to import numpy:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/nicole/anaconda/lib/python2.7/site-packages/numpy-1.11.0-py2.7-macosx-10.5-x86_64.egg/numpy/__init__.py", line 180, in <module>
from . import add_newdocs
File "/Users/nicole/anaconda/lib/python2.7/site-packages/numpy-1.11.0-py2.7-macosx-10.5-x86_64.egg/numpy/add_newdocs.py", line 13, in <module>
from numpy.lib import add_newdoc
File "/Users/nicole/anaconda/lib/python2.7/site-packages/numpy-1.11.0-py2.7-macosx-10.5-x86_64.egg/numpy/lib/__init__.py", line 8, in <module>
from .type_check import *
File "/Users/nicole/anaconda/lib/python2.7/site-packages/numpy-1.11.0-py2.7-macosx-10.5-x86_64.egg/numpy/lib/type_check.py", line 11, in <module>
import numpy.core.numeric as _nx
File "/Users/nicole/anaconda/lib/python2.7/site-packages/numpy-1.11.0-py2.7-macosx-10.5-x86_64.egg/numpy/core/__init__.py", line 58, in <module>
from numpy.testing.nosetester import _numpy_tester
File "/Users/nicole/anaconda/lib/python2.7/site-packages/numpy-1.11.0-py2.7-macosx-10.5-x86_64.egg/numpy/testing/__init__.py", line 12, in <module>
from . import decorators as dec
File "/Users/nicole/anaconda/lib/python2.7/site-packages/numpy-1.11.0-py2.7-macosx-10.5-x86_64.egg/numpy/testing/decorators.py", line 21, in <module>
from .utils import SkipTest
File "/Users/nicole/anaconda/lib/python2.7/site-packages/numpy-1.11.0-py2.7-macosx-10.5-x86_64.egg/numpy/testing/utils.py", line 15, in <module>
from tempfile import mkdtemp, mkstemp
File "/Users/nicole/anaconda/lib/python2.7/tempfile.py", line 35, in <module>
from random import Random as _Random
File "random/__init__.py", line 99, in <module>
from .mtrand import *
File "numpy.pxd", line 92, in init mtrand (numpy/random/mtrand/mtrand.c:37726)
It was working fine last night, which is really frustrating. Thank you for any insight.
I have installed py2exe. I am trying a convert a script in to .exe. Here is my setup script.
from distutils.core import setup
import py2exe
setup(console=['Script1.py'])
When i run this, I am getting import error. The traceback is given below.
Traceback (most recent call last):
File "C:\Python27\Lib\site-packages\pythonwin\pywin\framework\scriptutils.py", line 326, in RunScript
exec codeObject in __main__.__dict__
File "C:\Users\z010388-dev\Desktop\setup.py", line 2, in <module>
import py2exe
File "C:\Python27\lib\site-packages\py2exe\__init__.py", line 9, in <module>
patch_distutils()
File "C:\Python27\lib\site-packages\py2exe\patch_distutils.py", line 68, in patch_distutils
from . import distutils_buildexe
File "C:\Python27\lib\site-packages\py2exe\distutils_buildexe.py", line 91, in <module>
from . import runtime
File "C:\Python27\lib\site-packages\py2exe\runtime.py", line 3, in <module>
from .dllfinder import Scanner, pydll
File "C:\Python27\lib\site-packages\py2exe\dllfinder.py", line 5, in <module>
from . import _wapi
ImportError: cannot import name _wapi
Is anything wrong with my setup script? What is wrong?