Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 3556

Beginners • Re: Python - No such file or directory

$
0
0
you are probably better off using an alternate name to call python 3.12.

These commands should hopefully get you back to a better state

cd /usr/bin
sudo ln -s /usr/bin/python3.8 python
sudo ln -s /usr/bin/python3.8 python3
sudo ln -s /usr/local/bin/python3.12 python312

That will allow you call the original python by invoking python and the newer version via python312. You can of course use different alias names but it's probably best to leave the provided version with the names python & python3.
Thanks. I have tried your suggestion.

The commands were accepted. However I still have the same error message issue of

Code:

pi@raspberrypi:~ $ python -vbash: /usr/local/bin/python3.8: No such file or directory
I thought the above command would assign the python version from 3.8 to 3.12.

This is the contents of my usr/local/bin directory:

Code:

pi@raspberrypi:/usr/local/bin $ dir2to3-3.12  idle3.12  pig2vcd  pigpiod  pigs  pip  pip3pip3.12  pip3.9  pydoc3.12  python  python3  python3.12  python3.12-config  virtualenv
This is the python only contents of my usr/bin directory:

Code:

pi@raspberrypi:/usr/local/bin $ dirpythonpython2   python2.7    python3  python3.12   python312  python3.9   python3.9-config  python3-config
Do you have any suggestions as to how to assign the python version 3.12?

Statistics: Posted by 6233114 — Sat Dec 16, 2023 9:46 pm



Viewing all articles
Browse latest Browse all 3556

Trending Articles