Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Solution for WSL2 execution on Ubuntu #15

Open
vazome opened this issue Dec 12, 2024 · 0 comments
Open

Solution for WSL2 execution on Ubuntu #15

vazome opened this issue Dec 12, 2024 · 0 comments

Comments

@vazome
Copy link

vazome commented Dec 12, 2024

If you try to deploy this codebase as it is in WSL2 Ubuntu 22.04/24.04 (python3.12) you will run into three issues:

  • distutils not being found
  • gio: http://localhost:8501: Operation not supported
  • Application trying to access duplicate dezoomcamp folder: FileNotFoundError: [Errno 2] No such file or directory: '/home/user2/github/de-zoomcamp-ui/dezoomcamp/dezoomcamp/DE_Zoomcamp.py'
  1. disutils is deprecated for later versions of python3, to fix this verify/install python3-setuptools via sudo apt install python3-setuptools
    then recreate your python3 environment, but use --system-site-packages in the end to allow env access to system packages such as setuptools

  2. gio error means that it cannot open the browser. We can fix this by installing wslu.

sudo add-apt-repository ppa:wslutilities/wslu
sudo apt update
sudo apt install wslu

If you think it's an overkill, maybe you can install wslview separately or play around with browser specific env variables in bashrc.

  1. FileNotFoundError, idk, I thought maybe venv placement is the cause, maybe it should be in dezoomcamp folder, but this is not the cause. Either way the solution is rather simple. Go to de-zoomcamp-ui and run it like this streamlit run dezoomcamp/DE_Zoomcamp.py
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant