Comments (26)
Do you have a file api-ms-win-crt-*.dll
anywhere on your system?
from fbs-tutorial.
(And in particular api-ms-win-crt-multibyte-l1-1-0.dll
.)
from fbs-tutorial.
yes multiple versions of it ... but not in system32 ... I even put a copy there and it still fails with the same error... very strange
from fbs-tutorial.
It still fails with FileNotFoundError: ...api-ms-win-crt-multibyte-l1-1-0.dll
even after you put the file there?
from fbs-tutorial.
And where - in which paths - are your versions / copies of the file please?
from fbs-tutorial.
from fbs-tutorial.
from fbs-tutorial.
Very strange... And when you do
python
and then
from shutil import copy
copy(r'c:\Windows\System32\api-ms-win-crt-multibyte-l1-1-0.dll', r'C:\Users\titusz\Code\fbstest')
?
from fbs-tutorial.
And maybe when you run the command prompts as Administrator?
from fbs-tutorial.
This is weird... yes it also fails ... even with admin console:
even copy pasted the dll filename from explorer to make sure there are no typos.
I also tried other files from System32 folder ... also not able to copy ...
Maybe because python is installed to nonstandard C:\Python35\ path ... I do a reinstall
from fbs-tutorial.
Did a reinstall of Python 3.5.4 32-bit... now it fails with: FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\titusz\\Code\\Envs\\fbstest\\Scripts\\python3.dll'
There is only a python35.dll in that folder for my fresh installation.
from fbs-tutorial.
Do you have a full stack trace?
from fbs-tutorial.
Traceback (most recent call last):
File "C:\Users\titusz\AppData\Local\Programs\Python\Python35-32\Lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "C:\Users\titusz\AppData\Local\Programs\Python\Python35-32\Lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\titusz\Code\Envs\fbstest\lib\site-packages\fbs\__main__.py", line 4, in <module>
main()
File "C:\Users\titusz\Code\Envs\fbstest\lib\site-packages\fbs\cmdline.py", line 17, in main
args.cmd()
File "C:\Users\titusz\Code\Envs\fbstest\lib\site-packages\fbs\builtin_commands.py", line 35, in freeze
freeze_windows()
File "C:\Users\titusz\Code\Envs\fbstest\lib\site-packages\fbs\freeze\windows.py", line 27, in freeze_windows
copy(join(dirname(sys.executable), dll_name), path('${freeze_dir}'))
File "C:\Users\titusz\Code\Envs\fbstest\lib\shutil.py", line 241, in copy
copyfile(src, dst, follow_symlinks=follow_symlinks)
copyfile(src, dst, follow_symlinks=follow_symlinks)
File "C:\Users\titusz\Code\Envs\fbstest\lib\shutil.py", line 120, in copyfile
with open(src, 'rb') as fsrc:
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\titusz\\Code\\Envs\\fbstest\\Scripts\\python3.dll'
from fbs-tutorial.
Are you using the default Python from python.org or something else like Anaconda?
from fbs-tutorial.
Default python from your tutorial link ... the 32-bit installer
from fbs-tutorial.
Does it work when you delete the lines
python_dlls = (
'python%s.dll' % sys.version_info.major,
'python%s%s.dll' % (sys.version_info.major, sys.version_info.minor)
)
for dll_name in python_dlls:
remove(path('${freeze_dir}/' + dll_name))
copy(join(dirname(sys.executable), dll_name), path('${freeze_dir}'))
in C:\Users\titusz\Code\Envs\fbstest\lib\site-packages\fbs\freeze\windows.py
?
from fbs-tutorial.
Yes i am back to the FileNotFoundError: [Errno 2] No such file or directory: 'c:\\Windows\\System32\\api-ms-win-crt-multibyte-l1-1-0.dll
. I can copy some of the files from System32 via python... but not all. Must be some permission thing.
from fbs-tutorial.
I got the freeze working, by removing the code as you suggested and adding C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x86
to the path
. This helped. Should we close this issue or is this something that should be mentioned in the tutorial. I like the idea of "cross-platform desktop apps in minutes, not months" very much :)
from fbs-tutorial.
Glad you like it :-) I'll update fbs so it handles this case better, or tells the user install the Windows 10 SDK.
One thing that I'd still need your help with please: You got a FileNotFoundError: python3.dll
. But you do get a python3.dll
in target\Tutorial
after python -m fbs freeze
right? Where else on your system do you have python3.dll
?
from fbs-tutorial.
Yes with the deleted lines as suggested I get a python3.dll
. My venv/Scripts
folder does only have python35.dll
and no python3.dll
. The venv
was created via PyCharm (if that matters). The python3.dll
that ends up in the freeze is from the python base installation: c:\Users\username\AppData\Local\Programs\Python\Python35-32\python3.dll
from fbs-tutorial.
Okay. I just released a new version of fbs and the tutorial that should help with the issue you encountered:
- It searches more locations for
python3.dll
to (hopefully) avoid theFileNotFoundError
. - If
api-ms-win-crt-*.dll
can't be found, it gives a helpful error message along the lines of the link you posted.
Could I ask you to test this @titusz?
- Download the latest version of the tutorial.
- Use PyCharm as before to create the virtual environment and install the requirements.
- Run
python -m fbs freeze
.
Hopefully it should be more helpful now. Please do let me know!
Thanks,
M
from fbs-tutorial.
Just ran a test and I can confirm that the new version works fine. 👍
from fbs-tutorial.
Great, thanks!
from fbs-tutorial.
I am getting this error even after installing the SDK. Have run fbs freeze
in both powershell and administrator command prompt and still getting this error. Full stack trace:
Traceback (most recent call last):
File "C:\Python37\Scripts\fbs-script.py", line 11, in <module> load_entry_point('fbs==0.9.0', 'console_scripts', 'fbs')()
File "c:\python37\lib\site-packages\fbs\__main__.py", line 17, in _main fbs.cmdline.main()
File "c:\python37\lib\site-packages\fbs\cmdline.py", line 32, in main fn(*args)
File "c:\python37\lib\site-packages\fbs\builtin_commands\__init__.py", line 120, in freeze freeze_windows(debug=debug)
File "c:\python37\lib\site-packages\fbs\freeze\windows.py", line 22, in freeze_windows _add_missing_dlls()
File "c:\python37\lib\site-packages\fbs\freeze\windows.py", line 71, in _add_missing_dlls ) from None
FileNotFoundError: Could not find api-ms-win-crt-multibyte-l1-1-0.dll on your PATH. If you are on Windows 10, you may have to install the Windows 10 SDK from https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk. Otherwise, try installing KB2999226 from https://support.microsoft.com/en-us/kb/2999226. In both cases, add the directory containing api-ms-win-crt-multibyte-l1-1-0.dll to your PATH environment variable afterwards. If there are 32 and 64 bit versions of the DLL, use the 64 bit one (because that's the bitness of your current Python interpreter).
SOLVED: Added to User PATH environment variable (NOTE: System Environment PATH already contained necessary key value when this error occurred)
from fbs-tutorial.
Which Python version are you using? And which Python versions does fbs support?
from fbs-tutorial.
Which Python version are you using? And which Python versions does fbs support?
Hi Michael! Yes this issue was later identified after solving this one and the executable would not run. fbs freeze
runs (the command itself) successfully regardless of the Python version. While the generated output in the target folder does not work due to the versioning as you said, this is not the underlying cause of this issue. I have updated with a "solved" at the bottom for anyone who might come across this post. My Windows permissions are layered across many aspects and so it is easy to forget the necessity behind the separation of the users environment variables and the systems. For most general Windows users, this will never happen.
from fbs-tutorial.
Related Issues (20)
- Frozen App Crushes: No module named 'fbs_runtime' & images not included during fbs run & .ini QSettings dead
- KeyError: 'public_settings'
- Your App's Bundle ID is Empty HOT 5
- Your Bundle ID is Empty - FBS startproject error HOT 1
- raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['pyinstaller', HOT 1
- readme.md // download link outdated HOT 1
- Problem with Tensorflow and PyTorch packaging with FBS HOT 1
- Looks like work fine with python3.7 HOT 2
- FBS Freeze fail on Windows with Python3.8 HOT 1
- PyQt 5.9.2 appears broken HOT 3
- fbs installer failed on mac HOT 1
- fbs freeze failed HOT 3
- conda env can not find the 'makensis' HOT 1
- Failed to freeze HOT 1
- fpm Insall Link Broken HOT 1
- pyside6 HOT 2
- fbs freeze generated the wrong executable on windows HOT 6
- Problem with Oracledb and PyQt5 packaging with FBS
- fbs freeze got error: UnicodeDecodeError: 'gbk' codec can't decode byte 0xa8 in position 328: illegal multibyte sequence
- fbs run “Could not find the Qt platform plugin "xcb" in ""
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fbs-tutorial.