I got this error: ImportError: cannot import name 'ArraySliceDep' from 'dask.layers'
when I import stackstac. I have dask installed (2021.11.2 version) and my Python is 3.10 version
Related
I am new to Ray and wanted to set up a cluster with some dependencies. I first set up a cluster with some dependencies supported out of the box and everything worked fine. Now, I have the following scenario that I simplified to this demonstration. There is a problem with joblib even though I specify it in a runtime env as to be downloaded with pip and then pass it to ray.init.
from ray.util.joblib import register_ray
import joblib
import ray
import numpy as np
# connect to ray
runtime_env={"pip": ["joblib"]}
ray.init(address='auto', _redis_password=..., runtime_env=runtime_env)
#ray.remote(num_cpus=1)
def train_ray(...):
...
register_ray()
with joblib.parallel_backend('ray'):
...
return ...
I get the following error:
from ray.util.joblib import register_ray
File "/home/ray/anaconda3/lib/python3.7/site-packages/ray/util/joblib/__init__.py", line 1, in <module>
from joblib.parallel import register_parallel_backend
ModuleNotFoundError: No module named 'joblib'
command terminated with exit code 1
Thanks for any suggestions.
Getting an error when trying to import plotline; I pip installed Unicode, but still seeing the same error. Not sure what else I need to install.
import plotline as p9
ImportError: cannot import name 'unicode'
Currently I am executing doamusic python codes from
https://github.com/yump/doamusic.git
I am using python 3.7.2. (Python IDLE) on windows.
My directory tree is
F:\doamusic_project\doamusic\music.py
when I run music.py, I am getting the following error
Traceback (most recent call last):
File "F:\doamusic_project\doamusic\music.py", line 31, in
from . import util
File "..\doamusic__init__.py", line 1, in
from doamusic.music import *
File "..\doamusic\music.py", line 32, in
from . import _music
ImportError: cannot import name '_music' from 'doamusic' (..\doamusic__init__.py)
What is the reason for not importing _music ?.
You are trying to do an import from .pyx file. A .pyx file must be compiled unlike a .py file.
Try to do that before the import of _music:
import pyximport
pyximport.install()
More info Cython
I'm getting an ImportError if OpenCV (cv2) is imported after the tensorflow exporter.
ubuntu#ip-172-31-2-144:~/Downloads/opencv-2.4.13/release$ python
Python 2.7.6 (default, Jun 22 2015, 17:58:13)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from tensorflow.contrib.session_bundle import exporter
I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcublas.so locally
I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcudnn.so locally
I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcufft.so locally
I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcuda.so.1 locally
I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcurand.so locally
>>> import cv2
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: dlopen: cannot load any more object with static TLS
>>>
However, it works just fine the other way around:
ubuntu#ip-172-31-2-144:~/Downloads/opencv-2.4.13/release$ python
Python 2.7.6 (default, Jun 22 2015, 17:58:13)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
>>> from tensorflow.contrib.session_bundle import exporter
I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcublas.so locally
I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcudnn.so locally
I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcufft.so locally
I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcuda.so.1 locally
I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcurand.so locally
>>>
Any idea what's going on?
I had the same error as you and I've just fixed it executing import opencv2 a second time. It's a workaround.. but I can continue working, so..
I had same issue but solved.
When I import cv2 on jupyter notebook, same error was displayed, but after that, I imported cv2 on terminal (python) then it worked.
And finally, cv2 can be imported on jupyter notebook.
Please try that.
I want to use Biopython's PDBParser to download PDB files, but this error appears when I try to import it:
Traceback (most recent call last):File "C:\Python27\TAREA 3 FINAL.PY", line 33, in [HTML] from Bio.PDB import * File "C:\Python27\lib\site-packages\Bio\PDB_init_.py", line 15, in [HTML] from PDBParser import PDBParser File "C:\Python27\lib\site-packages\Bio\PDB\PDBParser.py", line 13, in [HTML] import numpy ImportError: No module named numpy
What's going on here?
Biopython requires the numpy module. You need to install numpy in order to use Biopython. You can find the latest version here.