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

Ubuntu Update for Install #6

Open
AtesComp opened this issue Sep 17, 2023 · 0 comments
Open

Ubuntu Update for Install #6

AtesComp opened this issue Sep 17, 2023 · 0 comments

Comments

@AtesComp
Copy link

There are a few issues for newer Python3 installs...

FreeGLUT3 Lib

For Ubuntu, the freeglut3 library is not found in newer installs (lunar +). However, the older package was just loading the libglut libraries. See Kinetic FreeGLUT files

Also, freeglut3-dev loads the libglut libraries plus the freeglut3 dev files. See Kinetic FreeGLUT Dev files

So, I changed the apt install ... to omit the freeglut3 package and install libglut3.12 instead.

Python and Virtual Environments

The docs don't mention running Python in a venv. New Python3 installs insist on using a venv to run local python apps using pip3. However, system-wide installs augment local venvs.

Since .venv is in the .gitignore file, I assume this is a known issue.

Option 1: Run app in global space

To run the app without a venv, the items in the requirements.txt need to be instead loaded with apt install ...:

sudo apt install python3-wxgtk4.0 python3-serial python3-numpy python3-tornado python3-pint

Then, the app can be run directly:

python3 pyobd.py

Option2: Run app in local venv

In any particular directory (maybe $HOME for a general local user venv):

python -m venv .venv

Then, activate it:

source .venv/bin/activate

Now install all your goodies with pip in the venv. Also, wxpython and tornado use an older style install that will be deprecated. So, until they are fixed, the --use-pep517 option may need to be used. See pypa/pip#8559. On my test install, wxpython version 4.1.1 failed. I changed the requirements.txt to use the latest (removed version control) and added the dependent attrdict3 before it.

requirements.txt

attrdict3
wxpython
pyserial==3.5
numpy==1.23
tornado==3.2.1
pint
pip3 install --use-pep517 -r requirements.txt

Now, run the app, etc.

python3 pyobd.py

When done:

deactivate

To remove a venv, just delete the .venv diretory.

rm -r .venv
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

1 participant