ImportError: cannot import name 'read_data_sets' - python

I am trying to move my code from my local machine which uses python 3.6 under an anaconda environment to Google Colab,in order to make use of GPU.
However,some commands are running localy,the same commands don't run in Colab,despite the fact that I have installed all missing modules(everytime I face such an error)
The problem comes at command from dataloader import get_loader,where it throws an error.
It seems that dataloader has problem,because the same error occurs when I just do import dataloader
I have installed with pip dataloader=2.0.0
I have searched a lot but I can't figure out a solution.
Error Message:
ImportError:Traceback (most recent call last)
<ipython-input-57-1c19174cb2f4> in <module>()
----> 1 import dataloader.get_loader
/usr/local/lib/python3.6/dist-packages/dataloader/__init__.py in <module>()
----> 1 from dataloader import read_data_sets
ImportError: cannot import name 'read_data_sets'

Related

'ImportError: dlopen() Symbol not found' when trying to import Imfit library

I was trying to install Imfit library using pip3 install pyimfit on an Intel Mac and this is the error i've got from Jupyter when trying to run import pyimfit
ImportError Traceback (most recent call last)
Input In [1], in <cell line: 1>()
----> 1 import pyimfit as im
2 import scipy as sc
3 import numpy as np
File /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pyimfit/init.py:4, in <module>
1 # This file defines what is visible to the outside world when the package
2 # (pyimfit) is imported
3 from .descriptions import *
----> 4 from .pyimfit_lib import convolve_image, make_imfit_function, ModelObjectWrapper # type: ignore
5 from .pyimfit_lib import FixImage
6 from .pyimfit_lib import PsfOversampling
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pyimfit/pyimfit_lib.cpython-39-darwin.so, 2): Symbol not found: ZTTNSt3114basic_ifstreamIcNS_11char_traitsIcEEEE
Referenced from: /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pyimfit/pyimfit_lib.cpython-39-darwin.so
Expected in: /usr/lib/libc++.1.dylib
in /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pyimfit/pyimfit_lib.cpython-39-darwin.so
I've tried reinstalling it through pip numerous times but to no avail. Also tried reinstalling Numpy/Scipy as those are the dependency for Imfit but also no luck. Any ideas how to fix this problem?

ImportError: cannot import name 'weather_api_key' from 'config'

I am trying to import an API key from a python file and I get this error:
ImportError Traceback (most recent call last)
~\AppData\Local\Temp\ipykernel_27940\425884591.py in
9
10 # Import the OpenWeatherMap's API key
---> 11 from config import weather_api_key
ImportError: cannot import name 'weather_api_key' from 'config' (C:\Users\mjrm_\anaconda3\envs\PythonData\lib\site-packages\config_init_.py)
I have done many fixes that I found but I keep getting this error.
I tried changing the py file name and also attempted verifiy loading different packages into my environment, I feel like the error fix is simple but I cannot figure this out

google colab. It gives this error when I execute the training code

It gives this error when I execute the training code.
ModuleNotFoundError
Traceback (most recent call last)
<ipython-input-12-08472a50f5e6> in <module>()
6 import logging
7 logging.getLogger('tensorflow').disabled = True
----> 8 import input_data
9 import resnet_utils
10 import resnet_v2
ModuleNotFoundError: No module named 'input_data'
---------------------------------------------------------------------------
NOTE: If your import is failing due to a missing package, you can
manually install dependencies using either !pip or !apt.
To view examples of installing some common dependencies, click the
"Open Examples" button below.

Tensorflow Modules in Jupiter Notebooks (using OSX)

I am having trouble getting tensorflow to work using Jupiter notebooks. I am a complete noob so please keep responses as simple as possible and apologies if this is trivial.
I run the following code in the notebook:
import tensorflow as tf
from tensorflow.python.framework import ops
And get this error message:
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-15-509396287076> in <module>()
1
2 import tensorflow as tf
----> 3 from tensorflow.python.framework import ops
4 from tf_utils import load_dataset, random_mini_batches, convert_to_one_hot, predict
5
ModuleNotFoundError: No module named 'tensorflow.python'
(I originally struggled to get the "import tensorflow as tf" line to work but have resolved that. The code runs fine without the second line...)
Thanks for your help!

Problems importing folium into IPython Notebook on Python 3.3

I'm getting an error trying to import folium into an IPython notebook running on Python 3.3 in a VM. I've done a pip3 update so it shouldn't be a problem with a stale package...
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-6-af6e4f19ef00> in <module>()
----> 1 import folium
/usr/local/lib/python3.3/dist-packages/folium/__init__.py in <module>()
1 # -*- coding: utf-8 -*-
----> 2 from folium import Map
ImportError: cannot import name Map
Any ideas if this is likely to be a problem with my set up, or an issue with folium. There are a couple of other people seem to have had the same issue, but no answers that I can find?
Seems like it's a version issue and a pull request has been submitted: https://github.com/wrobstory/folium/pull/21#issuecomment-43231895

Categories