AttributeError: module 'xarray' has no attribute 'Dataset'
See original GitHub issueProblem description
When running conda install -c cogsci pygame Anaconda does an update on all packages and then fails with AttributeError: module ‘xarray’ has no attribute ‘Dataset’. Seems to be coming via leaflet.
Output of xr.show_versions()
INSTALLED VERSIONS
commit: None python: 3.6.5.final.0 python-bits: 64 OS: Windows OS-release: 10 machine: AMD64 processor: Intel64 Family 6 Model 94 Stepping 3, GenuineIntel byteorder: little LC_ALL: None LANG: None LOCALE: None.None
xarray: 0.10.7 pandas: 0.23.1 numpy: 1.14.5 scipy: 1.1.0 netCDF4: 1.4.0 h5netcdf: 0.6.1 h5py: 2.8.0 Nio: None zarr: None bottleneck: 1.2.1 cyordereddict: None dask: 0.18.1 distributed: 1.22.0 matplotlib: 2.2.2 cartopy: None seaborn: 0.8.1 setuptools: 39.2.0 pip: 9.0.3 conda: 4.5.8 pytest: 3.6.2 IPython: 6.4.0 sphinx: 1.7.5
Full error message:
Attempting to roll back.
Rolling back transaction: \ DEBUG menuinst_win32:init(196): Menu: name: ‘Anaconda${PY_VER} ${PLATFORM}’, prefix: ‘C:\ProgramData\Anaconda3’, env_name: ‘None’, mode: ‘system’, used_mode: ‘system’ DEBUG menuinst_win32:create(320): Shortcut cmd is C:\ProgramData\Anaconda3\pythonw.exe, args are [‘C:\ProgramData\Anaconda3\cwp.py’, ‘C:\ProgramData\Anaconda3’, ‘C:\ProgramData\Anaconda3\pythonw.exe’, ‘C:\ProgramData\Anaconda3\Scripts\spyder-script.py’] DEBUG menuinst_win32:create(320): Shortcut cmd is C:\ProgramData\Anaconda3\python.exe, args are [‘C:\ProgramData\Anaconda3\cwp.py’, ‘C:\ProgramData\Anaconda3’, ‘C:\ProgramData\Anaconda3\python.exe’, ‘C:\ProgramData\Anaconda3\Scripts\spyder-script.py’, ‘–reset’] / DEBUG menuinst_win32:init(196): Menu: name: ‘Anaconda${PY_VER} ${PLATFORM}’, prefix: ‘C:\ProgramData\Anaconda3’, env_name: ‘None’, mode: ‘system’, used_mode: ‘system’ DEBUG menuinst_win32:create(320): Shortcut cmd is C:\ProgramData\Anaconda3\pythonw.exe, args are [‘C:\ProgramData\Anaconda3\cwp.py’, ‘C:\ProgramData\Anaconda3’, ‘C:\ProgramData\Anaconda3\pythonw.exe’, ‘C:\ProgramData\Anaconda3\Scripts\anaconda-navigator-script.py’] | DEBUG menuinst_win32:init(196): Menu: name: ‘Anaconda${PY_VER} ${PLATFORM}’, prefix: ‘C:\ProgramData\Anaconda3’, env_name: ‘None’, mode: ‘system’, used_mode: ‘system’ DEBUG menuinst_win32:create(320): Shortcut cmd is C:\ProgramData\Anaconda3\pythonw.exe, args are [‘C:\ProgramData\Anaconda3\cwp.py’, ‘C:\ProgramData\Anaconda3’, ‘C:\ProgramData\Anaconda3\pythonw.exe’, ‘C:\ProgramData\Anaconda3\Scripts\anaconda-navigator-script.py’] / DEBUG menuinst_win32:init(196): Menu: name: ‘Anaconda${PY_VER} ${PLATFORM}’, prefix: ‘C:\ProgramData\Anaconda3’, env_name: ‘None’, mode: ‘system’, used_mode: ‘system’ DEBUG menuinst_win32:create(320): Shortcut cmd is C:\ProgramData\Anaconda3\pythonw.exe, args are [‘C:\ProgramData\Anaconda3\cwp.py’, ‘C:\ProgramData\Anaconda3’, ‘C:\ProgramData\Anaconda3\pythonw.exe’, ‘C:\ProgramData\Anaconda3\Scripts\spyder-script.py’] DEBUG menuinst_win32:create(320): Shortcut cmd is C:\ProgramData\Anaconda3\python.exe, args are [‘C:\ProgramData\Anaconda3\cwp.py’, ‘C:\ProgramData\Anaconda3’, ‘C:\ProgramData\Anaconda3\python.exe’, ‘C:\ProgramData\Anaconda3\Scripts\spyder-script.py’, ‘–reset’] done
LinkError: post-link script failed for package conda-forge::ipyleaflet-0.9.0-py35_0
running your command again with -v
will provide additional information
location of failed script: C:\ProgramData\Anaconda3\Scripts.ipyleaflet-post-link.bat
==> script messages <==
Traceback (most recent call last):
File “C:\ProgramData\Anaconda3\Scripts\jupyter-nbextension-script.py”, line 10, in <module>
sys.exit(main())
File “C:\ProgramData\Anaconda3\lib\site-packages\jupyter_core\application.py”, line 266, in launch_instance
return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
File “C:\ProgramData\Anaconda3\lib\site-packages\traitlets\config\application.py”, line 658, in launch_instance
app.start()
File “C:\ProgramData\Anaconda3\lib\site-packages\notebook\nbextensions.py”, line 988, in start
super(NBExtensionApp, self).start()
File “C:\ProgramData\Anaconda3\lib\site-packages\jupyter_core\application.py”, line 255, in start
self.subapp.start()
File “C:\ProgramData\Anaconda3\lib\site-packages\notebook\nbextensions.py”, line 896, in start
self.toggle_nbextension_python(self.extra_args[0])
File “C:\ProgramData\Anaconda3\lib\site-packages\notebook\nbextensions.py”, line 872, in toggle_nbextension_python
logger=self.log)
File “C:\ProgramData\Anaconda3\lib\site-packages\notebook\nbextensions.py”, line 483, in enable_nbextension_python
logger=logger)
File “C:\ProgramData\Anaconda3\lib\site-packages\notebook\nbextensions.py”, line 380, in _set_nbextension_state_python
m, nbexts = _get_nbextension_metadata(module)
File “C:\ProgramData\Anaconda3\lib\site-packages\notebook\nbextensions.py”, line 1122, in get_nbextension_metadata
m = import_item(module)
File “C:\ProgramData\Anaconda3\lib\site-packages\traitlets\utils\importstring.py”, line 42, in import_item
return import(parts[0])
File "C:\ProgramData\Anaconda3\lib\site-packages\ipyleaflet_init.py", line 7, in <module>
from .leaflet import *
File “C:\ProgramData\Anaconda3\lib\site-packages\ipyleaflet\leaflet.py”, line 214, in <module>
class Velocity(Layer):
File “C:\ProgramData\Anaconda3\lib\site-packages\ipyleaflet\leaflet.py”, line 224, in Velocity
data = Dataset().tag(sync=True, to_json=ds_x_to_json)
File “C:\ProgramData\Anaconda3\lib\site-packages\traittypes\traittypes.py”, line 266, in init
kwargs[‘klass’] = xr.Dataset
AttributeError: module ‘xarray’ has no attribute ‘Dataset’
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (3 by maintainers)
Top GitHub Comments
I still get this issue when installing xarray using pip on python 3.6.10
Cool! Thanks for reporting the issue 😃