FileNotFoundError: [Errno 2] No such file or directory: code example
Example 1: Python.h: No such file or directory
For apt (Ubuntu, Debian...):
sudo apt-get install python-dev # for python2.x installs
sudo apt-get install python3-dev # for python3.x installs
For yum (CentOS, RHEL...):
sudo yum install python-devel # for python2.x installs
sudo yum install python3-devel # for python3.x installs
For dnf (Fedora...):
sudo dnf install python2-devel # for python2.x installs
sudo dnf install python3-devel # for python3.x installs
For zypper (openSUSE...):
sudo zypper in python-devel # for python2.x installs
sudo zypper in python3-devel # for python3.x installs
For apk (Alpine...):
# This is a departure from the normal Alpine naming
# scheme, which uses py2- and py3- prefixes
sudo apk add python2-dev # for python2.x installs
sudo apk add python3-dev # for python3.x installs
For apt-cyg (Cygwin...):
apt-cyg install python-devel # for python2.x installs
apt-cyg install python3-devel # for python3.x installs
Example 2: Python.h: No such file or directory
sudo apt-get install python-dev # for python2.x installs
sudo apt-get install python3-dev # for python3.x installs
Example 3: FileNotFoundError: [Errno 2] No such file or directory: while os.mkdir*(
os.makedirs(ssh_path)
Example 4: FileNotFoundError: No such file or directory.
when i had that problem
I just put my file in the same folder as
my python script and it worked out.
if it doesn't work for you make sure the file exists or is called that exact word.
if it still doesn't work for you check if the file is in the directory of python.
you might be wondering what the frik is a directory but in this topic I
can't help you because i also don't understand the frik about directory
Example 5: ERROR: [Errno 2] No such file or directory: 'install'
$ curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
$ echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
$ sudo apt update && sudo apt install yarn