Just create the folder /var/lib/odoo and your problem should be solved.

sudo mkdir /var/lib/odoo
Answer from RED_MOOD RED_MOOD on Stack Overflow
๐ŸŒ
FedoraForum.org
forums.fedoraforum.org โ€บ showthread.php
[SOLVED] Unable to use alternatives to manage python versions
$ ls -l /etc/alternatives/python* ls: cannot access '/etc/alternatives/python*': No such file or directory This is so frustrating! I have spent a good while trying to manually delete the infamous inaccessible symbolic link . But I can't even find it. ... After some kinds of errors, alternatives will have trouble recovering. Use the direct approach and remove the python related files/links you think are broken from under /etc/alternatives/ and under /var/lib/alternatives/ but not via the alternatives command itself but with "rm" command (what I meant by direct) Your last CODE box in post 10 suggests your /etc/alternatives/ folder is clean of python stuff, but /var/lib/alternatives/ might have something that should be removed
๐ŸŒ
Greenbone Community Forum
forum.greenbone.net โ€บ getting started
Installing greenbone on fedora38 - Getting Started - Greenbone Community Forum
November 21, 2023 - ##################################### cannot access /var/lib/alternatives/python: No such file or directory /proc/sys/net/core/somaxconn = 1024 /proc/sys/vm/overcommit_memory = 1 Update NVT, CERT, and SCAP data Please note this step could take ...
Discussions

python - chown: cannot access '/var/lib/odoo': No such file or directory - Stack Overflow
I want to install odoo 14 on ubuntu 20.04.2, everytime I want to install odoo's dependencies this error comes up: chown: cannot access '/var/lib/odoo': No such file or directory dpkg: error proces... More on stackoverflow.com
๐ŸŒ stackoverflow.com
c - "<Python.h> no such file or directory" - Stack Overflow
I am trying to use the header file but I cannot get it to be found. I am using ubuntu 20.04. I have seen many similar questions on stack overflow but none solve my problem. I have ... More on stackoverflow.com
๐ŸŒ stackoverflow.com
$ python -bash: /usr/local/bin/python: No such file or directory - Stack Overflow
Python is broken somehow after running a script that rewrites files. I get the error anytime I use it: $ python -bash: /usr/local/bin/python: No such file or directory I did brew doctor: $ brew u... More on stackoverflow.com
๐ŸŒ stackoverflow.com
python - no such file or directory - Stack Overflow
I am basically trying to make a game where the user can guess the name of an american state, and if it exists, the name will get written on the outline of that state. This is the game I am trying t... More on stackoverflow.com
๐ŸŒ stackoverflow.com
๐ŸŒ
Red Hat
bugzilla.redhat.com โ€บ show_bug.cgi
1711171 โ€“ `alternatives --set python /usr/bin/python2` fails with ecode 2 and no explanation on stderr
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red ...
๐ŸŒ
Raspberry Pi Forums
forums.raspberrypi.com โ€บ board index โ€บ using the raspberry pi โ€บ beginners
Python - No such file or directory - Raspberry Pi Forums
Also verify it's link cd /usr/bin ls -l python ls -l python3 pi@RaspberryPi:/usr/bin $ ls -l python lrwxrwxrwx 1 root root 7 Jan 8 2023 python -> python3 cd /usr/bin sudo rm python sudo ln -s /usr/bin/python3.8 python python --version python3 --version Also the intent in my reply was to ensure you could use "python" to access the ORIGINAL 3.8 level as you may find a number of system components use python. It's highly recommended to use an alternate name for newer levels you personally install.
๐ŸŒ
DEV Community
dev.to โ€บ emilossola โ€บ python-environment-error-no-such-file-or-directory-3j3o
Python Environment Error: No Such File or Directory - DEV Community
July 5, 2023 - Double-checking the path and making ... python: no such file or directory" occurs when the Python interpreter cannot find the specified file or directory that the code is trying to access....
๐ŸŒ
My Cyber Universe
mycyberuniverse.com โ€บ how-fix-python-no-such-file-or-directory.html
How to fix: โ€˜pythonโ€™: No such file or directory | My Cyber Universe
August 6, 2020 - $ youtube-dl http://youtube.com/... /usr/bin/env: โ€˜pythonโ€™: No such file or directory ยท The error message above is self explanatory. It saying that the system cannot find the python binary file.
Find elsewhere
๐ŸŒ
DigitalOcean
digitalocean.com โ€บ community โ€บ tutorials โ€บ how-to-fix-python-no-such-file-or-directory-compiler-errors-when-installing-packages
How to Fix Python `No such file or directory` Compiler Errors When Installing Packages | DigitalOcean
October 4, 2022 - If you already have a working version of open-source gcc and make build tooling installed in your Windows environment using MinGW or Chocolatey, you can tell Python to use this compiler on Windows instead, by creating a file at Lib/distutils/distutils.cfg relative to your Python install path and adding the following contents:
๐ŸŒ
Jam
jam.dev โ€บ blog โ€บ python-fatal-error-python-h-no-such-file-or-directory
Fixing Fatal Error: python.h: No Such File or Directory | Easy Solutions
October 3, 2024 - Steps to resolve "Fatal error: python.h: no such file or directory" issue. Here are easy solutions to fix this Python error.
๐ŸŒ
Ask Ubuntu
askubuntu.com โ€บ questions โ€บ 1218457 โ€บ how-do-i-fix-usr-bin-python-no-such-file-or-directory-when-entering-an-inval
How do I fix "/usr/bin/python: No such file or directory" when entering an invalid command in bash? - Ask Ubuntu
March 19, 2020 - # if the command-not-found package is installed, use it if [ -x /usr/lib/command-not-found ]; then function command_not_found_handle { # check because c-n-f could've been removed in the meantime if [ -x /usr/lib/command-not-found ]; then /usr/bin/python /usr/lib/command-not-found -- $1 return $? else return 127 fi } fi
๐ŸŒ
Red Hat
bugzilla.redhat.com โ€บ show_bug.cgi
1576924 โ€“ [Errno 2] No such file or directory: '/usr/local/lib/python3.6/site-packages
January 11, 2019 - Red Hat Bugzilla โ€“ Bug 1576924 ยท This site requires JavaScript to be enabled to function correctly, please enable it ยท Privacy Contact FAQ Legal
Top answer
1 of 2
20

You don't have to put your python codes in a global path. Just make your python 3.4 interpreter interpreter available globally. For that, edit .bash_profile or .bashrc file in your home directory and add the following line:

export PATH=${PATH}:/usr/bin/python3

That will make python3 executable irrespective of your current working directory. In order to execute code from your codes directory, you just have to write:

$ python3 ./your_code.py

Another way is to add the shebang at the top of your code as

#/usr/bin/python3

and change the permission to executable by the current user (by default it will not have execute permission).

$ chmod 744 your_code.py

and then executing the script directly as

$ your_code.py

I hope I could address your problem.

2 of 2
0

Another way to do it is to use python-is-python2 or python-is-python3 debian packages with /usr/bin/env python sheabang.

This option will let the end user select which interpreter he want to use while maintaining your code versionless and avoiding some people to install unwanted interpreter versions.

As an example, run this commands to make a sample file:

cat << EOF > version.py && chmod +x version.py
#!/usr/bin/env python
import sys
print(sys.version)
EOF

And run the following command if you want to set python2 as default:

sudo apt install python-is-python2

Or run this command if you want to set python3 as default:

sudo apt install python-is-python3

Finally you could see the python interpreter version that you have been selected by running:

./version.py

The only drawback of this solution is that you could make your python scripts compatible across python interpreter versions, but thats your decision!

You can install which you want and change from python2 to python3 and vice- versa as you want, but the idea is to fix a python interpreter version in a system and not change it again unless definitive upgrade.

References:
https://askubuntu.com/questions/1296790/python-is-python3-package-in-ubuntu-20-04-what-is-it-and-what-does-it-actually

๐ŸŒ
Linux Mint Forums
forums.linuxmint.com โ€บ board index โ€บ main edition support โ€บ software & applications
Python3 - No such file or directory[SOLVED] - Linux Mint Forums
February 5, 2024 - Coggy wrote: Mon Feb 05, 2024 3:53 pm Try both of these: python --version and python3 --version They may give different answers - python might launch python2 instead. the both return the same message: python3: can't open file '/home/user/โ€“version': [Errno 2] No such file or directory and ...
๐ŸŒ
Python.org
discuss.python.org โ€บ python help
Getting passed env: python No such file or directory - Python Help - Discussions on Python.org
January 22, 2024 - I use python as rather than perl or shell script. I just installed FreeBSD 13.2, the same (or so I thought) as my base system.