I am trying to teach myself how to code so I am Using the book Learn Python the Hard Way on my windows computer.
I downloaded Notepad++ and Python and my python.exe is understood by my computer, but I saved a Notepad++ file as .py and Powershell is saying that the file doesn't exist:
C:\Users\tmartinez6\python.exe: can't open file 'test1.py': [Errno 2] No such file or directory
How do I integrate my Notepad++ saved files such that when I try to run them in powershell they are found within my directory?
Related
I am trying to create an executable file which is using module python-docx.
The executable files is created but this error occurs when I run the executable file.
[Errno 2] No such file or directory: 'D:\Pycharm Projects\pydocx\dist\library.zip\docx\parts\..\templates\default-footer.xml'
The normal .py file which I am trying to convert into a .exe works perfectly fine.
Can anyone suggest how should I resolve this
Switched to pyinstaller and everything worked flawlessly.
I've been trying to convert a .py file to .exe which has some dependencies (.mp3 and .png files) that i've included while converting from .py to .exe with PyInstaller. The application runs completely fine on PyCharm and cmd venv,when activated. However when i try to run the .exe file i have this error: "Failed to execute script". I've tried everything on the internet but nothing seems to work
Apparently -w was causing a problem so i replaced it with -c and everything seems to be working normally now.
I had built a simple program with minimalistic code
Code
and converted it into a .exe file using command prompt after which it refused to boot after I opened the .exe file in Visual Studio after which it prompted this
and allowed it to fix some errors then I saw some changes in the program, But then when I tried to open it, This showed up
and so is there a way to make the program boot and run and do I need additional code to make the program run?
Easy-peasy solution.
Do pip install pyinstaller and then from run pyinstaller --onefile filename.py
I wrote a python script for a calculator and tried to convert my .py file to a .exe file. After converting to .exe file, I am getting error("Failed to execute script <Filename>").
The solutions i have tried:
I tried to run my python3.8 script using 3.6 script.
I tried converting my .png icon to .ico image.
I tried to convert my .py file .exe file using pyinstaller & auto-py-to-exe as well.
I am currently creating a python script that opens a chess engine, Stockfish, using python-chess, and chess.uci. However, when I try opening up the stockfish engine, I get
PermissionError: [Errno 13] Permission denied
So I looked more into this issue, and apparently, you cannot open directories or folders directly. However, looking into the documentation for opening a UCI engine for python-chess, the example shows opening what seems to be a directory under /usr/bin
The documentation is here: https://python-chess.readthedocs.io/en/v0.23.10/uci.html
Is there any other way to open an engine using UCI?
My OS system is Mac OS.
Ok, sorry, I'm late ^^
I've got the same problem few month ago.
First, on Mac, be sure your file is not a .exe file. It should be a Mac executable (i.e. if you double click on your file, it will open the Terminal).
If not, install Homebrew, and $ brew install stockfish.
Next find the Stockfish executable path in your Finder and open a new Terminal window for its folder emplacement. Paste $ chmod +x your_stockfish_exe_name and retry to open Stockfish with Python.