Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Error on 'pip install .' #103

Open
nerdylist opened this issue May 11, 2024 · 3 comments
Open

Error on 'pip install .' #103

nerdylist opened this issue May 11, 2024 · 3 comments

Comments

@nerdylist
Copy link

nerdylist commented May 11, 2024

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!

@dacbd
Copy link

dacbd commented May 11, 2024

yes that file contains openui, I would just remove it and then pyenv won't complain and will use your default (see pyenv version).

@davemecha
Copy link
Contributor

@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.

python -m venv openui

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. 🙏

@vanpelt
Copy link
Contributor

vanpelt commented May 15, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants