Open nerdylist opened 4 months ago
yes that file contains openui
, I would just remove it and then pyenv won't complain and will use your default (see pyenv version
).
@nerdylist I struggled with the same when I tried to run it on Gitpod, since I'm not very used to python. Thanks @dacbd for your suggestion.
I solved it by creating a virtual python environment:
python -m venv openui
You can run that anywhere on your system (e.g. from your home directory). The virtual environment does not have to be in the project dir. On creation a new folder with the env name is created and some python deps are installed there.
To enable the virtual environment in your current terminal session, run this from the same directory, where you ran the command to create the venv.
source openui/bin/activate
After the venv is activated, you can navigate to your openui repo backend dir and run pip install .
To run the backend you also need to make sure you have the python venv activated (in case you eventually create a new terminal for this).
In my PR about Gitpod support, you can check out the script that's running the same on init to automate setup. https://github.com/wandb/openui/blob/c97527f378914d75c1c863b7d084214b84d64df4/.gitpod.yml#L10
Since I'm not a python pro there might be a more convenient or best practice way setting up the venv. I'd be happy for suggestions. 🙏
Nice, yep that works. Another option is to install pyenv and pyenv-virtualenv, then you can do something like:
pyenv virtualenv 3.12.0 openui
pyenv local openui
@vanpelt I cant seem to view any local changes I make on the frontend after I run pnpm run dev
(ran pnpm install
).
I'm I missing something on the dev setup side, I successfully ran the server and generated a component, however when i edit the frontend/public/annotator/index.html
file I cannot view any applied changes.
@vanpelt I am attempting to make the selected bounded box .selected
when clicked on the iframe responsive when you resize the iframe.
@dion-blutui this is a little tricky, if you make changes to annotator/index.html
you need to copy it over to the python server for those changes to be reflected, for example from the frontend
directory, you can run:
cp public/annotator/index.html ../backend/openui/dist/annotator/index.html
This file get's copied over when the production build is made, but during dev it's whatever the last version of it was.
@vanpelt Cool will work on a PR for responsive bounding boxes. I believe you can track the changing height and width with ResizeObserver and probably manage the scroll by manually appending to the top of the .selected
bounding box
Hello, I'm getting the following error when trying to run
pip install .
Any ideas?pyenv: version openui is not installed (set by /local/openui/backend/.python-version)
Thank you!