Windows: Can encounter permission denied from PATH elements when scanning dependencies
See original GitHub issue-
Nuitka version, full Python version, flavor, OS, etc. as output by this command (it does more than you think, and we are adding more all the time):
python -m nuitka --version 0.7 Commercial: None Python: 3.9.6 (tags/v3.9.6:db3ff76, Jun 28 2021, 15:26:21) [MSC v.1929 64 bit (AMD64)] Flavor: Unknown Executable: C:\Users\rauln\Desktop\vsm\venv\Scripts\python.exe OS: Windows Arch: x86_64 WindowsRelease: 10
-
How did you install Nuitka and Python
pip install nuitka
within virtualenv
- The specific PyPI names and versions
Nuitka==0.7
-
Many times when you get an error from Nuitka, your setup may be special
print("hello world")
fails, too, if ‘–onefile’ is provided. If not, it seems to work, so probably my setup is wrong, but as far as I know I did everything correctly and I even left to Nuitka to install the C toolchain, too. -
Also supply a Short, Self Contained, Correct, Example
That demonstrates the issue i.e a small piece of code which reproduces the issue and can be run with out any other (or as few as possible) external dependencies. Issues without this may get rejected without much consideration.
-
Provide in your issue the Nuitka options used
I just used --onefile
, and that seems to be the cause of the error. --follow-imports
works, too, but --onefile
generates the error below.
- The resulting error
Detecting used DLLs: 0%| | 0/18Traceback (most recent call last):
File "C:\Users\rauln\Desktop\vsm\venv\lib\site-packages\nuitka\__main__.py", line 137, in <module>
main()
File "C:\Users\rauln\Desktop\vsm\venv\lib\site-packages\nuitka\__main__.py", line 123, in main
MainControl.main()
File "C:\Users\rauln\Desktop\vsm\venv\lib\site-packages\nuitka\MainControl.py", line 963, in main
copyDllsUsed(
File "C:\Users\rauln\Desktop\vsm\venv\lib\site-packages\nuitka\freezer\Standalone.py", line 1371, in copyDllsUsed
used_dlls = _detectUsedDLLs(
File "C:\Users\rauln\Desktop\vsm\venv\lib\site-packages\nuitka\freezer\Standalone.py", line 1143, in _detectUsedDLLs
worker_pool.submit(
File "C:\Users\rauln\Desktop\vsm\venv\lib\site-packages\nuitka\utils\ThreadedExecutor.py", line 45, in submit
self.results.append(function(*args))
File "C:\Users\rauln\Desktop\vsm\venv\lib\site-packages\nuitka\freezer\Standalone.py", line 1103, in addDLLInfo
used_dlls = _detectBinaryDLLs(
File "C:\Users\rauln\Desktop\vsm\venv\lib\site-packages\nuitka\freezer\Standalone.py", line 1070, in _detectBinaryDLLs
return detectBinaryPathDLLsWindowsDependencyWalker(
File "C:\Users\rauln\Desktop\vsm\venv\lib\site-packages\nuitka\freezer\Standalone.py", line 1033, in detectBinaryPathDLLsWindowsDependencyWalker
result = detectDLLsWithDependencyWalker(binary_filename, scan_dirs)
File "C:\Users\rauln\Desktop\vsm\venv\lib\site-packages\nuitka\freezer\DependsExe.py", line 152, in detectDLLsWithDependencyWalker
"scan_dirs": "\n".join(
File "C:\Users\rauln\Desktop\vsm\venv\lib\site-packages\nuitka\freezer\DependsExe.py", line 153, in <genexpr>
"UserDir %s" % getExternalUsePath(dirname) for dirname in scan_dirs
File "C:\Users\rauln\Desktop\vsm\venv\lib\site-packages\nuitka\utils\FileOperations.py", line 759, in getExternalUsePath
filename = getWindowsShortPathName(filename)
File "C:\Users\rauln\Desktop\vsm\venv\lib\site-packages\nuitka\utils\FileOperations.py", line 724, in getWindowsShortPathName
raise WindowsError(
OSError: [Errno 5] Acceso denegado.
The error is caused when running getWindowsShortPathName
on path C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.11.3471.0_x64__8wekyb3d8bbwe
, don’t know why.
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (4 by maintainers)
Top GitHub Comments
thanks for the kind words, but obviously Nuitka has to cope with these things, and thanks for reporting it. It’s part of the 0.7.1 hotfix I just made.
I don’t have any social network (not my thing 🤷🏼♂️ but I’ll make sure to recommend it to other developers I know and if I make commercial use of it I’ll make sure the company I do the work for hires commercial support from you.
In this case I was testing different solutions to produce executable files just in case I need such a tool in the future, so in fact I won’t be using any tool after testing for quite a long period. Right now I’m using PyInstaller for one of my project but it is a requisite, not my decision, so…