ModuleNotFoundError: No module named 'matplotlib'

Hi,

I have successfully deployed the app running for a month until yesterday - there was an error saying matplotlib module is not found.
My link to the app is
https://share.streamlit.io/omerge123/crypto_defi_/main/Crypto_Autorun_Streamlit.py

The github link to the app is

I don’t understand why is it happening only to matplotlib and why it was running fine until yesterday. I have already created the requirements txt for the dependency modules.

Can any help on this ? Thanks.

Hi @Omerge84, welcome to the Streamlit community!

I made a fork and launched from my account and it worked (save for your credentials, which I obviously don’t have). So maybe there was a hiccup of some sort? Did you try to restart the app from the Cloud dashboard?

Best,
Randy

Hi Randy,

Thanks for looking into it. I have try to restart the app twice and it is still not working.
https://share.streamlit.io/omerge123/crypto_defi_/main/Crypto_Autorun_Streamlit.py

Can you help to look into it one more time ?

I have pasted the error log here:
[client] Connecting…

[manager] Starting up repository: ‘crypto_defi_’, branch: ‘main’, main module: ‘Crypto_Autorun_Streamlit.py’

[manager] Cloning repository…

[manager] Cloning into ‘/app/crypto_defi_’…

[manager] Cloned repository!

[manager] Pulling code changes from Github…

[manager] Processing dependencies…

Collecting pandas==1.1.5

Downloading pandas-1.1.5-cp38-cp38-manylinux1_x86_64.whl (9.3 MB)

Collecting streamlit==1.3.0

Downloading streamlit-1.3.0-py2.py3-none-any.whl (9.2 MB)

Collecting numpy==1.19.5

Downloading numpy-1.19.5-cp38-cp38-manylinux2010_x86_64.whl (14.9 MB)

Collecting matplotlib==3.3.3

Downloading matplotlib-3.3.3-cp38-cp38-manylinux1_x86_64.whl (11.6 MB)

Collecting python-dateutil>=2.7.3

Downloading python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)

Collecting pytz>=2017.2

Downloading pytz-2021.3-py2.py3-none-any.whl (503 kB)

Collecting packaging

Downloading packaging-21.3-py3-none-any.whl (40 kB)

Collecting click<8.0,>=7.0

Downloading click-7.1.2-py2.py3-none-any.whl (82 kB)

Collecting tzlocal

Downloading tzlocal-4.1-py3-none-any.whl (19 kB)

Collecting requests

Downloading requests-2.27.1-py2.py3-none-any.whl (63 kB)

Collecting pydeck>=0.1.dev5

Downloading pydeck-0.7.1-py2.py3-none-any.whl (4.3 MB)

Collecting validators

Downloading validators-0.18.2-py3-none-any.whl (19 kB)

Collecting protobuf!=3.11,>=3.6.0

Downloading protobuf-3.19.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB)

Collecting base58

Downloading base58-2.1.1-py3-none-any.whl (5.6 kB)

Collecting watchdog

Downloading watchdog-2.1.6-py3-none-manylinux2014_x86_64.whl (76 kB)

Collecting attrs

Downloading attrs-21.4.0-py2.py3-none-any.whl (60 kB)

Collecting pillow>=6.2.0

Downloading Pillow-9.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.3 MB)

Collecting tornado>=5.0

Downloading tornado-6.1-cp38-cp38-manylinux2010_x86_64.whl (427 kB)

Collecting astor

Downloading astor-0.8.1-py2.py3-none-any.whl (27 kB)

Collecting altair>=3.2.0

Downloading altair-4.2.0-py3-none-any.whl (812 kB)

Collecting pympler>=0.9

Downloading Pympler-1.0.1-py3-none-any.whl (164 kB)

Collecting cachetools>=4.0

Downloading cachetools-5.0.0-py3-none-any.whl (9.1 kB)

Collecting blinker

Downloading blinker-1.4.tar.gz (111 kB)

Collecting gitpython!=3.1.19

Downloading GitPython-3.1.26-py3-none-any.whl (180 kB)

Collecting pyarrow

Downloading pyarrow-7.0.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (26.7 MB)

Collecting toml

Downloading toml-0.10.2-py2.py3-none-any.whl (16 kB)

Collecting pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.3

Downloading pyparsing-3.0.7-py3-none-any.whl (98 kB)

Collecting kiwisolver>=1.0.1

Downloading kiwisolver-1.3.2-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl (1.2 MB)

Collecting cycler>=0.10

Downloading cycler-0.11.0-py3-none-any.whl (6.4 kB)

Collecting toolz

Downloading toolz-0.11.2-py3-none-any.whl (55 kB)

Collecting entrypoints

Downloading entrypoints-0.4-py3-none-any.whl (5.3 kB)

Collecting jsonschema>=3.0

Downloading jsonschema-4.4.0-py3-none-any.whl (72 kB)

Collecting jinja2

Downloading Jinja2-3.0.3-py3-none-any.whl (133 kB)

Collecting gitdb<5,>=4.0.1

Downloading gitdb-4.0.9-py3-none-any.whl (63 kB)

Collecting smmap<6,>=3.0.1

Downloading smmap-5.0.0-py3-none-any.whl (24 kB)

Collecting importlib-resources>=1.4.0

Downloading importlib_resources-5.4.0-py3-none-any.whl (28 kB)

Collecting pyrsistent!=0.17.0,!=0.17.1,!=0.17.2,>=0.14.0

Downloading pyrsistent-0.18.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (119 kB)

Collecting zipp>=3.1.0

Downloading zipp-3.7.0-py3-none-any.whl (5.3 kB)

Collecting traitlets>=4.3.2

Downloading traitlets-5.1.1-py3-none-any.whl (102 kB)

Collecting ipykernel>=5.1.2

Downloading ipykernel-6.8.0-py3-none-any.whl (128 kB)

Collecting ipywidgets>=7.0.0

Downloading ipywidgets-7.6.5-py2.py3-none-any.whl (121 kB)

Collecting matplotlib-inline<0.2.0,>=0.1.0

Downloading matplotlib_inline-0.1.3-py3-none-any.whl (8.2 kB)

Collecting nest-asyncio

Downloading nest_asyncio-1.5.4-py3-none-any.whl (5.1 kB)

Collecting jupyter-client<8.0

Downloading jupyter_client-7.1.2-py3-none-any.whl (130 kB)

Collecting debugpy<2.0,>=1.0.0

Downloading debugpy-1.5.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (1.9 MB)

Collecting ipython>=7.23.1

Downloading ipython-8.0.1-py3-none-any.whl (747 kB)

Collecting setuptools>=18.5

Downloading setuptools-60.7.1-py3-none-any.whl (1.0 MB)

Collecting black

Downloading black-22.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.5 MB)

Collecting pickleshare

Downloading pickleshare-0.7.5-py2.py3-none-any.whl (6.9 kB)

Collecting prompt-toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0

Downloading prompt_toolkit-3.0.26-py3-none-any.whl (375 kB)

Collecting backcall

Downloading backcall-0.2.0-py2.py3-none-any.whl (11 kB)

Collecting jedi>=0.16

Downloading jedi-0.18.1-py2.py3-none-any.whl (1.6 MB)

Collecting pexpect>4.3

Downloading pexpect-4.8.0-py2.py3-none-any.whl (59 kB)

Collecting decorator

Downloading decorator-5.1.1-py3-none-any.whl (9.1 kB)

Collecting pygments

Downloading Pygments-2.11.2-py3-none-any.whl (1.1 MB)

Collecting stack-data

Downloading stack_data-0.1.4-py3-none-any.whl (20 kB)

Collecting jupyterlab-widgets>=1.0.0

Downloading jupyterlab_widgets-1.0.2-py3-none-any.whl (243 kB)

Collecting widgetsnbextension~=3.5.0

Downloading widgetsnbextension-3.5.2-py2.py3-none-any.whl (1.6 MB)

Collecting ipython-genutils~=0.2.0

Downloading ipython_genutils-0.2.0-py2.py3-none-any.whl (26 kB)

Collecting nbformat>=4.2.0

Downloading nbformat-5.1.3-py3-none-any.whl (178 kB)

Collecting parso<0.9.0,>=0.8.0

Downloading parso-0.8.3-py2.py3-none-any.whl (100 kB)

Collecting MarkupSafe>=2.0

Downloading MarkupSafe-2.0.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (30 kB)

Collecting jupyter-core>=4.6.0

Downloading jupyter_core-4.9.1-py3-none-any.whl (86 kB)

Collecting pyzmq>=13

Downloading pyzmq-22.3.0-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (1.1 MB)

Collecting ptyprocess>=0.5

Downloading ptyprocess-0.7.0-py2.py3-none-any.whl (13 kB)

Collecting wcwidth

Downloading wcwidth-0.2.5-py2.py3-none-any.whl (30 kB)

Collecting six>=1.5

Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)

Collecting notebook>=4.4.1

Downloading notebook-6.4.8-py3-none-any.whl (9.9 MB)

Collecting argon2-cffi

Downloading argon2_cffi-21.3.0-py3-none-any.whl (14 kB)

Collecting terminado>=0.8.3

Downloading terminado-0.13.1-py3-none-any.whl (14 kB)

Collecting nbconvert

Downloading nbconvert-6.4.1-py3-none-any.whl (557 kB)

Collecting prometheus-client

Downloading prometheus_client-0.13.1-py3-none-any.whl (57 kB)

Collecting Send2Trash>=1.8.0

Downloading Send2Trash-1.8.0-py3-none-any.whl (18 kB)

Collecting argon2-cffi-bindings

Downloading argon2_cffi_bindings-21.2.0-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (86 kB)

Collecting cffi>=1.0.1

Downloading cffi-1.15.0-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (446 kB)

Collecting pycparser

Downloading pycparser-2.21-py2.py3-none-any.whl (118 kB)

Collecting typing-extensions>=3.10.0.0

Downloading typing_extensions-4.0.1-py3-none-any.whl (22 kB)

INFO: pip is looking at multiple versions of base58 to determine which version is compatible with other requirements. This could take a while.

Collecting base58

Downloading base58-2.1.0-py3-none-any.whl (5.6 kB)

Downloading base58-2.0.1-py3-none-any.whl (4.3 kB)

Downloading base58-2.0.0-py3-none-any.whl (6.0 kB)

Downloading base58-1.0.3-py3-none-any.whl (3.1 kB)

Downloading base58-1.0.2-py3-none-any.whl (3.3 kB)

Downloading base58-1.0.1-py3-none-any.whl (3.3 kB)

Downloading base58-1.0.0.tar.gz (3.0 kB)

INFO: pip is looking at multiple versions of base58 to determine which version is compatible with other requirements. This could take a while.

Downloading base58-0.2.5-py3-none-any.whl (4.1 kB)

Downloading base58-0.2.4-py3-none-any.whl (4.0 kB)

Downloading base58-0.2.3.tar.gz (2.2 kB)

Downloading base58-0.2.2.tar.gz (2.1 kB)

Downloading base58-0.2.1.tar.gz (2.1 kB)

INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. If you want to abort this run, you can press Ctrl + C to do so. To improve how pip performs, tell us what happened here: https://pip.pypa.io/surveys/backtracking

Downloading base58-0.2.0.tar.gz (1.9 kB)

Downloading base58-0.1.1.tar.gz (1.8 kB)

Downloading base58-0.1.0.tar.gz (1.8 kB)

INFO: pip is looking at multiple versions of backcall to determine which version is compatible with other requirements. This could take a while.

Collecting backcall

Downloading backcall-0.1.0.zip (11 kB)

INFO: pip is looking at multiple versions of astor to determine which version is compatible with other requirements. This could take a while.

Collecting astor

Downloading astor-0.8.0-py2.py3-none-any.whl (27 kB)

Downloading astor-0.7.1-py2.py3-none-any.whl (27 kB)

Downloading astor-0.7.0-py2.py3-none-any.whl (27 kB)

INFO: pip is looking at multiple versions of backcall to determine which version is compatible with other requirements. This could take a while.

Downloading astor-0.6.2-py2.py3-none-any.whl (26 kB)

Downloading astor-0.6.1-py2.py3-none-any.whl (26 kB)

Downloading astor-0.6-py2.py3-none-any.whl (26 kB)

INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. If you want to abort this run, you can press Ctrl + C to do so. To improve how pip performs, tell us what happened here: https://pip.pypa.io/surveys/backtracking

Downloading astor-0.5-py2.py3-none-any.whl (12 kB)

INFO: pip is looking at multiple versions of astor to determine which version is compatible with other requirements. This could take a while.

Downloading astor-0.4.1-py2.py3-none-any.whl (12 kB)

Downloading astor-0.4-py2.py3-none-any.whl (13 kB)

Downloading astor-0.3.tar.gz (10 kB)

Downloading astor-0.2.1.tar.gz (10 kB)

Downloading astor-0.2.tar.gz (9.6 kB)

INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. If you want to abort this run, you can press Ctrl + C to do so. To improve how pip performs, tell us what happened here: https://pip.pypa.io/surveys/backtracking

Downloading astor-0.1.tar.gz (8.9 kB)

INFO: pip is looking at multiple versions of cffi to determine which version is compatible with other requirements. This could take a while.

Collecting cffi>=1.0.1

Downloading cffi-1.14.6-cp38-cp38-manylinux1_x86_64.whl (411 kB)

Downloading cffi-1.14.5-cp38-cp38-manylinux1_x86_64.whl (411 kB)

Downloading cffi-1.14.4-cp38-cp38-manylinux1_x86_64.whl (411 kB)

Downloading cffi-1.14.3-cp38-cp38-manylinux1_x86_64.whl (410 kB)

Downloading cffi-1.14.2-cp38-cp38-manylinux1_x86_64.whl (410 kB)

Downloading cffi-1.14.1-cp38-cp38-manylinux1_x86_64.whl (409 kB)

Downloading cffi-1.14.0-cp38-cp38-manylinux1_x86_64.whl (409 kB)

INFO: pip is looking at multiple versions of cffi to determine which version is compatible with other requirements. This could take a while.

Downloading cffi-1.13.2-cp38-cp38-manylinux1_x86_64.whl (439 kB)

Downloading cffi-1.13.1-cp38-cp38-manylinux1_x86_64.whl (439 kB)

Downloading cffi-1.13.0-cp38-cp38-manylinux1_x86_64.whl (439 kB)

Downloading cffi-1.12.3.tar.gz (456 kB)

Downloading cffi-1.12.2.tar.gz (453 kB)

INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. If you want to abort this run, you can press Ctrl + C to do so. To improve how pip performs, tell us what happened here: https://pip.pypa.io/surveys/backtracking

Downloading cffi-1.12.1.tar.gz (453 kB)

Downloading cffi-1.12.0.tar.gz (453 kB)

Downloading cffi-1.11.5.tar.gz (438 kB)

Downloading cffi-1.11.4.tar.gz (436 kB)

Downloading cffi-1.11.3.tar.gz (436 kB)

Downloading cffi-1.11.2.tar.gz (435 kB)

Downloading cffi-1.11.1.tar.gz (435 kB)

Downloading cffi-1.11.0.tar.gz (434 kB)

Downloading cffi-1.10.0.tar.gz (418 kB)

Downloading cffi-1.9.1.tar.gz (407 kB)

Downloading cffi-1.9.0.tar.gz (407 kB)

Downloading cffi-1.8.3.tar.gz (403 kB)

Downloading cffi-1.8.2.tar.gz (403 kB)

Downloading cffi-1.7.0.tar.gz (400 kB)

Downloading cffi-1.6.0.tar.gz (397 kB)

Downloading cffi-1.5.2.tar.gz (388 kB)

Downloading cffi-1.5.1.tar.gz (388 kB)

Downloading cffi-1.5.0.tar.gz (385 kB)

Downloading cffi-1.4.2.tar.gz (365 kB)

Downloading cffi-1.4.1.tar.gz (365 kB)

Downloading cffi-1.4.0.tar.gz (365 kB)

Downloading cffi-1.3.1.tar.gz (351 kB)

Downloading cffi-1.3.0.tar.gz (347 kB)

Downloading cffi-1.2.1.tar.gz (335 kB)

Downloading cffi-1.2.0-1.tar.gz (335 kB)

WARNING: Discarding https://files.pythonhosted.org/packages/ff/6d/9f5004f4619e64e25785029d3fab9807eddc780e194ba323ecd4007fa8c5/cffi-1.2.0-1.tar.gz#sha256=9b9c2b964fd88ddbf99ea8fff65c56264c8866b77050fd53f0159e53c98c27e0 (from Links for cffi). Requested cffi>=1.0.1 from https://files.pythonhosted.org/packages/ff/6d/9f5004f4619e64e25785029d3fab9807eddc780e194ba323ecd4007fa8c5/cffi-1.2.0-1.tar.gz#sha256=9b9c2b964fd88ddbf99ea8fff65c56264c8866b77050fd53f0159e53c98c27e0 (from argon2-cffi-bindings->argon2-cffi->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit==1.3.0->-r /app/crypto_defi_/requirements.txt (line 2)) has inconsistent version: filename has ‘1.2.0.post1’, but metadata has ‘1.2.0’

Downloading cffi-1.1.2.tar.gz (326 kB)

Downloading cffi-1.1.1.tar.gz (326 kB)

Downloading cffi-1.1.0.tar.gz (323 kB)

Downloading cffi-1.0.3.tar.gz (317 kB)

Downloading cffi-1.0.2-2.tar.gz (317 kB)

WARNING: Discarding https://files.pythonhosted.org/packages/ef/23/c6f7003ebb7b4b3fe4872f112b18ee181a3ec2b137e964093a8b35d4a5bd/cffi-1.0.2-2.tar.gz#sha256=6dc6ae05816e44c71094049321403fda1013013d68506f30914a59683a47fd32 (from Links for cffi). Requested cffi>=1.0.1 from https://files.pythonhosted.org/packages/ef/23/c6f7003ebb7b4b3fe4872f112b18ee181a3ec2b137e964093a8b35d4a5bd/cffi-1.0.2-2.tar.gz#sha256=6dc6ae05816e44c71094049321403fda1013013d68506f30914a59683a47fd32 (from argon2-cffi-bindings->argon2-cffi->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit==1.3.0->-r /app/crypto_defi_/requirements.txt (line 2)) has inconsistent version: filename has ‘1.0.2.post2’, but metadata has ‘1.0.2’

Downloading cffi-1.0.1.tar.gz (316 kB)

INFO: pip is looking at multiple versions of argon2-cffi-bindings to determine which version is compatible with other requirements. This could take a while.

Collecting argon2-cffi-bindings

Downloading argon2_cffi_bindings-21.1.0-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (85 kB)

Collecting cffi>=1.0.0

Downloading cffi-1.0.0.tar.gz (315 kB)

INFO: pip is looking at multiple versions of argon2-cffi to determine which version is compatible with other requirements. This could take a while.

Collecting argon2-cffi

Downloading argon2_cffi-21.2.0-py3-none-any.whl (14 kB)

Downloading argon2_cffi-21.1.0-cp35-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.whl (96 kB)

Downloading argon2_cffi-20.1.0-cp35-abi3-manylinux1_x86_64.whl (97 kB)

[manager] Python dependencies were installed from /app/crypto_defi_/requirements.txt using pip.

[manager] Processed dependencies!

Downloading argon2_cffi-19.2.0-cp34-abi3-manylinux1_x86_64.whl (95 kB)

Downloading argon2_cffi-19.1.0-cp34-abi3-manylinux1_x86_64.whl (93 kB)

Downloading argon2_cffi-18.3.0-cp34-abi3-manylinux1_x86_64.whl (93 kB)

Downloading argon2_cffi-18.2.0-cp34-abi3-manylinux1_x86_64.whl (93 kB)

INFO: pip is looking at multiple versions of argon2-cffi to determine which version is compatible with other requirements. This could take a while.

Downloading argon2_cffi-18.1.0.tar.gz (1.8 MB)

Downloading argon2_cffi-16.3.0.tar.gz (1.5 MB)

Downloading argon2_cffi-16.2.0.tar.gz (1.2 MB)

Downloading argon2_cffi-16.1.0.tar.gz (1.2 MB)

Downloading argon2_cffi-16.0.0.tar.gz (822 kB)

INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. If you want to abort this run, you can press Ctrl + C to do so. To improve how pip performs, tell us what happened here: https://pip.pypa.io/surveys/backtracking

Downloading argon2_cffi-15.0.1.tar.gz (818 kB)

Downloading argon2_cffi-15.0.0.tar.gz (818 kB)

INFO: pip is looking at multiple versions of zipp to determine which version is compatible with other requirements. This could take a while.

Collecting zipp>=3.1.0

Downloading zipp-3.6.0-py3-none-any.whl (5.3 kB)

INFO: pip is looking at multiple versions of argon2-cffi-bindings to determine which version is compatible with other requirements. This could take a while.

2022-02-05 01:05:09.818 Uncaught app exception

Traceback (most recent call last):

File “/home/appuser/venv/lib/python3.8/site-packages/streamlit/script_runner.py”, line 379, in _run_script

exec(code, module.__dict__)

File “/app/crypto_defi_/Crypto_Autorun_Streamlit.py”, line 5, in

from matplotlib import pyplot as plt

Hi Randy,

Thanks. I try to test it on another dummy script using the same repository and it works.

The strange thing is if you look at both scripts (which are identical!). This work
https://share.streamlit.io/omerge123/crypto_defi_/main/testing.py
and this doesn’t work
https://share.streamlit.io/omerge123/crypto_defi_/main/Crypto_Autorun_Streamlit.py

I am happy as long as it is working.

Hi @Omerge84,

I had the same issue but when upgrading from version 1.3.1 to 1.5.0 everything started working again.

Best regards,
Nico

thanks. It works

1 Like