Hie everyone. I recently did a fresh install of Garuda KDE Lite and everything was going well until they updated the system python from 3.8 to 3.9. With this new update University project code is no longer running because i cant install tensorflow on Python 3.9. Is there any way to downgrade the system python back to 3.8.
And yes i have tried using a virtual environment but OpenCV won't work well in the virtual environment and i dont know why but for some reason PyQT apps are ugly in the virtual environment.
Everything worked well using the system python.
My project is due Monday so I welcome all the help I can get.
Thank you for the assistance.
Use last working snapshot.
VM is not recommended.
unfortunately the only snapshots i have right now are the ones taken after the update so they all have python 3.9
Well, you can run both versions simultaneously. I did it on vanilla Arch or debian based, I can't remember exactly though
Try this
Snapshot is taken before update, use this or what @Naman say
Well, imo, if the project is limited to Monday, don't bother simultaneous versions, it is a bit tricky, just restore from snapshot, as said by @SGS
Else, if you want all other apps upto date, then use above method.
Or fresh install and do not update
Cant you just create a virtualenv with the packages you want?
Also, you can with conda if you want more specialized packages
AFAIK, pyenv
and conda
are able to manage different Python versions (e.g. 3.8 vs. 3.9); virtualenv
and the successor pipenv
just use the Python they found (in this case, v3.9 instead of v3.8) to build the local runtime environment. Reference on a Medium post
Could you try pyenv
to install and use Python 3.8, and then rebuild the virtual environment?
Install Anaconda and make a new virtual env for python 3.8 and if venv didn't work then use anaconda default python 3.8.5...
Downgrade to 3.8 with downgrade
? Will that bork Garuda, @librewish?
Most likely as all updated packages are compiled against 3.9 now
Try setting up a conda environment with the required dependencies for tensorflow, a conda environment is independent of whatever is the python version of the system. After installing conda(if not installed previously) use conda env -n <your environment name> python=3.7
(3.7 is th latest version supported by tensorflow 2.0 right now). After setting up the environment activate it using conda activate <your env name>
then using pip install the required dependencies including tensorflow and opencv( opencv works fine in a conda environment). And you are good to go .
Hope you have the required cuda and cudnn packages installed(if you need GPU support).
Yes. Please don’t downgrade python
!
Well, duh, I musta been asleep...again.
Thanks, @dr460nf1r3 & @jonathon. The only problems I've experienced with python was when there was a need to run multiple versions in CentOS. (and re-linking) I used this tool, which is available in Arch, here. @sosiristseng has also recommended it.
Here, also is an updated guide, though it applies to CentOS, but it might be helpful.
regards
This is a really interesting thread. Soon, I will begin the same process of developing a Python programming set up. Nice to know there are some folks with experience with Python.
Well, if you really want to learn Python, here is an advice.
Never start straight from a project. Neither start from yt / stack overflow.
Though it may seem interesting in beginning, you will not learn much. And will most probably loose interest in development
What I would suggest is taking complete online course. Most of time, they are not free, but imo, they are worth it, between USD 5 and USD 20. You can easily find Python courses in that range, grab any good course.
Well I remembered my mistake .
13 posts were split to a new topic: Running OpenCV in a Python venv
And never ask a spouse for help.
Could someone split this Python topic off the original post here. I asked the question because I kind of new the answer. One of my goals is to get all of this stuff to work, hooked up together, and deploy it in much the same way as Garuda is doing with Gaming.
gary