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 Overflowpython - chown: cannot access '/var/lib/odoo': No such file or directory - Stack Overflow
c - "<Python.h> no such file or directory" - Stack Overflow
$ python -bash: /usr/local/bin/python: No such file or directory - Stack Overflow
python - no such file or directory - Stack Overflow
varscore_pipeline is a Python script. It begins with a shebang line that points to the interpreter that must execute the script. The path to the interpreter is usr/bin/python2.6, and this file doesn't exist.
First, that line is wrong. The shebang line must have an absolute path. Change #!usr/bin/python2.6 to #!/usr/bin/python2.6.
Depending on your version of Ubuntu, you may or may not have /usr/bin/python2.6. If you only have a later version such as 2.7, change the shebang line to #!/usr/bin/python2. It is highly unlikely that the program would work with 2.6 but not 2.7. Python 2.x versions are upward compatible. (But don't change to /usr/bin/python3, there are incompatibilities between Python 2 and Python 3.)
See /bin/sh: ./check-dependencies.pl: not found โ but check-dependencies.pl exists! for more explanations.
Check if the file in question does not have CRLF chars (visible as ^M in vi), that is, DOS-style line end char sequences. Sometimes they are not visible in various terminals/editors, while bash tries to run a script with interpreter like /bin/bash^M, which doesn't exist, hence the error.
It's not clear exactly what the context is, but you may just need to do:
sudo apt-get install libpython3.9-dev
If that doesn't work, do something like:
CPPFLAGS="${CPPFLAGS} -I $(dirname $(dpkg -L libpython3.9-dev | grep Python.h))"
And make sure you compile with the appropriate flags. That is, if you are building with gcc, use:
gcc $CPPFLAGS ...
- Find the the directory where
Python.hlives. - Add
-Ipathto your gcc command line.pathis the directory found in point 1. - Enjoy
Something seems to go haywire with Homebrew 1.7.2 and MacOS 10.13.6.
Even after removing all python versions and reinstalling, python --version simply won't work.
Most have probably already tried these steps...
brew uninstall --ignore-dependencies python
brew uninstall --ignore-dependencies python2
brew uninstall --ignore-dependencies python3
brew install python
brew unlink python && brew link python
brew unlink python3 && brew link python3
At the end what worked for me was...
sudo ln -s /usr/local/bin/python3 /usr/local/bin/python
And then again for pip...
sudo ln -s /usr/local/bin/pip3 /usr/local/bin/pip
I've got no idea what happened here, but I tried reinstalling yesterday...reinstalling this way (seemingly what I already did) today worked:
How to fix broken python 2.7.11 after OSx updates
When using Windows style pathnames (i.e., with \ as directory separator) it's import to specify such strings as raw. This is because a backslash might precede a character that would make the pair into a well-known escape character e.g., a, b, n, t, r, f, v
In the question we have:
image_path = "D:\python course\day 25 - introduction to pandas\guess the states game\blank_states_img.png"
...which contains \b and so the string is interpreted as:
D:\python course\day 25 - introduction to pandas\guess the states gamlank_states_img.png
To overcome this use a raw string prefix as follows:
image_path = r"D:\python course\day 25 - introduction to pandas\guess the states game\blank_states_img.png"
Most likely you typed your gif file name wrong. Maybe it is blank_states_img.gif instead of blank_state_img.gif (You forgot the 's') So, check for plurals and spelling mistakes. Good Luck! :)
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.
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