I have the following error , please help

Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'error'
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [8 lines of output]
      Traceback (most recent call last):
        File "<string>", line 36, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-cpak2tho/ttkthemes_52454b6373324cc6bb5a089c530ad726/setup.py", line 7, in <module>
          from tkinter import TkVersion
        File "/usr/local/lib/python3.7/tkinter/__init__.py", line 36, in <module>
          import _tkinter # If this fails your Python may not be configured for Tk
      ImportError: libtk8.6.so: cannot open shared object file: No such file or directory
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
WARNING: You are using pip version 22.0.3; however, version 22.0.4 is available.
You should consider upgrading via the '/home/appuser/venv/bin/python -m pip install --upgrade pip' command.
[manager] installer returned a non-zero exit code
[manager] Error during processing dependencies! Please fix the error and push an update, or try restarting the app.
[manager] Streamlit server consistently failed status checks
[manager] Please fix the errors, push an update to the git repo, or reboot the app.
  • There is probably a binary dependency missing
  • However, this may won’t work anyway on Streamlit Cloud. What to you want to achieve with tkinter?

I am trying to open few files , display some dynamic contents based on the file, when I am using the local host , it didnt show any problem , but while deploying I am getting this error.

Afaik you cannot use Tkinter on Streamlit Cloud, because everything has to be done through the Browser.
You can’t use classic GUI libraries like Tkinter, PyQt, wxPython, etc.
It may work on your local computer, but will certainly fail on streamlit cloud.
If you share your public github repo link, we can have a look at.

1 Like

@Franky1 Is there any other option where we can deploy our tkinter python project?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.