I have a docker image in alpine, and need to use pytorch on it. However, as stated in the pytorch website, it requires glibc to run, otherwise it will give error below
import torch
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.7/site-packages/torch/__init__.py", line 189, in <module>
_load_global_deps()
File "/usr/lib/python3.7/site-packages/torch/__init__.py", line 142, in _load_global_deps
ctypes.CDLL(lib_path, mode=ctypes.RTLD_GLOBAL)
File "/usr/lib/python3.7/ctypes/__init__.py", line 364, in __init__
self._handle = _dlopen(self._name, mode)
OSError: Error relocating /usr/lib/python3.7/site-packages/torch/lib/libgomp-7c85b1e2.so.1: pthread_attr_setaffinity_np: symbol not found
I've tried to install glibc from https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.29-r0/glibc-2.29-r0.apk, but error info stay the same.
Related
I ma trying to install proTeXt (protext-3.2-031721.zip) in my 64bi-windows laptop, when I am trying to run the setup.exe file I am receiving a warning to check a logfile which contains the following
Traceback (most recent call last):
File "protext-setup.py", line 298, in <module>
File "protext-setup.py", line 97, in __init__
File "wx\_controls.pyc", line 494, in __init__
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe7 in position 4: ordinal not in range(128)
Can anyone give me a hint?
Anna
My CKAN Docker install seems perfect except that the ckan container exits immediately after a restart.strong textI have repeatedly tried a rebuild of the docker containers. I see no errors except a reference to the deprecation of python2. Please advise on any issues that I may have overlooked or something missing. This installation is on Ubuntu 19.10.
docker log is as follows:
Command 'db' not known (you may need to run setup.py egg_info)
Known commands:
create Create the file layout for a Python distribution
Traceback (most recent call last):
File "/usr/local/bin/ckan-paster", line 8, in <module>
sys.exit(run())
File "/usr/lib/ckan/venv/local/lib/python2.7/site-packages/paste/script/command.py", line 102, in run
invoke(command, command_name, options, args[1:])
File "/usr/lib/ckan/venv/local/lib/python2.7/site-packages/paste/script/command.py", line 141, in invoke
exit_code = runner.run(args)
File "/usr/lib/ckan/venv/local/lib/python2.7/site-packages/paste/script/command.py", line 806, in run
command.load().summary))
File "/usr/lib/ckan/venv/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2321, in load
return self.resolve()
File "/usr/lib/ckan/venv/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2327, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/usr/lib/ckan/venv/src/ckan/ckanext/datapusher/cli.py", line 7, in <module>
import ckan.lib.cli as cli
File "/usr/lib/ckan/venv/src/ckan/ckan/lib/cli.py", line 17, in <module>
from ckan.cli import load_config as _get_config
File "/usr/lib/ckan/venv/src/ckan/ckan/cli/__init__.py", line 8, in <module>
from configparser import ConfigParser
ImportError: No module named configparser
Command 'db' not known (you may need to run setup.py egg_info)
Known commands:
create Create the file layout for a Python distribution
Traceback (most recent call last):
File "/usr/local/bin/ckan-paster", line 8, in <module>
sys.exit(run())
File "/usr/lib/ckan/venv/local/lib/python2.7/site-packages/paste/script/command.py", line 102, in run
invoke(command, command_name, options, args[1:])
File "/usr/lib/ckan/venv/local/lib/python2.7/site-packages/paste/script/command.py", line 141, in invoke
exit_code = runner.run(args)
File "/usr/lib/ckan/venv/local/lib/python2.7/site-packages/paste/script/command.py", line 806, in run
command.load().summary))
File "/usr/lib/ckan/venv/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2321, in load
return self.resolve()
File "/usr/lib/ckan/venv/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2327, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/usr/lib/ckan/venv/src/ckan/ckanext/datapusher/cli.py", line 7, in <module>
import ckan.lib.cli as cli
File "/usr/lib/ckan/venv/src/ckan/ckan/lib/cli.py", line 17, in <module>
from ckan.cli import load_config as _get_config
File "/usr/lib/ckan/venv/src/ckan/ckan/cli/__init__.py", line 8, in <module>
from configparser import ConfigParser
ImportError: No module named configparser
Traceback (most recent call last):
File "/usr/local/bin/ckan-paster", line 8, in <module>
Command 'db' not known (you may need to run setup.py egg_info)
Known commands:
create Create the file layout for a Python distribution
sys.exit(run())
File "/usr/lib/ckan/venv/local/lib/python2.7/site-packages/paste/script/command.py", line 102, in run
invoke(command, command_name, options, args[1:])
File "/usr/lib/ckan/venv/local/lib/python2.7/site-packages/paste/script/command.py", line 141, in invoke
exit_code = runner.run(args)
File "/usr/lib/ckan/venv/local/lib/python2.7/site-packages/paste/script/command.py", line 806, in run
command.load().summary))
File "/usr/lib/ckan/venv/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2321, in load
return self.resolve()
File "/usr/lib/ckan/venv/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2327, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/usr/lib/ckan/venv/src/ckan/ckanext/datapusher/cli.py", line 7, in <module>
import ckan.lib.cli as cli
File "/usr/lib/ckan/venv/src/ckan/ckan/lib/cli.py", line 17, in <module>
from ckan.cli import load_config as _get_config
File "/usr/lib/ckan/venv/src/ckan/ckan/cli/__init__.py", line 8, in <module>
from configparser import ConfigParser
ImportError: No module named configparser
You are using python 2.7 but importing configparser, which is Python 3 module. Check which version you are pooling from the Docker, I think you need 2.8.x tag as the latest stable.
I need to download opencv to run a project that requires python 3.6 and opencv. I have downloaded opencv.
I know my error is similar to OpenCV giving an error whenever import cv2 is used but I have tried both of the solutions mentioned in that question and neither works for me.
!pip install opencv-python
Requirement already satisfied: opencv-python in /Users/aa/.conda/envs/py36/lib/python3.6/site-packages (3.4.2.16)
Requirement already satisfied: numpy>=1.11.3 in /Users/aa/.conda/envs/py36/lib/python3.6/site-packages (from opencv-python) (1.18.3)
but when i typed
import cv2
I got the following error:
ImportError Traceback (most recent call last)
<ipython-input-27-c8ec22b3e787> in <module>
----> 1 import cv2
~/.conda/envs/py36/lib/python3.6/site-packages/cv2/__init__.py in <module>
1 import importlib
2
----> 3 from .cv2 import *
4 from .data import *
5
ImportError: dlopen(/Users/aa/.conda/envs/py36/lib/python3.6/site-packages/cv2/cv2.cpython-36m-darwin.so, 2): Symbol not found: __ZN10QBoxLayout10invalidateEv
Referenced from: /Users/aa/.conda/envs/py36/lib/python3.6/site-packages/cv2/cv2.cpython-36m-darwin.so
Expected in: /Users/aa/.conda/envs/py36/lib/python3.6/site-packages/cv2/.dylibs/QtGui
in /Users/aa/.conda/envs/py36/lib/python3.6/site-packages/cv2/cv2.cpython-36m-darwin.so
I also tried to use conda to install but I always got the following error:
Proceed ([y]/n)? y
Preparing transaction: failed
>>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<
Traceback (most recent call last):
File "/anaconda2/lib/python2.7/site-packages/conda/exceptions.py", line 819, in __call__
return func(*args, **kwargs)
File "/anaconda2/lib/python2.7/site-packages/conda/cli/main.py", line 78, in _main
exit_code = do_call(args, p)
File "/anaconda2/lib/python2.7/site-packages/conda/cli/conda_argparse.py", line 77, in do_call
exit_code = getattr(module, func_name)(args, parser)
File "/anaconda2/lib/python2.7/site-packages/conda/cli/main_install.py", line 11, in execute
install(args, parser, 'install')
File "/anaconda2/lib/python2.7/site-packages/conda/cli/install.py", line 253, in install
handle_txn(unlink_link_transaction, prefix, args, newenv)
File "/anaconda2/lib/python2.7/site-packages/conda/cli/install.py", line 282, in handle_txn
unlink_link_transaction.execute()
File "/anaconda2/lib/python2.7/site-packages/conda/core/link.py", line 223, in execute
self.verify()
File "/anaconda2/lib/python2.7/site-packages/conda/common/io.py", line 46, in decorated
return f(*args, **kwds)
File "/anaconda2/lib/python2.7/site-packages/conda/core/link.py", line 200, in verify
self.prepare()
File "/anaconda2/lib/python2.7/site-packages/conda/core/link.py", line 192, in prepare
stp.remove_specs, stp.update_specs)
File "/anaconda2/lib/python2.7/site-packages/conda/core/link.py", line 282, in _prepare
mkdir_p(transaction_context['temp_dir'])
File "/anaconda2/lib/python2.7/site-packages/conda/gateways/disk/__init__.py", line 60, in mkdir_p
makedirs(path)
File "/anaconda2/lib/python2.7/os.py", line 157, in makedirs
mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/anaconda2/.condatmp'
I cannot get it to work! Been trying for almost two days now. Installed Cuda8 and CuDnn 6 - didn't work. added the solution written in ImportError: libcudnn when running a TensorFlow program here.
The error I'm getting -
Traceback (most recent call last):
File "/home/shenath/tensorflow/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow.py", line 41, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "/home/shenath/tensorflow/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "/home/shenath/tensorflow/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
File "/home/shenath/tensorflow/lib/python3.5/imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "/home/shenath/tensorflow/lib/python3.5/imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: libcudnn.so.6: cannot open shared object file: No such file or directory
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/shenath/tensorflow/lib/python3.5/site-packages/tensorflow/__init__.py", line 24, in <module>
from tensorflow.python import *
File "/home/shenath/tensorflow/lib/python3.5/site-packages/tensorflow/python/__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "/home/shenath/tensorflow/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow.py", line 52, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "/home/shenath/tensorflow/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow.py", line 41, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "/home/shenath/tensorflow/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "/home/shenath/tensorflow/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
File "/home/shenath/tensorflow/lib/python3.5/imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "/home/shenath/tensorflow/lib/python3.5/imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: libcudnn.so.6: cannot open shared object file: No such file or directory
Failed to load the native TensorFlow runtime.
I am new to this. Any help will be really appreciated. If you need anymore info I'll be happy to provide.
Make sure they are in the correct directory after you install cuda and cudnn.
Run the following command after installing cudnn 6. Tensorflow only checks the required file on you cuda directory. So we copy or link the required files from cudnn to that directory.
mkdir /usr/lib/x86_64-linux-gnu/include/ && \
ln -s /usr/lib/x86_64-linux-gnu/include/cudnn.h /usr/lib/x86_64-linux-gnu/include/cudnn.h && \
ln -s /usr/include/cudnn.h /usr/local/cuda/include/cudnn.h && \
ln -s /usr/lib/x86_64-linux-gnu/libcudnn.so /usr/local/cuda/lib64/libcudnn.so &&
ln -s /usr/lib/x86_64-linux-gnu/libcudnn.so.6 /usr/local/cuda/lib64/libcudnn.so.6
So, if you are still having that error make sure follow the steps here.
When Running ipyhton notebook on Windows 7 64bit and launching notebook with python 2 kernel I get an error:
Traceback (most recent call last):
File "C:\Users\USER1\Anaconda2\lib\site-packages\notebook\base\handlers.py", line 436, in wrapper
result = yield gen.maybe_future(method(self, *args, **kwargs))
File "C:\Users\USER1\Anaconda2\lib\site-packages\notebook\services\sessions\handlers.py", line 56, in post
model = sm.create_session(path=path, kernel_name=kernel_name)
File "C:\Users\USER1\Anaconda2\lib\site-packages\notebook\services\sessions\sessionmanager.py", line 66, in create_session
kernel_name=kernel_name)
File "C:\Users\USER1\Anaconda2\lib\site-packages\notebook\services\kernels\kernelmanager.py", line 84, in start_kernel
**kwargs)
File "C:\Users\USER1\Anaconda2\lib\site-packages\jupyter_client\multikernelmanager.py", line 109, in start_kernel
km.start_kernel(**kwargs)
File "C:\Users\USER1\Anaconda2\lib\site-packages\jupyter_client\manager.py", line 244, in start_kernel
**kw)
File "C:\Users\USER1\Anaconda2\lib\site-packages\jupyter_client\manager.py", line 190, in _launch_kernel
return launch_kernel(kernel_cmd, **kw)
File "C:\Users\USER1\Anaconda2\lib\site-packages\jupyter_client\launcher.py", line 115, in launch_kernel
proc = Popen(cmd, **kwargs)
File "C:\Users\USER1\Anaconda2\lib\subprocess.py", line 710, in __init__
errread, errwrite)
File "C:\Users\USER1\Anaconda2\lib\subprocess.py", line 958, in _execute_child
startupinfo)
WindowsError: [Error 2] The system cannot find the file specified
I have investigated further and I have added following print lines before proc = Popen(cmd, **kwargs) inside launcher.py file
print cmd
print kwargs
Now I see that proc = Popen(cmd, **kwargs) is called with cmd=
['C:\\Users\\USER1\\Anaconda2_32bit\\python.exe', '-m', 'ipykernel', '-f', '
C:\\Users\\USER1\\AppData\\Roaming\\jupyter\\runtime\\kernel-a3f46334-4491-4
fef-aeb1-6772b8392954.json']
this is a problem because my python.exe is not in
C:\\Users\\USER1\\Anaconda2_32bit\\python.exe
but in
C:\\Users\\USER1\\Anaconda2\\python.exe
However I have checked paths in Computer/Advanced system settings/Advanced/Enviroment variables and \\Anaconda2_32bit\\ is never specified there.
Thus I suspect that the false path is specified somewhere else. Where could this be and how can I fix it?
Also I have previously had an installation of Anaconda in \\Anaconda2_32bit\\ but I have uninstalled it.
The ipython has kernels registered in special configuration files
I have run the command:
ipython kernelspec list
the output was:
Available kernels:
python2 C:\ProgramData\jupyter\kernels\python2
I have looked into C:\ProgramData\jupyter\kernels\python2\kernel.json file and there was a wrong path set for python2. I have fixed the path and it works now.