I am trying to import dask.distributed package, but I keep getting this error: ImportError: cannot import name 'collections_to_dsk'. Help is appreciated.
I resolved the error, there were some outdated packages including imageio which needed upgrade to work with dask.distributed and dask.dataframe.
Related
I tried to upgrade a few packages with pip and also my python from 3.9 to 3.9.13. so now i use RIDE v2.0b1 running on Python 3.9.13. i use robotframework-sudslibrary-aljcalandra 1.1.4. instead of 1.1 and urllib3 1.26.12 instead of 1.26.9 for calls to webservices
I get an error when running a keyword of sudslibrary (Create Soap Client)
FAIL : AttributeError: module 'urllib' has no attribute 'pathname2url'
Since i don't have any knowledge of python and all solutions on google are about python, i'm stuck with this error. could anybody please help me?
In the following site
https://itecnote.com/tecnote/python-3-4-2-urlib-no-attribute-pathname2url/ it says that pathname2url function of urllib is now in another library which is urllib.request.pathname2url.
Should i install this python library independently by pip?
it's strange because with my older installations (ython 3.9) i didn't have urllib.request.pathname2url library when i pip(ed) list it.
Thank you for your precious help i'm badly stucked
This seems a problem on the sudslibrary you are using. A possible workaround is to fix the offending code by replacing with the new module reference.
You could (should?) find all references to the import or use of pathname2urlin that module library and replace with fixing code. For example:
import urllib.request.pathname2url as pathname2url
or
if you have from urllib import pathname2url
from urllib.request import pathname2url
The best would be, after identifying the fix, to propose a Pull Request for the sudslibrary, with something like:
try:
from urllib import pathname2url
except ImportError:
from urllib.request import pathname2url
And similar for the absolut imports.
I installed the topology package by downgrading the keras (pip install 'keras==2.1.6' --force-reinstall), because it doesn't exist in newer versions. I am still getting an error to import Network.
Trying:
from keras.engine.topology import Network
Error:
ImportError: cannot import name 'Network' from 'keras.engine.topology' (/usr/local/lib/python3.7/dist-packages/keras/engine/topology.py)
If Network doesn't exist then how can I get this so that rest of the code (CycleGAN) can use Network(). Any help would be appreciated.
When i try importing the s3fs library in pyspark using the following code:
import s3fs
I get the following error:
An error was encountered: cannot import name 'maybe_sync' from
'fsspec.asyn' (/usr/local/lib/python3.7/site-packages/fsspec/asyn.py)
Traceback (most recent call last): File
"/usr/local/lib/python3.7/site-packages/s3fs/init.py", line 1, in
from .core import S3FileSystem, S3File File "/usr/local/lib/python3.7/site-packages/s3fs/core.py", line 12, in
from fsspec.asyn import AsyncFileSystem, sync, sync_wrapper, maybe_sync ImportError: cannot import name 'maybe_sync' from
'fsspec.asyn' (/usr/local/lib/python3.7/site-packages/fsspec/asyn.py)
The fsspec package has been installed in my notebook. And I actually had been using it fine for a long time, when this suddenly happened.
I tried googling, but could not find this specific error.
Has anyone come across this before? And if so, do you know how to solve it?
Glad to hear this wasn't just me. It looks like if you pip install versions s3fs==0.5.1 and fsspec==0.8.3, that should fix it.
I'm trying to test a model that is working in another machine, but when I try to import it to my notebook, I get this error:
ModuleNotFoundError: No module named 'spacy.pipeline.pipes'; 'spacy.pipeline' is not a package
We have installed:
Spacy 2.0.18 (Frozen version, Not updatable whatsoever)
And I'm importing:
import spacy
import thinc
import unidecode
import nltk
from spacy.vocab import Vocab
from spacy.language import Language
from spacy.lang.pt import Portuguese
from spacy.lang.en import English
from spacy.pipeline import EntityRecognizer
ner = EntityRecognizer(nlp.vocab)
nlp = Language(Vocab())
nlp = Portuguese()
# Load NER Model
NER_MODEL = pickle.load( open("/ner_model_v022_epoch=706_loss=09o76364626.pkl", "rb" ) )
And I get the following error:
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-12-83d4770d3e3e> in <module>
---> 40 NER_MODEL = pickle.load( open("/ner_model_v022_epoch=706_loss=09o76364626.pkl", "rb" ) )
ModuleNotFoundError: No module named 'spacy.pipeline.pipes'; 'spacy.pipeline' is not a package
Any ideas why this might be happening? Already installed everything again from 0 but keeps giving me the same error.
Any help will be greatly appreciated.
Close and re-open the Terminal (console).
Activate the venv from the current folder you're working on.
I had this problem come up and found that switching my spacy version from spacy==2.0.18 to spacy==2.1.4 worked! Went back through their releases and spacy.pipeline.pipes isn't present until v2.1.0a8
If you tried to install it via github and you still have that folder, it could cause issues. For me, deleting the spaCy folder helped.
Hi so I'm trying to use the make_pipeline module in sklearn. But when I try to import it with:
from sklearn.pipeline import make_pipeline
I get this error:
ImportError: cannot import name '_print_elapsed_time'
I've googled it but there seems to be no other posts about this. I tried reinstalling scikitlearn but I still get the same error :/ Anyone have any ideas?
It looks like this was a bug introduced into one of the newer versions of scikit-learn (I got this same issue in version 0.21.2).
I was able to fix this by downgrading to scikit-learn version 0.20.0
>> pip install scikit-learn==0.20.0