Python - Compatibility Issues between Shapely and Geopandas - python

I am attempting to run shapely.ops and my kernel dies. I believe this is due to version controls between GeoPandas and Shapely but am unable to figure out the issues.
For more information, note that my kernel dies when running this line:
import shapely
merged = vertical_stack.groupby('name').geometry.agg(shapely.ops.unary_union)
The item that I am attempting to aggregate and dissolve is a geopandas.geodataframe.GeoDataFrame
For version of modules, see below:
pip list
Package Version
---------------------------------- ----------------------
affine 2.3.0
aiohttp 3.7.3
alabaster 0.7.12
anaconda-client 1.7.2
anaconda-navigator 1.9.12
anaconda-project 0.8.3
applaunchservices 0.2.1
appnope 0.1.0
appscript 1.1.1
area 1.1.1
argh 0.26.2
arrow 0.17.0
asgiref 3.3.1
asn1crypto 1.3.0
astroid 2.4.2
astropy 4.0.1.post1
async-timeout 3.0.1
atomicwrites 1.4.0
attrs 19.3.0
autopep8 1.5.3
Babel 2.8.0
backcall 0.2.0
backports.functools-lru-cache 1.6.1
backports.shutil-get-terminal-size 1.0.0
backports.tempfile 1.0
backports.weakref 1.0.post1
beautifulsoup4 4.9.1
bitarray 1.4.0
bkcharts 0.2
bleach 3.1.5
bokeh 2.1.1
boto 2.49.0
Bottleneck 1.3.2
branca 0.4.1
brotlipy 0.7.0
cairocffi 1.2.0
CairoSVG 2.5.2
census 0.8.15
CensusData 1.10
certifi 2020.6.20
cffi 1.14.0
chardet 3.0.4
click 7.1.2
click-plugins 1.1.1
cligj 0.5.0
cloudpickle 1.5.0
clyent 1.2.2
colorama 0.4.3
conda 4.10.1
conda-build 3.18.11
conda-package-handling 1.7.0+0.g7c4a471.dirty
conda-verify 3.4.2
configparser 5.0.2
contextlib2 0.6.0.post1
crayons 0.4.0
cryptography 2.9.2
cssselect2 0.4.1
cycler 0.10.0
Cython 0.29.21
cytoolz 0.10.1
dask 2.20.0
dataframe-image 0.1.1
decorator 4.4.2
defusedxml 0.6.0
descartes 1.1.0
diff-match-patch 20200713
distributed 2.20.0
Django 3.1.7
docopt 0.2.0
docopt-ng 0.7.2
docopt-plus 0.6.3a1
docutils 0.16
entrypoints 0.3
et-xmlfile 1.0.1
fastcache 1.1.0
filelock 3.0.12
Fiona 1.8.17
flake8 3.8.3
Flask 1.1.2
folium 0.0.0
fpdf 1.7.2
fsspec 0.7.4
future 0.18.2
fuzzymatcher 0.0.5
fuzzywuzzy 0.18.0
GDAL 3.1.3
geographiclib 1.50
geojson 2.5.0
geomet 0.2.1.post1
geopandas 0.9.0
geopy 2.1.0
geoutils 0.0.1
gevent 20.6.2
glob2 0.7
gmpy2 2.0.8
greenlet 0.4.16
h3 3.7.0
h5py 2.10.0
HeapDict 1.0.1
html5lib 1.1
idna 2.5
image 1.5.33
imageio 2.9.0
imagesize 1.2.0
importlib-metadata 1.7.0
intervaltree 3.0.2
ipykernel 5.3.2
ipython 7.16.1
ipython-genutils 0.2.0
ipywidgets 7.5.1
isort 4.3.21
itsdangerous 1.1.0
jdcal 1.4.1
jedi 0.17.1
jellyfish 0.6.1
Jinja2 2.11.2
jinja2-time 0.2.0
joblib 0.16.0
json5 0.9.5
jsonschema 3.2.0
jupyter 1.0.0
jupyter-client 6.1.6
jupyter-console 6.1.0
jupyter-core 4.6.3
jupyterlab 2.1.5
jupyterlab-server 1.2.0
keplergl 0.2.1
keyring 21.2.1
kiwisolver 1.2.0
lazy-object-proxy 1.4.3
libarchive-c 2.9
libpysal 4.4.0
llvmlite 0.33.0+1.g022ab0f
locket 0.2.0
lxml 4.5.2
make 0.1.6.post2
MarkupSafe 1.1.1
matplotlib 3.3.2
mccabe 0.6.1
Metaphone 0.6
mistune 0.8.4
mkl-fft 1.1.0
mkl-random 1.1.1
mkl-service 2.3.0
mock 4.0.2
more-itertools 8.4.0
mplleaflet 0.0.5
mpmath 1.1.0
msgpack 1.0.0
multidict 5.1.0
multipledispatch 0.6.0
munch 2.5.0
navigator-updater 0.2.1
nbconvert 5.6.1
nbformat 5.0.7
networkx 2.5
nltk 3.5
nose 1.3.7
notebook 6.0.3
numba 0.50.1
numexpr 2.7.1
numpy 1.19.2
numpydoc 1.1.0
objectpath 0.6.1
olefile 0.46
openpyxl 3.0.4
orca 1.5.4
osm2geojson 0.1.29
osmnx 0.16.1
OSMPythonTools 0.2.9
osmtogeojson 0.0.2
overpass 0.7
overpassify 1.2.2
overpy 0.4
packaging 20.4
pandas 1.1.3
pandocfilters 1.4.2
parso 0.7.0
partd 1.1.0
path 13.1.0
pathlib2 2.3.5
pathtools 0.1.2
patsy 0.5.1
pep8 1.7.1
pexpect 4.8.0
pickleshare 0.7.5
Pillow 7.2.0
pip 20.1.1
pkginfo 1.5.0.1
plotly 4.14.3
pluggy 0.13.1
ply 3.11
prometheus-client 0.8.0
prompt-toolkit 3.0.5
psutil 5.7.0
ptyprocess 0.6.0
py 1.9.0
pycodestyle 2.6.0
pycosat 0.6.3
pycparser 2.20
pycurl 7.43.0.5
pydocstyle 5.0.2
pyflakes 2.2.0
pygeos 0.10
pyGeoTile 1.0.6
Pygments 2.6.1
pylint 2.5.3
pyodbc 4.0.0-unsupported
pyOpenSSL 19.1.0
pyparsing 2.4.7
Pyphen 0.10.0
pyproj 2.6.1.post1
pyrsistent 0.16.0
PySocks 1.7.1
pytest 5.4.3
pytest-sugar 0.9.4
python-dateutil 2.8.1
python-dotenv 0.14.0
python-jsonrpc-server 0.3.4
python-language-server 0.34.1
python-Levenshtein 0.12.0
PyTrie 0.4.0
pytz 2020.1
PyWavelets 1.1.1
PyYAML 5.3.1
pyzmq 19.0.1
q 2.6
QDarkStyle 2.8.1
QtAwesome 0.7.2
qtconsole 4.7.5
QtPy 1.9.0
queuelib 1.5.0
rasterio 1.2.5
regex 2020.6.8
requests 2.25.1
retrying 1.3.3
rope 0.17.0
Rtree 0.9.4
ruamel-yaml 0.15.87
scikit-image 0.16.2
scikit-learn 0.23.1
scipy 1.5.0
seaborn 0.10.1
selenium 3.141.0
Send2Trash 1.5.0
setuptools 49.2.0.post20200714
Shapely 1.7.1
simplegeneric 0.8.1
simplejson 3.17.2
singledispatch 3.4.0.3
six 1.15.0
snowballstemmer 2.0.0
snuggs 1.4.7
sortedcollections 1.2.1
sortedcontainers 2.2.2
soupsieve 2.0.1
Sphinx 3.1.2
sphinxcontrib-applehelp 1.0.2
sphinxcontrib-devhelp 1.0.2
sphinxcontrib-htmlhelp 1.0.3
sphinxcontrib-jsmath 1.0.1
sphinxcontrib-qthelp 1.0.3
sphinxcontrib-serializinghtml 1.1.4
sphinxcontrib-websupport 1.2.3
spyder 4.1.4
spyder-kernels 1.9.2
SQLAlchemy 1.3.18
sqlparse 0.4.1
statsmodels 0.11.1
sympy 1.6.1
tables 3.6.1
tabulate 0.8.7
tblib 1.6.0
termcolor 1.1.0
terminado 0.8.3
testpath 0.4.4
threadpoolctl 2.1.0
tile-comparator 2.2.1
tinycss2 1.1.0
toml 0.10.1
toolz 0.10.0
tornado 6.0.4
tqdm 4.47.0
traitlets 4.3.3
traittypes 0.2.1
typing-extensions 3.7.4.2
ujson 1.35
unicodecsv 0.14.1
universities 1.1.0
university-scraper 0.0.2
urllib3 1.21.1
us 2.0.2
validators 0.14.0
watchdog 0.10.3
wcwidth 0.2.5
WeasyPrint 52.5
webdriver-manager 3.3.0
webencodings 0.5.1
Werkzeug 1.0.1
wheel 0.34.2
widgetsnbextension 3.5.1
wrapt 1.11.2
wurlitzer 2.0.1
xarray 0.16.2
xcode 0.0.1
xlrd 1.2.0
XlsxWriter 1.2.9
xlwings 0.19.5
xlwt 1.3.0
xmltodict 0.12.0
yapf 0.30.0
yarl 1.6.3
zict 2.0.0
zipp 3.1.0
zope.event 4.4
zope.interface 4.7.1

Related

Failed to import data to a stream table containing array vectors with DolphinDB Python API

The following script defines a stream table where the column “askPrice“ and “bidPrice“ are array vectors of DOUBLE type.
share streamTable(
10000:0,
`time`sym`askPrice`bidPrice,
[DATETIME,SYMBOL,DOUBLE[],DOUBLE[]]
) as testSt;
Script in Python:
import dolphindb as ddb
import pandas as pd
import numpy as np
if __name__ == "__main__":
    se = ddb.session("localhost", 8848)
    df = pd.DataFrame(
        {
            "time": pd.Timestamp.now().to_numpy(),
            "sym": ["600519.SH"],
            "askPrice":[np.array([11.0,12.0],dtype=np.float64)], 
            "bidPrice":[np.array([11.1,12.1],dtype=np.float64)], 
        }
    )
    n = se.run("tableInsert{testSt}", df)
    print(n)
But an exception was thown when I run the script:
RuntimeError: <Exception> in call: Failed to append data to column 'askPrice'
I tried to change the data type of column askPrice and bidPrice with the following script, but it still failed:
import dolphindb as ddb
import pandas as pd
import numpy as np
if __name__ == "__main__":
    se = ddb.session("localhost", 8848,"admin", "123456")
    values = np.array([np.array([11,12,13,14],dtype=np.float64)],dtype=object)
    df = pd.DataFrame(
        {
            "time": pd.Timestamp.now().to_numpy(),
            "sym": ["600519.SH"],
            "askPrice":values, 
            "bidPrice":values, 
            #"askPrice":[np.array([11.0,12.0],dtype=np.float64)], 
            #"bidPrice":[np.array([11.1,12.1],dtype=np.float64)], 
        }
    )
    n = se.run("tableInsert{testSt}", df)
Error message is as follows:
Exception: Data must be 1-dimensional
The following is the version of related packages (in Windows environment):
PS C:\Users\demo> pip list
Package Version
---------------------------------- ---------
alabaster 0.7.12
anaconda-client 1.7.2
anaconda-navigator 1.9.7
anaconda-project 0.8.3
asn1crypto 1.0.1
astroid 2.3.1
astropy 3.2.1
atomicwrites 1.3.0
attrs 19.2.0
Babel 2.7.0
backcall 0.1.0
backports.functools-lru-cache 1.5
backports.os 0.1.1
backports.shutil-get-terminal-size 1.0.0
backports.tempfile 1.0
backports.weakref 1.0.post1
beautifulsoup4 4.8.0
bitarray 1.0.1
bkcharts 0.2
bleach 3.1.0
bokeh 1.3.4
boto 2.49.0
Bottleneck 1.2.1
certifi 2019.9.11
cffi 1.12.3
chardet 3.0.4
Click 7.0
cloudpickle 1.2.2
clyent 1.2.2
colorama 0.4.1
comtypes 1.1.7
conda 4.7.12
conda-build 3.18.9
conda-package-handling 1.6.0
conda-verify 3.4.2
contextlib2 0.6.0
cryptography 2.7
cycler 0.10.0
Cython 0.29.13
cytoolz 0.10.0
dask 2.5.2
decorator 4.4.0
defusedxml 0.6.0
distributed 2.5.2
docutils 0.15.2
dolphindb 1.30.19.4
entrypoints 0.3
et-xmlfile 1.0.1
fastcache 1.1.0
filelock 3.0.12
Flask 1.1.1
fsspec 0.5.2
future 0.17.1
gevent 1.4.0
glob2 0.7
greenlet 0.4.15
h5py 2.9.0
HeapDict 1.0.1
html5lib 1.0.1
idna 2.8
imageio 2.6.0
imagesize 1.1.0
importlib-metadata 0.23
ipykernel 5.1.2
ipython 7.8.0
ipython-genutils 0.2.0
ipywidgets 7.5.1
isort 4.3.21
itsdangerous 1.1.0
jdcal 1.4.1
jedi 0.15.1
Jinja2 2.10.3
joblib 0.13.2
json5 0.8.5
jsonschema 3.0.2
jupyter 1.0.0
jupyter-client 5.3.3
jupyter-console 6.0.0
jupyter-core 4.5.0
jupyterlab 1.1.4
jupyterlab-server 1.0.6
keyring 18.0.0
kiwisolver 1.1.0
lazy-object-proxy 1.4.2
libarchive-c 2.8
llvmlite 0.29.0
locket 0.2.0
lxml 4.4.1
MarkupSafe 1.1.1
matplotlib 3.1.1
mccabe 0.6.1
menuinst 1.4.16
mistune 0.8.4
mkl-fft 1.0.14
mkl-random 1.1.0
mkl-service 2.3.0
mock 3.0.5
more-itertools 7.2.0
mpmath 1.1.0
msgpack 0.6.1
multipledispatch 0.6.0
navigator-updater 0.2.1
nbconvert 5.6.0
nbformat 4.4.0
networkx 2.3
nltk 3.4.5
nose 1.3.7
notebook 6.0.1
numba 0.45.1
numexpr 2.7.0
numpy 1.19.3
numpydoc 0.9.1
olefile 0.46
openpyxl 3.0.0
packaging 19.2
pandas 0.25.1
pandocfilters 1.4.2
parso 0.5.1
partd 1.0.0
path.py 12.0.1
pathlib2 2.3.5
patsy 0.5.1
pep8 1.7.1
pickleshare 0.7.5
Pillow 6.2.0
pip 19.2.3
pkginfo 1.5.0.1
pluggy 0.13.0
ply 3.11
prometheus-client 0.7.1
prompt-toolkit 2.0.10
psutil 5.6.3
py 1.8.0
pycodestyle 2.5.0
pycosat 0.6.3
pycparser 2.19
pycrypto 2.6.1
pycurl 7.43.0.3
pyflakes 2.1.1
Pygments 2.4.2
pylint 2.4.2
pyodbc 4.0.27
pyOpenSSL 19.0.0
pyparsing 2.4.2
pyreadline 2.1
pyrsistent 0.15.4
PySocks 1.7.1
pytest 5.2.1
pytest-arraydiff 0.3
pytest-astropy 0.5.0
pytest-doctestplus 0.4.0
pytest-openfiles 0.4.0
pytest-remotedata 0.3.2
python-dateutil 2.8.0
pytz 2019.3
PyWavelets 1.0.3
pywin32 223
pywinpty 0.5.5
PyYAML 5.1.2
pyzmq 18.1.0
QtAwesome 0.6.0
qtconsole 4.5.5
QtPy 1.9.0
requests 2.22.0
rope 0.14.0
ruamel-yaml 0.15.46
scikit-image 0.15.0
scikit-learn 0.21.3
scipy 1.3.1
seaborn 0.9.0
Send2Trash 1.5.0
setuptools 41.4.0
simplegeneric 0.8.1
singledispatch 3.4.0.3
six 1.12.0
snowballstemmer 2.0.0
sortedcollections 1.1.2
sortedcontainers 2.1.0
soupsieve 1.9.3
Sphinx 2.2.0
sphinxcontrib-applehelp 1.0.1
sphinxcontrib-devhelp 1.0.1
sphinxcontrib-htmlhelp 1.0.2
sphinxcontrib-jsmath 1.0.1
sphinxcontrib-qthelp 1.0.2
sphinxcontrib-serializinghtml 1.1.3
sphinxcontrib-websupport 1.1.2
spyder 3.3.6
spyder-kernels 0.5.2
SQLAlchemy 1.3.9
statsmodels 0.10.1
sympy 1.4
tables 3.5.2
tblib 1.4.0
terminado 0.8.2
testpath 0.4.2
toolz 0.10.0
tornado 6.0.3
tqdm 4.36.1
traitlets 4.3.3
unicodecsv 0.14.1
urllib3 1.24.2
wcwidth 0.1.7
webencodings 0.5.1
Werkzeug 0.16.0
wheel 0.33.6
widgetsnbextension 3.5.1
win-inet-pton 1.1.0
win-unicode-console 0.5
wincertstore 0.2
wrapt 1.11.2
xlrd 1.2.0
XlsxWriter 1.2.1
xlwings 0.15.10
xlwt 1.3.0
zict 1.0.0
zipp 0.6.0
This problem is caused by version incompatibility between python packages.
It is recommended to upgrade numpy to version 1.19.5, and pandas to version 1.3.5/1.1.0.
You can upgrade with the following command:
pip install --upgrade numpy==1.21.5
pip install --upgrade pandas==1.3.5

Python3 Import Error: undefined symbol: aes_hw_encrypt

I am trying to use DialogFlow to make a small talk chatbot on Raspberry Pi 4, and I am getting this error:
ImportError: /usr/local/lib/python3.7/dist-packages/grpc/_cython/cygrpc.cpython-37m-arm-linux-gnueabihf.so: undefined symbol: aes_hw_encrypt
My code is as follows:
"""
Libraries used:
dialogflow 1.1.0 - I did pip3 install dialogflow -U and it upgraded to this
google-api-core 1.29.0
os Latest version - not sure
"""
import os
import dialogflow
from google.api_core.exceptions import InvalidArgument
os.environ["GOOGLE_APPLICATION_CREDENTIALS"] = 'secrets.json'
DIALOGFLOW_PROJECT_ID = '[test_id]'
DIALOGFLOW_LANGUAGE_CODE= '[en]'
SESSION_ID = 'me'
text_to_be_analyzed = "Howdy"
session_client = dialogflow.SessionsClient()
session = session_client.session_path(DIALOGFLOW_PROJECT_ID, SESSION_ID)
text_input = dialogflow.types.TextInput(text=text_to_be_analyzed, language_code=DIALOGFLOW_LANGUAGE_CODE)
query_input = dialogflow.types.QueryInput(text=text_input)
try:
response = session_client.detect_intent(session=session, query_input=query_input)
except InvalidArgument:
raise
print("Query text:", response.query_result.query_text)
print("Detected intent:", response.query_result.intent.display_name)
print("Detected intent confidence:", response.query_result.intent_detection_confidence)
print("Fulfillment text:", response.query_result.fulfillment_text)
pip3 list gives me:
-------------------------------- ---------------
Adafruit-BBIO 1.2.0
Adafruit-Blinka 6.10.0
Adafruit-CharLCD 1.1.1
adafruit-circuitpython-busdevice 5.0.6
adafruit-circuitpython-framebuf 1.4.7
adafruit-circuitpython-ssd1306 2.11.4
Adafruit-GPIO 1.0.3
Adafruit-ILI9341 1.5.1
Adafruit-PlatformDetect 3.13.3
Adafruit-PureIO 1.1.8
Adafruit-SSD1306 1.6.2
appdirs 1.4.3
asn1crypto 0.24.0
astroid 2.1.0
asttokens 1.1.13
attrs 21.2.0
automationhat 0.2.0
beautifulsoup4 4.7.1
blinker 1.4
blinkt 0.1.2
bs4 0.0.1
buttonshim 0.0.2
cachetools 4.2.2
Cap1xxx 0.1.3
certifi 2018.8.24
chardet 3.0.4
Click 7.0
colorama 0.3.7
colorzero 1.1
cookies 2.2.1
cryptography 2.6.1
cupshelpers 1.0
cycler 0.10.0
decorator 4.4.2
dialogflow 1.1.0
docutils 0.14
drumhat 0.1.0
entrypoints 0.3
envirophat 1.0.0
ExplorerHAT 0.4.2
flake8 3.9.2
Flask 1.0.2
fourletterphat 0.1.0
fuzzywuzzy 0.18.0
google-api-core 1.29.0
google-auth 1.30.1
googleapis-common-protos 1.53.0
gpiozero 1.5.1
grpcio 1.38.0
guizero 0.6.0
html5lib 1.0.1
idna 2.6
imageio 2.9.0
importlib-metadata 4.0.1
iniconfig 1.1.1
ipykernel 4.9.0
ipython 5.8.0
ipython-genutils 0.2.0
isort 4.3.4
itsdangerous 0.24
jaraco.context 4.0.0
jedi 0.13.2
Jinja2 2.10
jupyter-client 5.2.3
jupyter-core 4.4.0
keyring 17.1.1
keyrings.alt 3.1.1
kiwisolver 1.3.1
lazy-object-proxy 1.3.1
logilab-common 1.4.2
lxml 4.3.2
MarkupSafe 1.1.0
matplotlib 3.4.2
mccabe 0.6.1
microdotphat 0.2.1
mongo-db 0.1
more-itertools 8.8.0
mote 0.0.4
motephat 0.0.3
mypy 0.670
mypy-extensions 0.4.1
networkx 2.5.1
nightly 0.0.1
nudatus 0.0.4
numpy 1.20.3
oauthlib 2.1.0
olefile 0.46
packaging 20.9
pandas 1.2.4
pantilthat 0.0.7
parso 0.3.1
pexpect 4.6.0
pgzero 1.2
phatbeat 0.1.1
pianohat 0.1.0
picamera 1.13
pickleshare 0.7.5
piglow 1.2.5
pigpio 1.78
Pillow 8.2.0
pip 18.1
pluggy 0.13.1
prompt-toolkit 3.0.18
protobuf 3.17.2
psutil 5.5.1
py 1.10.0
pyasn1 0.4.8
pyasn1-modules 0.2.8
pycairo 1.16.2
pycodestyle 2.7.0
pycrypto 2.6.1
pycups 1.9.73
pyflakes 2.3.1
pyftdi 0.53.1
pygame 1.9.4.post1
Pygments 2.3.1
PyGObject 3.30.4
pyinotify 0.9.6
PyJWT 1.7.0
pylint 2.2.2
pymongo 3.4.0
pyOpenSSL 19.0.0
pyparsing 2.4.7
pyserial 3.4
pysmbc 1.0.15.6
pytest 6.2.4
python-apt 1.8.4.3
python-dateutil 2.8.1
python-espeak 0.5
python-Levenshtein 0.12.2
pytz 2021.1
pyusb 1.1.1
PyWavelets 1.1.1
pyxdg 0.25
PyYAML 5.4.1
pyzmq 17.1.2
qtconsole 4.3.1
rainbowhat 0.1.0
reportlab 3.5.13
requests 2.21.0
requests-oauthlib 1.0.0
responses 0.9.0
roman 2.0.0
rpi-ws281x 4.2.6
RPi.GPIO 0.7.0
rsa 4.7.2
RTIMULib 7.2.1
scikit-image 0.18.1
scipy 1.6.3
screen 1.0.1
scrollphat 0.0.7
scrollphathd 1.2.1
SecretStorage 2.3.1
semver 2.0.1
Send2Trash 1.5.0
sense-hat 2.2.0
setuptools 40.8.0
simplegeneric 0.8.1
simplejson 3.16.0
six 1.16.0
skywriter 0.0.7
sn3218 1.2.7
soupsieve 1.8
sox 1.4.1
spidev 3.4
ssh-import-id 5.7
sysv-ipc 1.1.0
thonny 3.3.6
tifffile 2021.4.8
toml 0.10.2
torch 1.0.0a0+8322165
torchvision 0.2.0
tornado 5.1.1
touchphat 0.0.1
traitlets 4.3.2
twython 3.7.0
typed-ast 1.3.1
typing 3.7.4.3
typing-extensions 3.10.0.0
uflash 1.2.4
unicornhathd 0.0.4
urllib3 1.24.1
wcwidth 0.2.5
webencodings 0.5.1
Werkzeug 0.14.1
wheel 0.32.3
wit 6.0.0
wolframalpha 5.0.0
wrapt 1.10.11
xmltodict 0.12.0
zipp 3.4.1
I might have accidentally installed the libraries some other way when I updated, but I don't think so...
I didn't install anything using apt.
I am using Thonny Python. Thanks!
cryptography lib was old. Thanks to everyone who helped!

No module named 'tensorflow' jupyter notebook

I have some trouble with the Jupyter Notebook Windows version. I've been tried to download TensorFlow via using this link: https://www.tensorflow.org/install/pip?lang=python3
After the process I just compile it and again it gave me the same error message."ModuleNotFoundError: No module named 'tensorflow'"
In the "venv environment" I already downloaded the Jupyter notebook there too.
I check the kernel list.
(venv) C:\Users\Büşra>jupyter kernelspec list
It give me this. Should I replace the kernel list?
c:\users\büşra\appdata\local\programs\python\python36\share\jupyter\kernels\python3
(venv) C:\Users\Büşra> pip list
(venv) C:\Users\Büşra>pip list
Package Version
absl-py 0.8.1
astor 0.8.0
attrs 19.3.0
backcall 0.1.0
bleach 3.1.0
cachetools 3.1.1
certifi 2019.9.11
chardet 3.0.4
colorama 0.4.1
cycler 0.10.0
decorator 4.4.1
defusedxml 0.6.0
entrypoints 0.3
gast 0.2.2
google-auth 1.7.0
google-auth-oauthlib 0.4.1
google-pasta 0.1.8
grpcio 1.25.0
h5py 2.10.0
idna 2.8
importlib-metadata 0.23
ipykernel 5.1.3
ipython 7.9.0
ipython-genutils 0.2.0
ipywidgets 7.5.1
jedi 0.15.1
Jinja2 2.10.3
joblib 0.14.0
json5 0.8.5
jsonschema 3.1.1
jupyter 1.0.0
jupyter-client 5.3.4
jupyter-console 6.0.0
jupyter-core 4.6.1
jupyterlab 1.2.2
jupyterlab-server 1.0.6
Keras 2.3.1
Keras-Applications 1.0.8
Keras-Preprocessing 1.1.0
kiwisolver 1.1.0
Markdown 3.1.1
MarkupSafe 1.1.1
matplotlib 3.1.1
mistune 0.8.4
more-itertools 7.2.0
nbconvert 5.6.1
nbformat 4.4.0
nltk 3.4.5
notebook 6.0.2
numpy 1.17.3
oauthlib 3.1.0
opt-einsum 3.1.0
pandas 0.25.3
pandocfilters 1.4.2
parso 0.5.1
pickleshare 0.7.5
pip 19.3.1
prometheus-client 0.7.1
prompt-toolkit 2.0.10
protobuf 3.10.0
pyasn1 0.4.7
pyasn1-modules 0.2.7
Pygments 2.4.2
pyparsing 2.4.4
pyrsistent 0.15.5
python-dateutil 2.8.1
pytz 2019.3
pywin32 225
pywinpty 0.5.5
PyYAML 5.1.2
pyzmq 18.1.0
qtconsole 4.5.5
requests 2.22.0
requests-oauthlib 1.3.0
rsa 4.0
scikit-learn 0.21.3
scipy 1.3.1
seaborn 0.9.0
Send2Trash 1.5.0
setuptools 41.6.0
six 1.13.0
sklearn 0.0
tensorboard 2.0.1
tensorflow 2.0.0
tensorflow-estimator 2.0.1
termcolor 1.1.0
terminado 0.8.2
testpath 0.4.4
tornado 6.0.3
traitlets 4.3.3
urllib3 1.25.6
virtualenv 16.7.7
wcwidth 0.1.7
webencodings 0.5.1
Werkzeug 0.16.0
wheel 0.33.6
widgetsnbextension 3.5.1
wrapt 1.11.2
zipp 0.6.0
Please use the command line -
pip install tensorflow.

No module named 'matplotlib.artist'

I faced with this error
No module named 'matplotlib.artist'
here is the complete error:
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-2-cf8446fccc06> in <module>
5 import numpy as np
6 #import seaborn as sns
----> 7 import matplotlib.pyplot as plt
8 from warnings import filterwarnings
9 filterwarnings('ignore')
~\AppData\Roaming\Python\Python37\site-packages\matplotlib\pyplot.py in <module>
30 from cycler import cycler
31 import matplotlib
---> 32 import matplotlib.colorbar
33 import matplotlib.image
34 from matplotlib import rcsetup, style
~\AppData\Roaming\Python\Python37\site-packages\matplotlib\colorbar.py in <module>
25
26 import matplotlib as mpl
---> 27 import matplotlib.artist as martist
28 import matplotlib.cbook as cbook
29 import matplotlib.collections as collections
ModuleNotFoundError: No module named 'matplotlib.artist'
from yesterday when I want to use
import matplotlib.pyplot as plt
or
import seaborn as sns
I am using 3.7.4, matplotlib 3.1.1,seaborn 0.9.0
here is the full pip list
Package Version
---------------------------------- ---------
-atplotlib 3.1.1
alabaster 0.7.12
anaconda-client 1.7.2
anaconda-navigator 1.9.7
anaconda-project 0.8.3
asn1crypto 1.0.1
astroid 2.3.1
astropy 3.2.1
atomicwrites 1.3.0
attrs 19.2.0
Babel 2.7.0
backcall 0.1.0
backports.functools-lru-cache 1.5
backports.os 0.1.1
backports.shutil-get-terminal-size 1.0.0
backports.tempfile 1.0
backports.weakref 1.0.post1
beautifulsoup4 4.8.0
bitarray 1.0.1
bkcharts 0.2
bleach 3.1.0
bokeh 1.3.4
boto 2.49.0
Bottleneck 1.2.1
certifi 2019.9.11
cffi 1.12.3
chardet 3.0.4
Click 7.0
cloudpickle 1.2.2
clyent 1.2.2
colorama 0.4.1
comtypes 1.1.7
conda 4.7.12
conda-build 3.18.9
conda-package-handling 1.6.0
conda-verify 3.4.2
contextlib2 0.6.0
cryptography 2.7
cycler 0.10.0
Cython 0.29.13
cytoolz 0.10.0
dask 2.5.2
decorator 4.4.0
defusedxml 0.6.0
distributed 2.5.2
docutils 0.15.2
entrypoints 0.3
et-xmlfile 1.0.1
fastcache 1.1.0
filelock 3.0.12
Flask 1.1.1
fsspec 0.5.2
future 0.17.1
gevent 1.4.0
glob2 0.7
greenlet 0.4.15
h5py 2.9.0
HeapDict 1.0.1
html5lib 1.0.1
idna 2.8
imageio 2.6.0
imagesize 1.1.0
importlib-metadata 0.23
ipykernel 5.1.2
ipython 7.8.0
ipython-genutils 0.2.0
ipywidgets 7.5.1
isort 4.3.21
itsdangerous 1.1.0
jdcal 1.4.1
jedi 0.15.1
Jinja2 2.10.3
joblib 0.13.2
json5 0.8.5
jsonschema 3.0.2
jupyter 1.0.0
jupyter-client 5.3.3
jupyter-console 6.0.0
jupyter-core 4.5.0
jupyterlab 1.1.4
jupyterlab-server 1.0.6
keyring 18.0.0
kiwisolver 1.1.0
lazy-object-proxy 1.4.2
libarchive-c 2.8
llvmlite 0.29.0
locket 0.2.0
lxml 4.4.1
MarkupSafe 1.1.1
matplotlib 3.1.1
mccabe 0.6.1
menuinst 1.4.16
mistune 0.8.4
mkl-fft 1.0.14
mkl-random 1.1.0
mkl-service 2.3.0
mock 3.0.5
more-itertools 7.2.0
mpmath 1.1.0
msgpack 0.6.1
multipledispatch 0.6.0
navigator-updater 0.2.1
nbconvert 5.6.0
nbformat 4.4.0
networkx 2.3
nltk 3.4.5
nose 1.3.7
notebook 6.0.1
numba 0.45.1
numexpr 2.7.0
numpy 1.16.5
numpydoc 0.9.1
olefile 0.46
openpyxl 3.0.0
packaging 19.2
pandas 0.25.1
pandocfilters 1.4.2
parso 0.5.1
partd 1.0.0
path.py 12.0.1
pathlib2 2.3.5
patsy 0.5.1
pep8 1.7.1
pickleshare 0.7.5
Pillow 6.2.0
pip 19.2.3
pkginfo 1.5.0.1
pluggy 0.13.0
ply 3.11
progressbar2 3.42.0
prometheus-client 0.7.1
prompt-toolkit 2.0.10
psutil 5.6.3
py 1.8.0
pycodestyle 2.5.0
pycosat 0.6.3
pycparser 2.19
pycrypto 2.6.1
pycurl 7.43.0.3
pyflakes 2.1.1
Pygments 2.4.2
pykg2vec 0.0.48
pylint 2.4.2
pyodbc 4.0.27
pyOpenSSL 19.0.0
pyparsing 2.4.2
pyreadline 2.1
pyrsistent 0.15.4
PySocks 1.7.1
pytest 5.2.1
pytest-arraydiff 0.3
pytest-astropy 0.5.0
pytest-doctestplus 0.4.0
pytest-openfiles 0.4.0
pytest-remotedata 0.3.2
python-dateutil 2.8.0
python-utils 2.3.0
pytz 2019.3
PyWavelets 1.0.3
pywin32 223
pywinpty 0.5.5
PyYAML 5.1.2
pyzmq 18.1.0
QtAwesome 0.6.0
qtconsole 4.5.5
QtPy 1.9.0
requests 2.22.0
rope 0.14.0
ruamel-yaml 0.15.46
scikit-image 0.15.0
scikit-learn 0.21.3
scipy 1.3.1
seaborn 0.9.0
Send2Trash 1.5.0
setuptools 41.4.0
simplegeneric 0.8.1
singledispatch 3.4.0.3
six 1.12.0
snowballstemmer 2.0.0
sortedcollections 1.1.2
sortedcontainers 2.1.0
soupsieve 1.9.3
Sphinx 2.2.0
sphinx-gallery 0.4.0
sphinx-rtd-theme 0.4.3
sphinxcontrib-applehelp 1.0.1
sphinxcontrib-devhelp 1.0.1
sphinxcontrib-htmlhelp 1.0.2
sphinxcontrib-jsmath 1.0.1
sphinxcontrib-qthelp 1.0.2
sphinxcontrib-serializinghtml 1.1.3
sphinxcontrib-websupport 1.1.2
spyder 3.3.6
spyder-kernels 0.5.2
SQLAlchemy 1.3.9
statsmodels 0.10.1
sympy 1.4
tables 3.5.2
tblib 1.4.0
terminado 0.8.2
testpath 0.4.2
toolz 0.10.0
tornado 6.0.3
tqdm 4.36.1
traitlets 4.3.3
unicodecsv 0.14.1
urllib3 1.24.2
wcwidth 0.1.7
webencodings 0.5.1
Werkzeug 0.16.0
wheel 0.33.6
widgetsnbextension 3.5.1
win-inet-pton 1.1.0
win-unicode-console 0.5
wincertstore 0.2
wrapt 1.11.2
xlrd 1.2.0
XlsxWriter 1.2.1
xlwings 0.15.10
xlwt 1.3.0
zict 1.0.0
zipp 0.6.0
conda lsit gives me this:
_ipyw_jlab_nb_ext_conf 0.1.0 py37_0
alabaster 0.7.12 py37_0
anaconda 2019.10 py37_0
anaconda-client 1.7.2 py37_0
anaconda-navigator 1.9.7 py37_0
anaconda-project 0.8.3 py_0
asn1crypto 1.0.1 py37_0
astroid 2.3.1 py37_0
astropy 3.2.1 py37he774522_0
atomicwrites 1.3.0 py37_1
attrs 19.2.0 py_0
babel 2.7.0 py_0
backcall 0.1.0 py37_0
backports 1.0 py_2
backports.functools_lru_cache 1.5 py_2
backports.os 0.1.1 py37_0
backports.shutil_get_terminal_size 1.0.0 py37_2
backports.tempfile 1.0 py_1
backports.weakref 1.0.post1 py_1
beautifulsoup4 4.8.0 py37_0
bitarray 1.0.1 py37he774522_0
bkcharts 0.2 py37_0
blas 1.0 mkl
bleach 3.1.0 py37_0
blosc 1.16.3 h7bd577a_0
bokeh 1.3.4 py37_0
boto 2.49.0 py37_0
bottleneck 1.2.1 py37h452e1ab_1
bzip2 1.0.8 he774522_0
ca-certificates 2019.8.28 0
certifi 2019.9.11 py37_0
cffi 1.12.3 py37h7a1dbc1_0
chardet 3.0.4 py37_1003
click 7.0 py37_0
cloudpickle 1.2.2 py_0
clyent 1.2.2 py37_1
colorama 0.4.1 py37_0
comtypes 1.1.7 py37_0
conda 4.7.12 py37_0
conda-build 3.18.9 py37_3
conda-env 2.6.0 1
conda-package-handling 1.6.0 py37h62dcd97_0
conda-verify 3.4.2 py_1
console_shortcut 0.1.1 3
contextlib2 0.6.0 py_0
cryptography 2.7 py37h7a1dbc1_0
curl 7.65.3 h2a8f88b_0
cycler 0.10.0 py37_0
cython 0.29.13 py37ha925a31_0
cytoolz 0.10.0 py37he774522_0
dask 2.5.2 py_0
dask-core 2.5.2 py_0
decorator 4.4.0 py37_1
defusedxml 0.6.0 py_0
distributed 2.5.2 py_0
docutils 0.15.2 py37_0
entrypoints 0.3 py37_0
et_xmlfile 1.0.1 py37_0
fastcache 1.1.0 py37he774522_0
filelock 3.0.12 py_0
flask 1.1.1 py_0
freetype 2.9.1 ha9979f8_1
fsspec 0.5.2 py_0
future 0.17.1 py37_0
get_terminal_size 1.0.0 h38e98db_0
gevent 1.4.0 py37he774522_0
glob2 0.7 py_0
greenlet 0.4.15 py37hfa6e2cd_0
h5py 2.9.0 py37h5e291fa_0
hdf5 1.10.4 h7ebc959_0
heapdict 1.0.1 py_0
html5lib 1.0.1 py37_0
icc_rt 2019.0.0 h0cc432a_1
icu 58.2 ha66f8fd_1
idna 2.8 py37_0
imageio 2.6.0 py37_0
imagesize 1.1.0 py37_0
importlib_metadata 0.23 py37_0
intel-openmp 2019.4 245
ipykernel 5.1.2 py37h39e3cac_0
ipython 7.8.0 py37h39e3cac_0
ipython_genutils 0.2.0 py37_0
ipywidgets 7.5.1 py_0
isort 4.3.21 py37_0
itsdangerous 1.1.0 py37_0
jdcal 1.4.1 py_0
jedi 0.15.1 py37_0
jinja2 2.10.3 py_0
joblib 0.13.2 py37_0
jpeg 9b hb83a4c4_2
json5 0.8.5 py_0
jsonschema 3.0.2 py37_0
jupyter 1.0.0 py37_7
jupyter_client 5.3.3 py37_1
jupyter_console 6.0.0 py37_0
jupyter_core 4.5.0 py_0
jupyterlab 1.1.4 pyhf63ae98_0
jupyterlab_server 1.0.6 py_0
keyring 18.0.0 py37_0
kiwisolver 1.1.0 py37ha925a31_0
krb5 1.16.1 hc04afaa_7
lazy-object-proxy 1.4.2 py37he774522_0
libarchive 3.3.3 h0643e63_5
libcurl 7.65.3 h2a8f88b_0
libiconv 1.15 h1df5818_7
liblief 0.9.0 ha925a31_2
libpng 1.6.37 h2a8f88b_0
libsodium 1.0.16 h9d3ae62_0
libssh2 1.8.2 h7a1dbc1_0
libtiff 4.0.10 hb898794_2
libxml2 2.9.9 h464c3ec_0
libxslt 1.1.33 h579f668_0
llvmlite 0.29.0 py37ha925a31_0
locket 0.2.0 py37_1
lxml 4.4.1 py37h1350720_0
lz4-c 1.8.1.2 h2fa13f4_0
lzo 2.10 h6df0209_2
m2w64-gcc-libgfortran 5.3.0 6
m2w64-gcc-libs 5.3.0 7
m2w64-gcc-libs-core 5.3.0 7
m2w64-gmp 6.1.0 2
m2w64-libwinpthread-git 5.0.0.4634.697f757 2
markupsafe 1.1.1 py37he774522_0
matplotlib 3.1.1 py37hc8f65d3_0
mccabe 0.6.1 py37_1
menuinst 1.4.16 py37he774522_0
mistune 0.8.4 py37he774522_0
mkl 2019.4 245
mkl-service 2.3.0 py37hb782905_0
mkl_fft 1.0.14 py37h14836fe_0
mkl_random 1.1.0 py37h675688f_0
mock 3.0.5 py37_0
more-itertools 7.2.0 py37_0
mpmath 1.1.0 py37_0
msgpack-python 0.6.1 py37h74a9793_1
msys2-conda-epoch 20160418 1
multipledispatch 0.6.0 py37_0
navigator-updater 0.2.1 py37_0
nbconvert 5.6.0 py37_1
nbformat 4.4.0 py37_0
networkx 2.3 py_0
nltk 3.4.5 py37_0
nose 1.3.7 py37_2
notebook 6.0.1 py37_0
numba 0.45.1 py37hf9181ef_0
numexpr 2.7.0 py37hdce8814_0
numpy 1.16.5 py37h19fb1c0_0
numpy-base 1.16.5 py37hc3f5095_0
numpydoc 0.9.1 py_0
olefile 0.46 py37_0
openpyxl 3.0.0 py_0
openssl 1.1.1d he774522_2
packaging 19.2 py_0
pandas 0.25.1 py37ha925a31_0
pandoc 2.2.3.2 0
pandocfilters 1.4.2 py37_1
parso 0.5.1 py_0
partd 1.0.0 py_0
path.py 12.0.1 py_0
pathlib2 2.3.5 py37_0
patsy 0.5.1 py37_0
pep8 1.7.1 py37_0
pickleshare 0.7.5 py37_0
pillow 6.2.0 py37hdc69c19_0
pip 19.2.3 py37_0
pkginfo 1.5.0.1 py37_0
pluggy 0.13.0 py37_0
ply 3.11 py37_0
powershell_shortcut 0.0.1 2
prometheus_client 0.7.1 py_0
prompt_toolkit 2.0.10 py_0
psutil 5.6.3 py37he774522_0
py 1.8.0 py37_0
py-lief 0.9.0 py37ha925a31_2
pycodestyle 2.5.0 py37_0
pycosat 0.6.3 py37hfa6e2cd_0
pycparser 2.19 py37_0
pycrypto 2.6.1 py37hfa6e2cd_9
pycurl 7.43.0.3 py37h7a1dbc1_0
pyflakes 2.1.1 py37_0
pygments 2.4.2 py_0
pylint 2.4.2 py37_0
pyodbc 4.0.27 py37ha925a31_0
pyopenssl 19.0.0 py37_0
pyparsing 2.4.2 py_0
pyqt 5.9.2 py37h6538335_2
pyreadline 2.1 py37_1
pyrsistent 0.15.4 py37he774522_0
pysocks 1.7.1 py37_0
pytables 3.5.2 py37h1da0976_1
pytest 5.2.1 py37_0
pytest-arraydiff 0.3 py37h39e3cac_0
pytest-astropy 0.5.0 py37_0
pytest-doctestplus 0.4.0 py_0
pytest-openfiles 0.4.0 py_0
pytest-remotedata 0.3.2 py37_0
python 3.7.4 h5263a28_0
python-dateutil 2.8.0 py37_0
python-libarchive-c 2.8 py37_13
pytz 2019.3 py_0
pywavelets 1.0.3 py37h8c2d366_1
pywin32 223 py37hfa6e2cd_1
pywinpty 0.5.5 py37_1000
pyyaml 5.1.2 py37he774522_0
pyzmq 18.1.0 py37ha925a31_0
qt 5.9.7 vc14h73c81de_0
qtawesome 0.6.0 py_0
qtconsole 4.5.5 py_0
qtpy 1.9.0 py_0
requests 2.22.0 py37_0
rope 0.14.0 py_0
ruamel_yaml 0.15.46 py37hfa6e2cd_0
scikit-image 0.15.0 py37ha925a31_0
scikit-learn 0.21.3 py37h6288b17_0
scipy 1.3.1 py37h29ff71c_0
seaborn 0.9.0 py37_0
send2trash 1.5.0 py37_0
setuptools 41.4.0 py37_0
simplegeneric 0.8.1 py37_2
singledispatch 3.4.0.3 py37_0
sip 4.19.8 py37h6538335_0
six 1.12.0 py37_0
snappy 1.1.7 h777316e_3
snowballstemmer 2.0.0 py_0
sortedcollections 1.1.2 py37_0
sortedcontainers 2.1.0 py37_0
soupsieve 1.9.3 py37_0
sphinx 2.2.0 py_0
sphinxcontrib 1.0 py37_1
sphinxcontrib-applehelp 1.0.1 py_0
sphinxcontrib-devhelp 1.0.1 py_0
sphinxcontrib-htmlhelp 1.0.2 py_0
sphinxcontrib-jsmath 1.0.1 py_0
sphinxcontrib-qthelp 1.0.2 py_0
sphinxcontrib-serializinghtml 1.1.3 py_0
sphinxcontrib-websupport 1.1.2 py_0
spyder 3.3.6 py37_0
spyder-kernels 0.5.2 py37_0
sqlalchemy 1.3.9 py37he774522_0
sqlite 3.30.0 he774522_0
statsmodels 0.10.1 py37h8c2d366_0
sympy 1.4 py37_0
tbb 2019.4 h74a9793_0
tblib 1.4.0 py_0
terminado 0.8.2 py37_0
testpath 0.4.2 py37_0
tk 8.6.8 hfa6e2cd_0
toolz 0.10.0 py_0
tornado 6.0.3 py37he774522_0
tqdm 4.36.1 py_0
traitlets 4.3.3 py37_0
unicodecsv 0.14.1 py37_0
urllib3 1.24.2 py37_0
vc 14.1 h0510ff6_4
vs2015_runtime 14.16.27012 hf0eaf9b_0
wcwidth 0.1.7 py37_0
webencodings 0.5.1 py37_1
werkzeug 0.16.0 py_0
wheel 0.33.6 py37_0
widgetsnbextension 3.5.1 py37_0
win_inet_pton 1.1.0 py37_0
win_unicode_console 0.5 py37_0
wincertstore 0.2 py37_0
winpty 0.4.3 4
wrapt 1.11.2 py37he774522_0
xlrd 1.2.0 py37_0
xlsxwriter 1.2.1 py_0
xlwings 0.15.10 py37_0
xlwt 1.3.0 py37_0
xz 5.2.4 h2fa13f4_4
yaml 0.1.7 hc54c509_2
zeromq 4.3.1 h33f27b4_3
zict 1.0.0 py_0
zipp 0.6.0 py_0
zlib 1.2.11 h62dcd97_3
zstd 1.3.7 h508b16e_0
as you see there is something suspicious here in pip list:
-atplotlib
I do not know what is that! it
looks like matplotlib without first letter m
I have search a lot and did a lot of efforts based on this
Getting an error that reads: ModuleNotFoundError: No module named 'matplotlib.artist'
https://github.com/matplotlib/matplotlib/issues/6771/
like, reinstall matplotlib, reinstall anaconda ...
but it does not work! In my view, it might be something related to the path, but I can not find the solution.
I also uninstall my anaconda two times still have the problem!
any suggestion would be appreciated
Go to this location
~\AppData\Roaming\Python\Python37\site-packages\
There will be two folders named as
~atplotlib
and
matplotlib
Please rename ~atplotlib to matplotlib
The system will ask you that there is another folder with the same name, so do you want to merge.
Select merge option.
In my case, this resolved the matter.
I also had similar problem, the below command solved the problem, run it in anaconda command prompt.
conda install matplotlib --force
source: https://github.com/matplotlib/matplotlib/issues/6771/
I had the same problem using Python 3.9. I had no folder named ~atplotlib so I couldn't merge it as suggested. I however found ~andas (pandas) in site-packages which I attempted to merge but was unsuccessful.
I uninstalled matplotlib using "pip uninstall matplotlib" and then reinstalled pandas after removing all pandas folders in site-packages. I noticed the numpy was included at the same time and created a new folder ~umpy so now I just removed everything again that contained numpy, pandas or matplotlib from site-packages (after uninstalling via pip).
Then I installed the modules in the order pandas, (numpy included), matplotlib using pip. And now finally it works. Utterly confusing.
I have done all steps including uninstalling,
How to remove anaconda from windows completely?
using anaconda clean,
completely removing all folder related to python in C:\Users\myusdername
removing from path
uninstall by anaconda
I just nopticed that the error says that
AppData\Roaming\Python\Python37\site-packages\matplotlib\pyplot.py
I manually remove python form the
AppData\Roaming\Python\Python37
r=then it works!!
I face the same problem and I used the below command. Please use this command in Anaconda prompt.
>conda install matplotlib
after upgrading Matplotlib check this as well
Go to this location
~\AppData\Roaming\Python\Python37\site-packages\
and check the folder name ..
for some weird reason matplotlib is saved as ~atplotlib folder.
just rename ~atplotlib folder as matplotlib
I had the same problem. Resolved by installing the 'matplotlib-base" in anaconda.
Follow the below steps for the same:
Open Anaconda navigator
Choose the "Environments"
Choose "base(root)" environment
select the option "All" then Search for "matplotlib"
choose matplotlib-base Then Click on botton
Restart your JuputerNotebook kernal and then import the matplotlib

Import error of contextily package in python

I installed the package contextily with pip install contextily, it appears when I do conda list
# Name Version Build Channel
_ipyw_jlab_nb_ext_conf 0.1.0 py36h2fc01ae_0
affine 2.2.2 py_0 conda-forge
alabaster 0.7.10 py36h174008c_0
anaconda-client 1.7.2 py36_0
anaconda-navigator 1.9.6 py36_0
anaconda-project 0.8.2 py36h9ee5d53_0
appnope 0.1.0 py36hf537a9a_0
appscript 1.0.1 py36h9e71e49_1
arrow 0.13.1 pypi_0 pypi
asn1crypto 0.24.0 py36_0
astroid 1.6.1 py36_0
astropy 2.0.3 py36h1de35cc_0
attrs 17.4.0 py36_0
autobahn 18.6.1 pypi_0 pypi
babel 2.5.3 py36_0
backports 1.0 py36ha3c1827_1
backports.shutil_get_terminal_size 1.0.0 py36hd7a2ee4_2
beautifulsoup4 4.6.0 py36h72d3c9f_1
bitarray 0.8.1 py36h1de35cc_1
bkcharts 0.2 py36h073222e_0
blas 1.0 mkl
blaze 0.11.3 py36h02e7a37_0
bleach 2.1.2 py36_0
bokeh 0.12.13 py36h2f9c1c0_0
boost-cpp 1.67.0 h3a22d5f_0 conda-forge
boto 2.48.0 py36hdbc59ac_1
boto3 1.9.111 py_0 conda-forge
botocore 1.12.111 py_0 conda-forge
bottleneck 1.2.1 py36hbd380ad_0
branca 0.3.1 pypi_0 pypi
bzip2 1.0.6 hd86a083_4
ca-certificates 2019.3.9 hecc5488_0 conda-forge
cairo 1.14.12 hab642c4_1
cartopy 0.17.0 py36h707127b_1000 conda-forge
certifi 2019.3.9 py36_0 conda-forge
cffi 1.11.4 py36h342bebf_0
chardet 3.0.4 py36h96c241c_1
click 6.7 py36hec950be_0
click-plugins 1.0.4 py_0 conda-forge
cligj 0.5.0 pypi_0 pypi
cloudpickle 0.5.2 py36_1
clyent 1.2.2 py36hae3ad88_0
colorama 0.3.9 py36hd29a30c_0
conda 4.4.10 py36_0
conda-build 3.4.1 py36_0
conda-env 2.6.0 h36134e3_0
conda-verify 2.0.0 py36he837df3_0
contextily 0.99.0 pypi_0 pypi
contextlib2 0.5.5 py36hd66e5e7_0
cryptography 2.1.4 py36h842514c_0
curl 7.58.0 ha441bb4_0
cycler 0.10.0 py36hfc81398_0
cython 0.27.3 py36h6ecb376_0
cytoolz 0.9.0 py36h1de35cc_0
dask 0.16.1 py36_0
dask-core 0.16.1 py36_0
datashape 0.5.4 py36hfb22df8_0
dbus 1.12.2 h5243cc1_1
decorator 4.2.1 py36_0
descartes 1.1.0 pypi_0 pypi
distributed 1.20.2 py36_0
docutils 0.14 py36hbfde631_0
drawnow 0.71.2 pypi_0 pypi
entrypoints 0.2.3 py36hd81d71f_2
et_xmlfile 1.0.1 py36h1315bdc_0
expat 2.2.5 hb8e80ba_0
fastcache 1.0.2 py36h1de35cc_2
filelock 2.0.13 py36hf9de95b_0
fiona 1.8.6 pypi_0 pypi
flask 0.12.2 py36h5658096_0
flask-cors 3.0.3 py36h7387b97_0
folium 0.8.2 pypi_0 pypi
fontconfig 2.12.6 h9850fc5_0
freetype 2.8 h12048fb_1
freexl 1.0.5 h1de35cc_1002 conda-forge
geographiclib 1.49 py_0 conda-forge
geopandas 0.4.1 pypi_0 pypi
geopy 1.18.1 py_0 conda-forge
geos 3.6.2 h0a44026_1004 conda-forge
get_terminal_size 1.0.0 h7520d66_0
gettext 0.19.8.1 h15daf44_3
gevent 1.2.2 py36ha70b9d6_0
giflib 5.1.4 h1de35cc_1001 conda-forge
glib 2.53.6 h33f6a65_2
glob2 0.6 py36h94c9186_0
gmp 6.1.2 hb37e062_1
gmpy2 2.0.8 py36hf9c35bd_2
greenlet 0.4.12 py36hf09ba7b_0
h5py 2.7.1 py36h39cdac5_0
hdf4 4.2.13 0 conda-forge
hdf5 1.10.1 ha036c08_1
heapdict 1.0.0 py36_2
html5lib 1.0.1 py36h2f9c1c0_0
icu 58.2 h4b95b61_1
idna 2.6 py36h8628d0a_1
imageio 2.2.0 py36h5e01289_0
imagesize 0.7.1 py36h3495948_0
intel-openmp 2018.0.0 h8158457_8
ipykernel 4.8.0 py36_0
ipython 6.2.1 py36h3dda519_1
ipython_genutils 0.2.0 py36h241746c_0
ipywidgets 7.1.1 py36_0
isort 4.2.15 py36hceb2a01_0
itsdangerous 0.24 py36h49fbb8d_1
jbig 2.1 h4d881f8_0
jdcal 1.3 py36h1986823_0
jedi 0.11.1 py36_0
jinja2 2.10 py36hd36f9c5_0
jmespath 0.9.3 py_1 conda-forge
jpeg 9b he5867d9_2
json-c 0.12.1 h470a237_1 conda-forge
jsonschema 2.6.0 py36hb385e00_0
jupyter 1.0.0 py36_4
jupyter_client 5.2.2 py36_0
jupyter_console 5.2.0 py36hccf5b1c_1
jupyter_core 4.4.0 py36h79cf704_0
jupyterlab 0.31.5 py36_0
jupyterlab_launcher 0.10.2 py36_0
kealib 1.4.8 hfc679d8_0 conda-forge
kiwisolver 1.0.1 py36h04f5b5a_1002 conda-forge
lazy-object-proxy 1.3.1 py36h2fbbe47_0
libcurl 7.58.0 hf30b1f0_0
libcxx 4.0.1 h579ed51_0
libcxxabi 4.0.1 hebd6815_0
libdap4 3.19.1 0 conda-forge
libedit 3.1 hb4e282d_0
libffi 3.2.1 h475c297_4
libgdal 2.2.2 h3559a57_1
libgfortran 3.0.1 h93005f0_2
libiconv 1.15 hdd342a3_7
libkml 1.3.0 h677b1dd_1008 conda-forge
libnetcdf 4.4.1.1 10 conda-forge
libpng 1.6.34 he12f830_0
libpq 10.6 hbe1e24e_1000 conda-forge
libsodium 1.0.15 hd9e47c5_0
libspatialite 4.3.0a h0a2fa02_18
libssh2 1.8.0 h322a93b_4
libtiff 4.0.9 h0dac147_0
libxml2 2.9.7 hab757c2_0
libxslt 1.1.32 hb819dd2_0
llvmlite 0.21.0 py36hff739e7_0
locket 0.2.0 py36hca03003_1
lxml 4.1.1 py36hef8c89e_1
lzo 2.10 h362108e_2
markupsafe 1.0 py36h3a1e703_1
matplotlib 3.0.3 pypi_0 pypi
mccabe 0.6.1 py36hdaeb55d_0
mercantile 1.0.4 py_0 conda-forge
mistune 0.8.3 py36_0
mkl 2018.0.1 hfbd8650_4
mkl-service 1.1.2 py36h7ea6df4_4
mpc 1.0.3 h7a72875_5
mpfr 3.1.5 h711e7fd_2
mpmath 1.0.0 py36hf1b8295_2
msgpack-python 0.5.1 py36h04f5b5a_0
multipledispatch 0.4.9 py36hc5f92b5_0
munch 2.3.2 pypi_0 pypi
navigator-updater 0.1.0 py36h7aee5fb_0
nbconvert 5.3.1 py36h810822e_0
nbformat 4.4.0 py36h827af21_0
ncurses 6.0 hd04f020_2
networkx 2.1 py36_0
nltk 3.2.5 py36h1190bce_0
nose 1.3.7 py36h73fae2b_2
notebook 5.4.0 py36_0
numba 0.36.2 np114py36hc2f221f_0
numexpr 2.6.4 py36habcfcfe_0
numpy 1.14.2 py36ha9ae307_0
numpydoc 0.7.0 py36he54d08e_0
odo 0.5.1 py36hc1af34a_0
olefile 0.45.1 py36_0
openjpeg 2.3.0 h3bf0609_1003 conda-forge
openpyxl 2.4.10 py36_0
openssl 1.0.2r h1de35cc_0 conda-forge
owslib 0.17.1 py_0 conda-forge
packaging 16.8 py36he5e8135_0
pandas 0.24.1 py36h0a44026_0 conda-forge
pandoc 1.19.2.1 ha5e8f32_1
pandocfilters 1.4.2 py36h3b0b094_1
parso 0.1.1 py36hc90e01c_0
partd 0.3.8 py36hf5c4cb8_0
path.py 10.5 py36h7bcb313_0
pathlib2 2.3.0 py36h877a6d8_0
patsy 0.5.0 py36_0
pcre 8.41 hfb6ab37_1
pep8 1.7.1 py36_0
pexpect 4.3.1 py36_0
pickleshare 0.7.4 py36hf512f8e_0
pillow 5.0.0 py36hfcce615_0
pip 19.0.3 pypi_0 pypi
pixman 0.34.0 h1de35cc_1003 conda-forge
pkginfo 1.4.1 py36h25bf955_0
place 0.5.5 pypi_0 pypi
pluggy 0.6.0 py36hb1d0581_0
ply 3.10 py36h10e714e_0
poppler 0.60.1 hb654a48_0
poppler-data 0.4.9 1 conda-forge
proj 0.1.0 pypi_0 pypi
proj4 4.9.3 h470a237_8 conda-forge
prompt_toolkit 1.0.15 py36haeda067_0
psutil 5.4.3 py36h1de35cc_0
ptyprocess 0.5.2 py36he6521c3_0
py 1.5.2 py36ha69170d_0
pycodestyle 2.3.1 py36h83e8646_0
pycosat 0.6.3 py36hee92d8f_0
pycparser 2.18 py36h724b2fc_1
pycrypto 2.6.1 py36h1de35cc_7
pycurl 7.43.0.1 py36hdbc3d79_0
pyepsg 0.4.0 py_0 conda-forge
pyflakes 1.6.0 py36hea45e83_0
pygments 2.2.0 py36h240cd3f_0
pykdtree 1.3.1 py36h917ab60_1002 conda-forge
pylint 1.8.2 py36_0
pyodbc 4.0.22 py36h0a44026_0
pyopenssl 17.5.0 py36h51e4350_0
pyparsing 2.2.0 py36hb281f35_0
pyproj 1.9.6 pypi_0 pypi
pyqt 5.6.0 py36he5c6137_6
pyserial 3.4 pypi_0 pypi
pyshp 2.1.0 py_0 conda-forge
pysocks 1.6.7 py36hfa33cec_1
pytables 3.4.2 py36hfbd7ab0_2
pytest 3.3.2 py36_0
python 3.6.4 hc167b69_1
python-dateutil 2.6.1 py36h86d2abb_1
python.app 2 py36h54569d5_7
pytz 2017.3 py36hf0bf824_0
pywavelets 0.5.2 py36h2710a04_0
pyyaml 3.12 py36h2ba1e63_1
pyzmq 16.0.3 py36he48b5ad_0
qt 5.6.2 h9975529_14
qtawesome 0.4.4 py36h468c6fb_0
qtconsole 4.3.1 py36hd96c0ff_0
qtpy 1.6.0 py_0
rasterio 0.36.0 py36h01fd17b_1
readline 7.0 hc1231fa_4
requests 2.18.4 py36h4516966_1
rope 0.10.7 py36h68959ac_0
ruamel_yaml 0.15.35 py36h1de35cc_1
s3transfer 0.2.0 py36_0 conda-forge
scikit-image 0.13.1 py36h1de35cc_1
scikit-learn 0.19.1 py36hffbff8c_0
scipy 1.0.0 py36h1de22e9_0
seaborn 0.8.1 py36h595ecd9_0
send2trash 1.4.2 py36_0
setuptools 38.4.0 py36_0
shapely 1.6.4 py36h2e8a847_1000 conda-forge
simplegeneric 0.8.1 py36_2
singledispatch 3.4.0.3 py36hf20db9d_0
sip 4.18.1 py36h2824476_2
six 1.11.0 py36h0e22d5e_1
snowballstemmer 1.2.1 py36h6c7b616_0
snuggs 1.4.3 py_0 conda-forge
sortedcollections 0.5.3 py36he9c3ed6_0
sortedcontainers 1.5.9 py36_0
sphinx 1.6.6 py36_0
sphinxcontrib 1.0 py36h9364dc8_1
sphinxcontrib-websupport 1.0.1 py36h92f4a7a_1
spyder 3.2.6 py36_0
sqlalchemy 1.2.1 py36h1de35cc_0
sqlite 3.22.0 h3efe00b_0
statsmodels 0.8.0 py36h9c68fc9_0
sympy 1.1.1 py36h7f3cf04_0
tblib 1.3.2 py36hda67792_0
terminado 0.8.1 py36_1
testpath 0.3.1 py36h625a49b_0
tk 8.6.7 h35a86e2_3
toolz 0.9.0 py36_0
tornado 4.5.3 py36_0
traitlets 4.3.2 py36h65bd3ce_0
txaio 2.10.0 pypi_0 pypi
typing 3.6.2 py36haa2d9ef_0
unicodecsv 0.14.1 py36he531d66_0
unixodbc 2.3.4 h4cb4dde_1
urllib3 1.22 py36h68b9469_0
vpnotebook 0.1.3 pypi_0 pypi
vpython 7.4.4 pypi_0 pypi
wcwidth 0.1.7 py36h8c6ec74_0
webencodings 0.5.1 py36h3b9701d_1
werkzeug 0.14.1 py36_0
wheel 0.30.0 py36h5eb2c71_1
widgetsnbextension 3.1.0 py36_0
wrapt 1.10.11 py36hc29e774_0
xerces-c 3.2.2 h44e365a_1001 conda-forge
xlrd 1.1.0 py36h336f4a2_1
xlsxwriter 1.0.2 py36h3736301_0
xlwings 0.11.5 py36_0
xlwt 1.2.0 py36h5ad1178_0
xz 5.2.3 h0278029_2
yaml 0.1.7 hc338f04_2
zeromq 4.2.2 ha360ad0_2
zict 0.1.3 py36h71da714_0
zlib 1.2.11 hf3cbc9b_2
when i run it in conda, this error appears:
I
mportError Traceback (most recent call last)
<ipython-input-1-39efe3472e8a> in <module>()
1 import geopandas as gpd
2 import folium
----> 3 import contextily as ctx
/Users/localadmin/anaconda3/lib/python3.6/site-packages/contextily/__init__.py in <module>()
4
5 from . import tile_providers as sources
----> 6 from .place import Place, plot_map
7 from .tile import *
8 from .plotting import add_basemap, add_attribution
/Users/localadmin/anaconda3/lib/python3.6/site-packages/contextily/place.py in <module>()
4 import matplotlib.pyplot as plt
5 from warnings import warn
----> 6 from .tile import howmany, bounds2raster, bounds2img, _sm2ll, _calculate_zoom
7 from .plotting import ATTRIBUTION, INTERPOLATION, ZOOM, add_attribution
8
/Users/localadmin/anaconda3/lib/python3.6/site-packages/contextily/tile.py in <module>()
8 import numpy as np
9 import pandas as pd
---> 10 import rasterio as rio
11 from PIL import Image
12 from cartopy.io.img_tiles import _merge_tiles as merge_tiles
/Users/localadmin/anaconda3/lib/python3.6/site-packages/rasterio/__init__.py in <module>()
13 import warnings
14
---> 15 from rasterio._base import (
16 eval_window, window_shape, window_index, gdal_version)
17 from rasterio.dtypes import (
ImportError: dlopen(/Users/localadmin/anaconda3/lib/python3.6/site-packages/rasterio/_base.cpython-36m-darwin.so, 2): Library not loaded: #rpath/libuuid.1.dylib
Referenced from: /Users/localadmin/anaconda3/lib/libgdal.20.dylib
Reason: image not found
I could not find a post that solves that problem
just install another conda new environment, according to enter link description here. It works for me.

Categories