I’ve recently updated my Python version to 3.10 and Streamlit to 1.38.0, and I’m now experiencing performance issues with my Streamlit app. The app is taking significantly longer to perform calculations, and I’m seeing a large number of errors when running PyCharm code inspection. Additionally, my MacBook Pro’s temperature is spiking.
Before the update, my app was working smoothly and I successfully deployed my app on streamlit.io as a private app, but now I’m getting an “Error installing requirements” message.
Here’s my requirements.txt
file:
- matplotlib==3.5.3
- numpy==1.23.1
- pandas==1.4.3
- plotly==5.22.0
- scipy==1.9.0
- streamlit==1.38.0
I’m using a MacBook Pro with PyCharm as my IDE. Can anyone provide guidance on how to troubleshoot and resolve these performance issues and deployment error?
Environment:
- Python: 3.10
- Streamlit: 1.38.0
- MacBook Pro (with PyCharm as my IDE)
- Streamlit.io (private app deployment)
This is the last portion of the log where the error appeared:
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'error'
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [67 lines of output]
The Meson build system
Version: 0.62.2
Source dir: /tmp/pip-install-_mp31ie1/scipy_f424a4c7a54b4d25a06291970a654061
Build dir: /tmp/pip-install-_mp31ie1/scipy_f424a4c7a54b4d25a06291970a654061/.mesonpy-xxg4fjs8/build
Build type: native build
Project name: SciPy
Project version: 1.9.0
C compiler for the host machine: cc (gcc 10.2.1 "cc (Debian 10.2.1-6) 10.2.1 20210110")
C linker for the host machine: cc ld.bfd 2.35.2
C++ compiler for the host machine: c++ (gcc 10.2.1 "c++ (Debian 10.2.1-6) 10.2.1 20210110")
C++ linker for the host machine: c++ ld.bfd 2.35.2
Host machine cpu family: x86_64
Host machine cpu: x86_64
Compiler for C supports arguments -Wno-unused-but-set-variable: YES
Library m found: YES
../../meson.build:41:0: ERROR: Unknown compiler(s): [['gfortran'], ['flang'], ['nvfortran'], ['pgfortran'], ['ifort'], ['g95']]
The following exception(s) were encountered:
Running "gfortran --version" gave "[Errno 2] No such file or directory: 'gfortran'"
Running "gfortran -V" gave "[Errno 2] No such file or directory: 'gfortran'"
Running "flang --version" gave "[Errno 2] No such file or directory: 'flang'"
Running "flang -V" gave "[Errno 2] No such file or directory: 'flang'"
Running "nvfortran --version" gave "[Errno 2] No such file or directory: 'nvfortran'"
Running "nvfortran -V" gave "[Errno 2] No such file or directory: 'nvfortran'"
Running "pgfortran --version" gave "[Errno 2] No such file or directory: 'pgfortran'"
Running "pgfortran -V" gave "[Errno 2] No such file or directory: 'pgfortran'"
Running "ifort --version" gave "[Errno 2] No such file or directory: 'ifort'"
Running "ifort -V" gave "[Errno 2] No such file or directory: 'ifort'"
Running "g95 --version" gave "[Errno 2] No such file or directory: 'g95'"
Running "g95 -V" gave "[Errno 2] No such file or directory: 'g95'"
A full log can be found at /tmp/pip-install-_mp31ie1/scipy_f424a4c7a54b4d25a06291970a654061/.mesonpy-xxg4fjs8/build/meson-logs/meson-log.txt
+ meson setup --native-file=/tmp/pip-install-_mp31ie1/scipy_f424a4c7a54b4d25a06291970a654061/.mesonpy-native-file.ini -Ddebug=false -Doptimization=2 --prefix=/usr/local /tmp/pip-install-_mp31ie1/scipy_f424a4c7a54b4d25a06291970a654061 /tmp/pip-install-_mp31ie1/scipy_f424a4c7a54b4d25a06291970a654061/.mesonpy-xxg4fjs8/build
Traceback (most recent call last):
File "/home/adminuser/venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
main()
File "/home/adminuser/venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/adminuser/venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-59rt5d5b/overlay/lib/python3.11/site-packages/mesonpy/__init__.py", line 909, in get_requires_for_build_wheel
with _project(config_settings) as project:
File "/usr/local/lib/python3.11/contextlib.py", line 137, in __enter__
return next(self.gen)
^^^^^^^^^^^^^^
File "/tmp/pip-build-env-59rt5d5b/overlay/lib/python3.11/site-packages/mesonpy/__init__.py", line 888, in _project
with Project.with_temp_working_dir(
File "/usr/local/lib/python3.11/contextlib.py", line 137, in __enter__
return next(self.gen)
^^^^^^^^^^^^^^
File "/tmp/pip-build-env-59rt5d5b/overlay/lib/python3.11/site-packages/mesonpy/__init__.py", line 547, in with_temp_working_dir
yield cls(source_dir, tmpdir, build_dir)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-59rt5d5b/overlay/lib/python3.11/site-packages/mesonpy/__init__.py", line 463, in __init__
self._configure(reconfigure=bool(build_dir) and not native_file_mismatch)
File "/tmp/pip-build-env-59rt5d5b/overlay/lib/python3.11/site-packages/mesonpy/__init__.py", line 494, in _configure
self._meson(
File "/tmp/pip-build-env-59rt5d5b/overlay/lib/python3.11/site-packages/mesonpy/__init__.py", line 477, in _meson
return self._proc('meson', *args)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-59rt5d5b/overlay/lib/python3.11/site-packages/mesonpy/__init__.py", line 472, in _proc
subprocess.check_call(list(args))
File "/usr/local/lib/python3.11/subprocess.py", line 413, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['meson', 'setup', '--native-file=/tmp/pip-install-_mp31ie1/scipy_f424a4c7a54b4d25a06291970a654061/.mesonpy-native-file.ini', '-Ddebug=false', '-Doptimization=2', '--prefix=/usr/local', '/tmp/pip-install-_mp31ie1/scipy_f424a4c7a54b4d25a06291970a654061', '/tmp/pip-install-_mp31ie1/scipy_f424a4c7a54b4d25a06291970a654061/.mesonpy-xxg4fjs8/build']' returned non-zero exit status 1.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
[notice] A new release of pip is available: 24.0 -> 24.2
[notice] To update, run: pip install --upgrade pip
Checking if Streamlit is installed
────────────────────────────────────────────────────────────────────────────────────────
[15:41:50] ❗️ installer returned a non-zero exit code
[15:41:50] ❗️ Error during processing dependencies! Please fix the error and push an update, or try restarting the app.
[15:43:21] ❗️ Streamlit server consistently failed status checks
[15:43:21] ❗️ Please fix the errors, push an update to the git repo, or reboot the app.