Ich verwendete Python Datashader 0.5.0-Paket, um Daten zur Bevölkerungsdichte zu plotten, in der Regel nach dem Tutorial https://www.continuum.io/blog/developer-blog/analyzing-and-visualizing-big-data-interactively-your-laptop-datashading-2010-us. Ich habe Datashader mit conda install -c bokeh datashader=0.5.0
installiert.Datashader hat Snappy-Fehler
Alles war in Ordnung. Obwohl vielleicht unabhängig davon, schienen die Dinge zu brechen, sobald ich die HaloViews und Geoviews installiert hatte. Nach der Installation dieser zusätzlichen Pakete kann ich den Datashader nicht mehr importieren und mein einmal funktionierender Code läuft nicht mehr. Beim Importieren von Datashader erhalte ich den folgenden Fehler: AttributError: Modul 'Snappy' hat kein Attribut 'Komprimieren'
Ich bin auf Windows 10 ausgeführt, Anaconda Python 3.5.3.
Vielleicht gehe ich das falsche Kaninchenloch hinunter, aber ich dachte, dass es vielleicht das bissige Paket war. Ich habe "conda install -c conda-forge snappy = 1.1.4" ausgeführt. Conda Liste zeigt, dass Snappy installiert ist. Snappy importiert. Das Objekt snappy.compress wurde nicht gefunden. Mein Problem scheint in Bezug auf die folgenden SO veröffentlicht, sobald ich auch einen fastparquet Fehler hatte bei dem Versuch, geoviews: error with snappy while importing fastparquet in python
Wenn import snappy
läuft, print(snappy.__filename__)
gibt den folgenden Fehler:
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-5-b8565733b383> in <module>()
----> 1 import snappy; print(snappy.__file__)
AttributeError: module 'snappy' has no attribute '__file__'
Ich habe auch versucht, durch beide Conda zu deinstallieren und Pip nur für den Fall. Immer noch keine Freude.
Das Ausführen von "pip install python-snappy" führt zu einem Fehler "building wheel for python-snappy" Fehler mit "Fehler: Microsoft Visual C++ 14.0 ist erforderlich ..." Also ging ich und bekam die "Microsoft Visual C++ Redistributable für Visual Studio 2017 "und lief es, aber hatte keine Änderung.
Irgendwelche Gedanken, wie man das löst? Als Referenz ist der vollständige Fehler auf datashader Import wie folgt:
--------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-7-3d7b1ff9e530> in <module>()
----> 1 import datashader
C:\Python\lib\site-packages\datashader\__init__.py in <module>()
3 __version__ = '0.5.0'
4
----> 5 from .core import Canvas
6 from .reductions import (count, any, sum, min, max, mean, std, var, count_cat,
7 summary)
C:\Python\lib\site-packages\datashader\core.py in <module>()
3 import numpy as np
4 from datashape.predicates import istabular
----> 5 from odo import discover
6 from xarray import DataArray
7
C:\Python\lib\site-packages\odo\__init__.py in <module>()
63 from .backends.url import URL
64 with ignoring(ImportError):
---> 65 from .backends.dask import dask
66
67
C:\Python\lib\site-packages\odo\backends\dask.py in <module>()
8
9 from dask.array.core import Array, from_array
---> 10 from dask.bag.core import Bag
11 import dask.bag as db
12 from dask.compatibility import long
C:\Python\lib\site-packages\dask\bag\__init__.py in <module>()
1 from __future__ import absolute_import, division, print_function
2
----> 3 from .core import (Bag, Item, from_sequence, from_url, to_textfiles, concat,
4 from_delayed, map_partitions, bag_range as range,
5 bag_zip as zip, bag_map as map)
C:\Python\lib\site-packages\dask\bag\core.py in <module>()
30
31 from ..base import Base, normalize_token, tokenize
---> 32 from ..bytes.core import write_bytes
33 from ..compatibility import apply, urlopen
34 from ..context import _globals, defer_to_globals
C:\Python\lib\site-packages\dask\bytes\__init__.py in <module>()
2
3 from ..utils import ignoring
----> 4 from .core import read_bytes, open_files, open_text_files
5
6 from . import local
C:\Python\lib\site-packages\dask\bytes\core.py in <module>()
7 from warnings import warn
8
----> 9 from .compression import seekable_files, files as compress_files
10 from .utils import (SeekableFile, read_block, infer_compression,
11 infer_storage_options, build_name_function)
C:\Python\lib\site-packages\dask\bytes\compression.py in <module>()
30 with ignoring(ImportError):
31 import snappy
---> 32 compress['snappy'] = snappy.compress
33 decompress['snappy'] = snappy.decompress
34
AttributeError: module 'snappy' has no attribute 'compress'
Hinweis: Wenn Snappy entfernt wird, entferne ich bissig 1.1.4-vc14_0. Wenn Sie die Installation mit conda install https://pypi.python.org/packages/4c/8f/09f0a11dbcaedf9b0758a37ab2bb77d6c34b9c29afc4d0440019c152d2af/python-snappy-0.5.1.tar.gz oder mit der Installation von conda python-snappy = 0.5.1 ausführen, erhalten Sie einen PackageNotFoundError: Paket fehlt in aktuellen Win-64-Kanälen ... – Docuemada