Error loading python dll loadlibrary pyinstaller formatmessagew failed

I compiled my .py file running following commands: pyinstaller myfile.py --onefile. When i run it on my pc(Windows 10) everything works just fine. When i try to run it on my `virtual machine(Wi...

I compiled my .py file running following commands:

pyinstaller myfile.py --onefile.

When i run it on my pc(Windows 10) everything works just fine.

When i try to run it on my `virtual machine(Windows 8).

I get the following error:

Error loading Python DLL
‘C:UsersMyUsernameAppdataLocalTempNUMBERSpython36.dll’
LoadLibrary: PyInstaller: FormatMessageW failed.

I already googled the error and i found many solutions but none of them worked..

//UPDATE:
If i compile it with my virtual machine, everything runs fine on the virtual machine, main pc and even on my windows server.. strange.. so it must be a problem with my main pc.

Kind Regards

asked Jan 16, 2019 at 10:03

OperationJynx's user avatar

OperationJynxOperationJynx

1212 gold badges2 silver badges7 bronze badges

I had a similar problem trying to run a python-based program (aws cli) and getting the «Error loading Python DLL … LoadLibrary: The specified module could not be found.» on Windows Server 2008 R2.

I solved this issue by installing the Visual C++ Redistributable for Visual Studio 2015 run-time components. https://www.microsoft.com/en-us/download/confirmation.aspx?id=48145

Hope it helps!

answered Mar 5, 2020 at 16:45

José Gil Ramírez's user avatar

José Gil RamírezJosé Gil Ramírez

2,3811 gold badge12 silver badges7 bronze badges

You can use auto-py-to-exe instead:

python -m pip install auto-py-to-exe

And then wait for it to download and then write in then cmd (or terminal):

auto-py-to-exe

A screen will appear:

enter image description here

And just make as I made in the screenshot, then press «convert .py to .exe» and then press «show output folder».

Jack Deeth's user avatar

Jack Deeth

3,0022 gold badges22 silver badges35 bronze badges

answered Apr 18, 2021 at 17:13

Ali Saad's user avatar

1

This also happens when you read the .exe file located in build.

You need to run the exe located in dist folder.

If the error persists even on dist folder .exe , check the exact version of python, download python dll from internet for that exact version, in keep in the folder suggested by the error message (path where this dll is missing).

answered Apr 26, 2022 at 15:38

Shrashti's user avatar

Try to download a 32 bit version of python36.dll (or 64 if you tried 32)

That fixed the problem for me

answered Dec 4, 2022 at 16:53

Matan Dobrushin's user avatar

@Avnsx

Description of the issue

Executables compiled on windows 10 with pyinstaller are not able to be ran on Windows 7. I think this is a huge issue, because I personally use pyinstaller to fix the need for users to have python installed, when using my open source projects. A still remarkable amount of users are on Windows 7 and this really takes the entire sense behind the story of compiling python code to executables. The only solution that works for me is compiling with python 3.8.10 (which is compatible with both versions of Windows), else I keep running into this error.

Context information (for bug reports)

  • Pyinstaller Version: 5.1
  • Version of Python: 3.10.4
  • Platform: Windows 10, Windows 7
  • How you installed Python: python.org/downloads
  • Did you also try this on another platform? Does it work there? Compiled on Windows 10, ran on Windows 7 doesn’t work there but works on windows 10.

A minimal example program which shows the error

You can literally compile any code with pyinstaller on windows 10 with python 3.10.4 and try to run that compiled executable on windows 7; it’ll always result in the same exact error.

Stacktrace / full error message

Error loading Python DLL appdatalocaltemp_mei17882python310.dll
No error messages generated.
FormatMessageW: The parameter is incorrect.
LoadLibrary: Pyinstaller: FormatMessageW failed.

This issue has also been pointed out before in #3999 but was falsely closed, because the contributor or maintainer at the time thought it would only be related to wine.

@Avnsx
Avnsx

added
the

triage

Please triage and relabel this issue

label

May 21, 2022

@Legorooj

We don’t support windows 7. The only versions we support are 8, 10, and 11.

If you’d like to support windows 7, iirc you’ll need to build on windows 7. PyInstaller should still be compatible even if it doesn’t officially support win7.

@bwoodsend

And the latest version of Python to support Windows 7 or 8.0 was Python 3.8 so by using Python 3.10 you’ve already broken it.

@Avnsx

We don’t support windows 7. The only versions we support are 8, 10, and 11.

If you’d like to support windows 7, iirc you’ll need to build on windows 7. PyInstaller should still be compatible even if it doesn’t officially support win7.

Well according to #3999 (comment) this also happens on Windows 10 and windows 8

@rokm

Well according to #3999 (comment) this also happens on Windows 10 and windows 8

That comment is related to original report on using wine to cross-compile application for Windows, though. And the report was made against python 3.4 that’s EOL’d now. And before we started preventing wine DLLs from being collected, which I suspect was the cause of the original issue.

But none of that matters in your case, which is much more straightforward — if you’re trying to use python >= 3.9 on Windows 7, it won’t work. Python.org download page states as much, for example: Note that Python 3.9.13 cannot be used on Windows 7 or earlier. And by extension, PyInstaller-frozen application won’t work either, because the collected python shared library won’t load on Windows 7.

@bwoodsend

But that particular user was using Wine so they’ll have been picking up Wine’s shim libraries instead of the proper MSVC runtime DLLs. There is someone on that thread who wasn’t using Wine but was using Python 3.9 which is incompatible with Windows 7.

@github-actions
github-actions
bot

locked as resolved and limited conversation to collaborators

Nov 16, 2022

Fix Python DLL error by using administrative privileges

by Tashreef Shareef

Tashreef Shareef is a software developer turned tech writer. He discovered his interest in technology after reading a tech magazine accidentally. Now he writes about everything tech from… read more


Updated on November 10, 2022

Reviewed by
Alex Serban

Alex Serban

After moving away from the corporate work-style, Alex has found rewards in a lifestyle of constant analysis, team coordination and pestering his colleagues. Holding an MCSA Windows Server… read more

  • If you’re getting an Error loading Python DLL, make sure you’re using the right directory.
  • Lack of administrative privileges can often cause this problem to appear.

XINSTALL BY CLICKING THE DOWNLOAD FILE

To fix errors caused by DLLs, we recommend Restoro:This software will replace the broken or corrupted DLLs with their working versions from a dedicated database where the tool has the official DLL files. The tools will also keep you away from hardware failure and malware damage. Fix PC issues and remove virus damage now in 3 easy steps:

  1. Download Restoro PC Repair Tool that comes with Patented Technologies (patent available here).
  2. Click Start Scan to find DLL files that could be causing PC problems.
  3. Click Repair All to replace broken DLLs with working versions
  • Restoro has been downloaded by 0 readers this month.

Python is a great programming language, but error loading Python DLL on their PC. This problem can lead to other issues, such as Python runtime error for example.

If you are also troubled by this error, here are a couple of troubleshooting tips to help you resolve this issue once and for all.

Why does the error loading Python DLL appear?

There are multiple reasons for this issue, but the following are the most common ones:

  • User error – Sometimes not running the proper file or not having your script configured properly can lead to DLL errors. This can also lead to PIP not recognized and other errors.
  • Lack of administrative privileges – If you don’t use administrative rights while running Python commands, sometimes you might encounter this error. You can do that by using administrator account.
  • Version incompatibility – Older versions of Python aren’t always compatible with scripts made using the latest version, which results in this error.

How can I fix the error loading Python DLL?

Before we start fixing this problem, there are a couple of quick checks that you need to perform:

  • Use the correct directory – Many users reported this issue because they used build instead of dist directory. Not using correct directory can lead to The specified module could not be found and other problems. To avoid this issue, always use dist/main
  • Check your Python version – If you compiled your script with a newer version, older versions of Python might not be able to run it. This is especially true for Windows 7 since it doesn’t support Python 3.9 or never.
  • Start the console as administrator – Before you run your script, that the command line as administrator and check if that helps.

1. Add your configuration to the Python script

  1. Open your Python file.
  2. Copy the configuration parameters to the top of the file.
  3. Save changes.

Many users reported that moving the configuration parameters from a separate file or the spec file, fixed the problem for them, so be sure to try it.

This solution can help you if you’re getting error loading python dll python310.dll or python39.dll anaconda message, so be sure to try it.

Restoro repair

Restoro is a reliable third-party DLL fixer which uses a built-in automated system and an online library full of functional DLLs to replace and repair any files that might be corrupted or damaged on your PC.

All you need to do to resolve your PC’s problems is to launch it, and simply follow the on-screen instructions to start the process, as everything else is covered by the software’s automated processes.

This is how you can fix registry errors using Restoro:

  1. Download and install Restoro.
  2. Launch the software.
  3. Wait for it to scan your PC for any stability issues and possible malware.
  4. Press Start Repair.
  5. Restart your PC for all the changes to take effect.

After this process is completed your PC will be as good as new, and you will no longer have to deal with BSoD errors, slow response times, or other similar issues.

⇒ Get Restoro


Disclaimer: This program needs to be upgraded from the free version in order to perform some specific actions.


2. Use different parameters with pyinstaller

  1. Start your console.
  2. Now enter the following command: pyinstaller --upx-exclude"vcruntime140.dll" myscript.py
  3. Press Enter to run it.

Some PC issues are hard to tackle, especially when it comes to corrupted repositories or missing Windows files. If you are having troubles fixing an error, your system may be partially broken.
We recommend installing Restoro, a tool that will scan your machine and identify what the fault is.
Click here to download and start repairing.

Users also reported that the following commands worked for them, so feel free to try them as well: pyinstaller --onefile file_name.py
pyinstaller --noupx file_name.py

This is a simple and easy solution if you’re getting error loading python DLL in pyinstaller.

3. Add Temp directory to the list of exclusions

  1. Press Windows key + S and enter windows security. Select Windows Security from the list.
  2. Go to Virus & threat protection. Next click on Manage settings.
  3. Click on Add or remove exclusions.
    Add or remove exclusions - asus rog gaming center not working
  4. Click on Add an exclusion and select Folder.
  5. Select the following directory: C:Usersyour_usernameAppDataLocalTemp

Error loading python dll loadlibrary pyinstaller: formatmessagew failed can cause a lot of problems, but this solution might help you fix them.

Read more about this topic

  • How to open PY files on a Windows 10/11 PC
  • Windows can’t find Python executable error [QUICK FIX]
  • Circular Kernel Context Logger 0xc0000035: 6 Easy Fixes
  • Error Opening File for Writing: 9 Methods to Fix This Issue
  • Fix: The Local Device Name is Already in Use in Windows 10
  • How to Fix USB Error Code 43 on Windows 10

4. Delete files from pyinstaller folder

  1. Press Windows key + R and enter %appdata%. Press Enter.
  2. Navigate to pyinstaller directory.
  3. Delete all files from it.

This is a simple workaround and it can be helpful if you’re getting error loading Python DLL in Ultimaker Cura or AWS CLI.

The Error loading Python DLL can be problematic, but we hope you managed to solve it. If you believe that this issue is caused by a lack of permissions, our Python permission denied error guide should be able to help you.

Did you find a different solution for this problem? Let us know in the comments section below.

newsletter icon

Newsletter

Содержание

  1. LoadLibrary: PyInstaller: FormatMessageW failed #6837
  2. Comments
  3. Description of the issue
  4. Context information (for bug reports)
  5. A minimal example program which shows the error
  6. Stacktrace / full error message
  7. LoadLibrary: PyInstaller: FormatMessageW failed. #3999
  8. Comments
  9. Footer
  10. Error Loading Python DLL: Resolved in 4 Easy Steps
  11. Fix Python DLL error by using administrative privileges
  12. Why does the error loading Python DLL appear?
  13. How can I fix the error loading Python DLL?
  14. 1. Add your configuration to the Python script
  15. 2. Use different parameters with pyinstaller
  16. 3. Add Temp directory to the list of exclusions
  17. 4. Delete files from pyinstaller folder
  18. Hello world: Error loading python DLL with —onedir under windows 7, pyinstaller started in wine under linux #4148
  19. Comments
  20. Pyinstaller — Ошибка загрузки Python DLL — Ошибка FormatMessageW
  21. 3 ответа

LoadLibrary: PyInstaller: FormatMessageW failed #6837

Description of the issue

Executables compiled on windows 10 with pyinstaller are not able to be ran on Windows 7. I think this is a huge issue, because I personally use pyinstaller to fix the need for users to have python installed, when using my open source projects. A still remarkable amount of users are on Windows 7 and this really takes the entire sense behind the story of compiling python code to executables. The only solution that works for me is compiling with python 3.8.10 (which is compatible with both versions of Windows), else I keep running into this error.

Context information (for bug reports)

  • Pyinstaller Version: 5.1
  • Version of Python: 3.10.4
  • Platform: Windows 10, Windows 7
  • How you installed Python: python.org/downloads
  • Did you also try this on another platform? Does it work there? Compiled on Windows 10, ran on Windows 7 doesn’t work there but works on windows 10.

A minimal example program which shows the error

You can literally compile any code with pyinstaller on windows 10 with python 3.10.4 and try to run that compiled executable on windows 7; it’ll always result in the same exact error.

Stacktrace / full error message

This issue has also been pointed out before in #3999 but was falsely closed, because the contributor or maintainer at the time thought it would only be related to wine.

The text was updated successfully, but these errors were encountered:

Источник

LoadLibrary: PyInstaller: FormatMessageW failed. #3999

I’m trying to cross-compile (using Wine ) as a single file (or directory, no matter) my simple downloader Python tool. Here is a source code of that script on GitHub.

Here what I was doing:

The resulting elib-dl.exe from dist folder could be found here. It works fine in Wine environments. But when I try to run it on VirtualBox, it fails with the error message:

I found only one same question on StackOverflow but it has no answers.

The text was updated successfully, but these errors were encountered:

We are also experiencing this issue with Windows 7. Windows 10 seems fine.

We are also experiencing this issue with Windows 7. Windows 10 seems fine.

I reproduced this bug on Windows 10 and Windows 8 .

Is there a resolution ? Im trying to ‘compile’ py 3.7 application that utilizes PyQt5. Appreciated.

Cross-building using wine is not officially supported, thus this is not a bug.

I am getting this error on Windows 7 for a PyInstaller exe compiled on Windows 10.

No wine involved in any way.

I am getting this error on Windows 7 for a PyInstaller exe compiled on Windows 10.

No wine involved in any way.

Exactly the same problem.. Is there no fix till now?

Are you using Python 3.9 by any chance? It doesn’t support Windows 7.

Are you using Python 3.9 by any chance? It doesn’t support Windows 7.

Ah yes, I am using that version. Dang! In that case, can you explain how can I use pyinstaller using a different python version while keeping 3.9 installed too?

Probably the safest way (albeit not the most streamlined) is to grab a 3.8 installer from https://www.python.org/downloads, install it making sure that you disable the option to add Python to PATH . Then just use full paths whenever you want to reference it.

  • Instead of python use C:pathtopython3.8python.exe
  • Instead of pip use C:pathtopython3.8python.exe -m pip
  • Instead of pyinstaller use C:pathtopython3.8python.exe -m PyInstaller

If you need to do this a lot, pyenv-win is decent enough.

© 2023 GitHub, Inc.

You can’t perform that action at this time.

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.

Источник

Error Loading Python DLL: Resolved in 4 Easy Steps

Fix Python DLL error by using administrative privileges

  • If you’re getting an Error loading Python DLL, make sure you’re using the right directory.
  • Lack of administrative privileges can often cause this problem to appear.

  1. Download Restoro PC Repair Tool that comes with Patented Technologies (patent available here) .
  2. Click Start Scan to find DLL files that could be causing PC problems.
  3. Click Repair All to replace broken DLLs with working versions

  • Restoro has been downloaded by 0 readers this month.

Python is a great programming language, but error loading Python DLL on their PC. This problem can lead to other issues, such as Python runtime error for example.

If you are also troubled by this error, here are a couple of troubleshooting tips to help you resolve this issue once and for all.

Why does the error loading Python DLL appear?

There are multiple reasons for this issue, but the following are the most common ones:

  • User error – Sometimes not running the proper file or not having your script configured properly can lead to DLL errors. This can also lead to PIP not recognized and other errors.
  • Lack of administrative privileges – If you don’t use administrative rights while running Python commands, sometimes you might encounter this error. You can do that by using administrator account.
  • Version incompatibility – Older versions of Python aren’t always compatible with scripts made using the latest version, which results in this error.

How can I fix the error loading Python DLL?

Before we start fixing this problem, there are a couple of quick checks that you need to perform:

  • Use the correct directory – Many users reported this issue because they used build instead of dist directory. Not using correct directory can lead to The specified module could not be found and other problems. To avoid this issue, always use dist/main
  • Check your Python version – If you compiled your script with a newer version, older versions of Python might not be able to run it. This is especially true for Windows 7 since it doesn’t support Python 3.9 or never.
  • Start the console as administrator – Before you run your script, that the command line as administrator and check if that helps.

1. Add your configuration to the Python script

  1. Open your Python file.
  2. Copy the configuration parameters to the top of the file.
  3. Save changes.

Many users reported that moving the configuration parameters from a separate file or the spec file, fixed the problem for them, so be sure to try it.

This solution can help you if you’re getting error loading python dll python310.dll or python39.dll anaconda message, so be sure to try it.

Restoro is a reliable third-party DLL fixer which uses a built-in automated system and an online library full of functional DLLs to replace and repair any files that might be corrupted or damaged on your PC.

All you need to do to resolve your PC’s problems is to launch it, and simply follow the on-screen instructions to start the process, as everything else is covered by the software’s automated processes.

This is how you can fix registry errors using Restoro:

  1. Download and install Restoro.
  2. Launch the software.
  3. Wait for it to scan your PC for any stability issues and possible malware.
  4. Press Start Repair.
  5. Restart your PC for all the changes to take effect.

After this process is completed your PC will be as good as new, and you will no longer have to deal with BSoD errors, slow response times, or other similar issues.

Disclaimer: This program needs to be upgraded from the free version in order to perform some specific actions.

2. Use different parameters with pyinstaller

  1. Start your console.
  2. Now enter the following command: pyinstaller —upx-exclude»vcruntime140.dll» myscript.py
  3. Press Enter to run it.

Expert tip:

SPONSORED

Some PC issues are hard to tackle, especially when it comes to corrupted repositories or missing Windows files. If you are having troubles fixing an error, your system may be partially broken.
We recommend installing Restoro, a tool that will scan your machine and identify what the fault is.
Click here to download and start repairing.

Users also reported that the following commands worked for them, so feel free to try them as well: pyinstaller —onefile file_name.py
pyinstaller —noupx file_name.py

This is a simple and easy solution if you’re getting error loading python DLL in pyinstaller.

3. Add Temp directory to the list of exclusions

  1. Press Windows key + S and enter windows security. Select Windows Security from the list.
  2. Go to Virus & threat protection. Next click on Manage settings.
  3. Click on Add or remove exclusions.
  4. Click on Add an exclusion and select Folder.
  5. Select the following directory: C:Usersyour_usernameAppDataLocalTemp

Error loading python dll loadlibrary pyinstaller: formatmessagew failed can cause a lot of problems, but this solution might help you fix them.

Read more about this topic

4. Delete files from pyinstaller folder

  1. Press Windows key + R and enter %appdata%. Press Enter .
  2. Navigate to pyinstaller directory.
  3. Delete all files from it.

This is a simple workaround and it can be helpful if you’re getting error loading Python DLL in Ultimaker Cura or AWS CLI.

The Error loading Python DLL can be problematic, but we hope you managed to solve it. If you believe that this issue is caused by a lack of permissions, our Python permission denied error guide should be able to help you.

Did you find a different solution for this problem? Let us know in the comments section below.

Источник

Hello world: Error loading python DLL with —onedir under windows 7, pyinstaller started in wine under linux #4148

I packed a hello world in —onedir mode with :

  • pyinstaller master or latest release (both tested)
  • python 3.7, 32bits
  • running python on linux under wine

I don’t see any errors on output:

$ WINEPREFIX=$PWD/prefix/ wine «C:python37scriptspyinstaller.exe» /home/muser/workspace/test/test/hello_world.py
0009:fixme:heap:RtlSetHeapInformation (nil) 1 (nil) 0 stub
0009:fixme:ntdll:NtQueryInformationJobObject stub: 0x48 9 0x33fac0 112 0x33fa60
002a:fixme:msvcrt:_configure_wide_argv (1) stub
002a:fixme:msvcrt:_initialize_wide_environment stub
70 INFO: PyInstaller: 3.5.dev0+8c27d2668
70 INFO: Python: 3.7.3
74 INFO: Platform: Windows-XP-5.1.2600
75 INFO: wrote Z:homemuserworkspacetesthello_world.spec
002a:fixme:ntdll:server_get_file_info Unsupported info class e
79 INFO: UPX is not available.
80 INFO: Extending PYTHONPATH with paths
[‘Z:homemuserworkspacetesttest’,
‘Z:homemuserworkspacetest’]
81 INFO: checking Analysis
120 INFO: checking PYZ
138 INFO: checking PKG
138 INFO: Building because c:python37libsite-packagesPyInstallerloaderpyimod01_os_path.pyc changed
139 INFO: Building PKG (CArchive) PKG-00.pkg
160 INFO: Building PKG (CArchive) PKG-00.pkg completed successfully.
161 INFO: Bootloader c:python37libsite-packagesPyInstallerbootloaderWindows-32bitrun.exe
161 INFO: checking EXE
163 INFO: Building because c:python37libsite-packagesPyInstallerbootloaderWindows-32bitrun.exe changed
163 INFO: Building EXE from EXE-00.toc
164 INFO: Appending archive to EXE Z:homemuserworkspacetestbuildhello_worldhello_world.exe
166 INFO: Building EXE from EXE-00.toc completed successfully.
169 INFO: checking COLLECT
WARNING: The output directory «Z:homemuserworkspacetestdisthello_world» and ALL ITS CONTENTS will be REMOVED! Continue? (y/n)y
8907 INFO: Removing dir Z:homemuserworkspacetestdisthello_world
8916 INFO: Building COLLECT COLLECT-00.toc
9025 INFO: Building COLLECT COLLECT-00.toc completed successfully.

When starting the .exe on windows 7 64 bits, I have the following error:

python37.dll is present in the D:hello_world, which is the dist onedir :

How come the .exe doesn’t find python37.dll which is present in the same directory ?
On the same machine, applications packed using the same wine method with an older pyinstaller with python 2.7 do work.

The text was updated successfully, but these errors were encountered:

Источник

Pyinstaller — Ошибка загрузки Python DLL — Ошибка FormatMessageW

Я собрал свой .py файл, выполняющий следующие команды:

Когда я запускаю его на своем pc(Windows 10) все работает просто отлично.

Когда я пытаюсь запустить его на моей `виртуальной машине (Windows 8).

Я получаю следующую ошибку:

Ошибка загрузки библиотеки Python C:UsersMyUsernameAppdataLocalTempNUMBERSpython36.dll’ LoadLibrary: PyInstaller: FormatMessageW не удалось.

Я уже погуглил ошибку и нашел много решений, но ни одно из них не сработало..

// ОБНОВЛЕНИЕ: Если я скомпилирую его с моей виртуальной машиной, все отлично работает на виртуальной машине, основном компьютере и даже на моем сервере Windows. странно. поэтому это должно быть проблема с моим основным компьютером.

3 ответа

У меня была аналогичная проблема при попытке запустить программу на основе Python (aws cli) и получить сообщение «Ошибка загрузки Python DLL . LoadLibrary: указанный модуль не может быть найден». в Windows Server 2008 R2.

Я решил эту проблему, установив распространяемый пакет Visual C++ для компонентов среды выполнения Visual Studio 2015. https://www.microsoft.com/en-us/download/confirmation.aspx?id=48145

Надеюсь, это поможет!

вместо этого вы можете использовать auto-py-to-exe, просто используйте cmd или терминал и напишите:

C:Userswalee>pip install auto-py-to-exe

Затем подождите, пока он загрузится, а затем введите cmd (или терминал): C:Userswalee>auto-py-to-exe И подождите, пока оно загрузится, а затем появится экран, введите описание изображения здесь

И просто сделайте так, как я сделал на фотографии, а затем нажмите конвертировать .py в .exe, а затем нажмите показать выходную папку

Это также происходит, когда вы читаете файл .exe, расположенный в файле build.

Вам нужно запустить exe, расположенный в папке dist.

Если ошибка сохраняется даже в папке dist .exe , проверьте точную версию python, загрузите dll python из Интернета для этой точной версии и сохраните в папке, предложенной в сообщении об ошибке (путь, где эта dll отсутствует).

Источник

The problem background

Usually always win10+anaconda Write… In the environment python Program , use pyinstaller There’s no problem after packing . But package it and send it to other colleagues , stay win7 There’s something wrong with the machine .

After a series of investigations , Finally solved the packaging program in win7 Running problems on . So use this article to record my problems and solutions .

Question 1 :Error loading Python DLL

The first is the following problem ,Error loading Python DLL xxx python39.dll,LoadLibrary: PyInstaller: FormatMessageW failed.
 Question 1 :
 Insert picture description here

Cause of error

The discovery is due to Python 3.9 No longer supported win7 了 , Need to put Python Version down to Python3.8 And the following .

Solution

  1. use anaconda Rebuild the virtual environment , This time pay attention to the setting python Version of
conda create -n xxx python=3.8
  1. Install the dependent libraries you need , such as :
 pip install -r requirements.txt
  1. use PyInstaller Encryption packer , such as :
pyinstaller XXX.spec --key YOUR_KEY
  1. stay win7 In the virtual machine , Run the packaged program .
    I use it win10 Self contained Hyper-V , download win7 iso Create virtual machine after file , Activate the system .
    That’s it Python3.9 I won’t support it win7 The problem of .

unfortunately , I encountered the following problem again .

Question two :OSError: [WinError 87] Parameter error

This problem occurs when running the packer ,Failed to execute script 'pyiboot01_bootstrap' due to unhandled exception: [WinError 87] Parameter error .
 Insert picture description here

Cause of error

At first I thought it was PyInstaller Version not supported win7, Later, I went to Github Checked the relevant Issues , It was found that this was due to the absence of win7 Patch KB2533623 As a result of , It’s not PyInstaller The pot .

Solution

stay win7 After installing in the virtual machine environment KB2533623 Patch , Packaged program exe Finally smooth in win7 It’s running on .
 Insert picture description here

Reference link

https://github.com/pyinstaller/pyinstaller/issues/5079

07.02.2023

121 Просмотры

No error messages generated

Когда я запускаю свою программу в Windows 7, я получаю эту ошибку:

Error loading Python DLL                             ‘C:UsersmsiAppDataLocalTemp_MEI91442python38.dll

‘.

No error messages generated.

FormatMessageW: Feil parameter. (Translated: FormatMessageW: Wrong parameter.)

LoadLibrary: PyInstaller: FormatMessageW failed.

Программа преобразует видео в текстовый файл, который вы можете воспроизводить через терминал. Он использует ffmpeg и ffprobe, которые я связываю внутри EXE-файла. EXE-файл отлично работает в Windows 10.

Преобразован в .exe с помощью pyinstaller, используя:

pyinstaller –onefile –console –icon=”icon.ico” –add-data ffmpeg.exe ;. –добавить-данные ffprobe.exe ;. code.py

Кто-нибудь знает, как это исправить?

Решение

Вы должны запустить pyinstaller с версией python, которая поддерживает Windows-версию системы, которая должна запускать .exe.

В противном случае pyistaller свяжет версию python, которая не может быть выполнена в исполняемой операционной системе.

Учтите, что также ваше .py-приложение должно иметь возможность работать со старой версией python.

Часто отключенный пул майнинга: «Удаленный хост закрыл соединение» #41

Я попробовал последнюю версию 3.3 GPU-майнера на моей машине i7 8700 с видеокартой 2x GTX1080. У меня очень хорошая сеть без проблем в любой части мира. Я попробовал Antpool, пул BTCC. uuPool и F2Pool. У всех них отключен один и тот же пул майнинга: проблема «Удаленный хост закрыл соединение» всего через 2-3 минуты (в некоторых случаях даже короче) времени выполнения. Кроме того, ни один из представленных общих ресурсов, похоже, не показывает мои учетные записи майнеров (все они отлично работают с моим B3).

Есть какие-либо подсказки относительно того, в чем проблема? Кроме того, где находятся журналы?

Заранее спасибо за вашу помощь!

Решение

Удаленное соединение закрыто из-за:

  1. Низкий хэшрейт, что приводит к отсутствию отправки в течение относительно длительного времени и может привести к отключению пула.
  2. Плохое качество сетевого соединения, высокая задержка, нестабильное соединение.

Описание проблемы

Исполняемые файлы, скомпилированные в Windows 10 с помощью pyinstaller, не могут быть запущены в Windows 7. Я думаю, что это огромная проблема, потому что я лично использую pyinstaller для устранения необходимости установки python пользователями при использовании моих проектов с открытым исходным кодом. В Windows 7 все еще значительное количество пользователей, и это действительно отражает весь смысл истории компиляции кода python в исполняемые файлы.

Единственное решение, которое работает для меня, – это компиляция с помощью python 3.8.10 (который совместим с обеими версиями Windows), иначе я продолжаю сталкиваться с этой ошибкой.

Отслеживание стека / полное сообщение об ошибке

Error loading Python DLL appdatalocaltemp_mei17882python310.dll

No error messages generated.

FormatMessageW: The parameter is incorrect.

LoadLibrary: Pyinstaller: FormatMessageW failed.

Мы не поддерживаем Windows 7. Мы поддерживаем только версии 8, 10 и 11.

Если вы хотите поддерживать Windows 7, iirc вам нужно будет создать на Windows 7. PyInstaller все равно должен быть совместим, даже если он официально не поддерживает win7.

И последней версией Python для поддержки Windows 7 или 8.0 был Python 3.8, поэтому, используя Python 3.10, вы уже нарушили его.

Если вы пытаетесь использовать python> = 3.9 в Windows 7, это не сработает. Python.org на странице загрузки указано столько же, например: Note that Python 3.9.13 cannot be used on Windows 7 or earlier.И, соответственно, приложение, заблокированное PyInstaller, также не будет работать, поскольку собранная общая библиотека python не будет загружаться в Windows 7.

Загрузка…

  • #1

Неработает на Win 7, сначала говорило нет файла :

API-MS-WIN-CORE-PATH-L1-1-0.DLL​

и не запускался ЕХЕшник через батник.
нашёл файл, засунул в систему,
Запустилось
и
теперь говорит :

C:Users****Desktopdanila-miner-2.2.2-win64>danila-miner.exe run https://serv
er1.whalestonpool.com @кошечек@
Error loading Python DLL ‘C:UsersLiteAppDataLocalTemp_MEI60562python39.dl
l’.
No error messages generated.
FormatMessageW: ╧рЁрьхЄЁ чрфрэ эхтхЁэю.
LoadLibrary: PyInstaller: FormatMessageW failed.
C:Users******Desktopdanila-miner-2.2.2-win64>danila-miner.exe run https://serv
er1.whalestonpool.com @кошечек@
Error loading Python DLL ‘C:UsersLiteAppDataLocalTemp_MEI59482python39.dl

Майнить пытаюсь на пуле Whales
Лень переставлять винду на 10 , поиск по интернету не дал результатов, что ему надо, непонятно
+
Есть у кого опыт по настройки тона на Windows 7 ???? Так вообще можно?
з.ы.
На win 10 нормально майнится.

тон тон диги тон тон

  • #4

Error loading Python DLL ‘C:UsersLiteAppDataLocalTemp_MEI59482python39.dl

У тебя антивирус может считает эту дээлельку трояном или сама ось блочит
хотя конечно данила майнер звучит очнеь кринжово :D

  • #5

Python 3.9 не работает на windows 7
Данила-майнер разработан на Python 3.9 раз ему нужна эта DLL

If you require Windows 7 support, please install Python 3.8.

docs.python.org

4. Using Python on Windows

This document aims to give an overview of Windows-specific behaviour you should know about when using Python on Microsoft Windows. Unlike most Unix systems and services, Windows does not include a …

docs.python.org


docs.python.org

  • #6

хотя конечно данила майнер звучит очнеь кринжово :D

:rolleyes:

  • #7

Лень переставлять винду на 10

Пошел вон отсюда, лентяй! Лень ему. Иди у мамки выклянчи под елочку тушку, и на ней тренируйся.

  • #9

Да пусть лезут, не жалко может на eth/etc сложность поубавится)

  • #10

Тон хайповая тема!….это как собаки…только у них Маск с тэслой,а у нас Дуров с телегой….

  • #11

а на хрена, на WInXP больше профит…

  • #12

Неработает на Win 7, сначала говорило нет файла :

API-MS-WIN-CORE-PATH-L1-1-0.DLL​

и не запускался ЕХЕшник через батник.
нашёл файл, засунул в систему,
Запустилось
и
теперь говорит :

C:Users****Desktopdanila-miner-2.2.2-win64>danila-miner.exe run https://serv
er1.whalestonpool.com @кошечек@
Error loading Python DLL ‘C:UsersLiteAppDataLocalTemp_MEI60562python39.dl
l’.
No error messages generated.
FormatMessageW: ╧рЁрьхЄЁ чрфрэ эхтхЁэю.
LoadLibrary: PyInstaller: FormatMessageW failed.
C:Users******Desktopdanila-miner-2.2.2-win64>danila-miner.exe run https://serv
er1.whalestonpool.com @кошечек@
Error loading Python DLL ‘C:UsersLiteAppDataLocalTemp_MEI59482python39.dl

Майнить пытаюсь на пуле Whales
Лень переставлять винду на 10 , поиск по интернету не дал результатов, что ему надо, непонятно
+
Есть у кого опыт по настройки тона на Windows 7 ???? Так вообще можно?
з.ы.
На win 10 нормально майнится.

тон тон диги тон тон

Windows Vista поставь точно заработает а карта наверно из разряда аля — дискретная графика?
Успехов вам в майнинге.

  • #13

OffTop!
Заходит как то 98-я винда к 95-ой винде и говорит:
Ну что? Пойдем поработаем? Или прям тут зависнем? ;-)

cemehbl4


  • #14

Неработает на Win 7, сначала говорило нет файла :

API-MS-WIN-CORE-PATH-L1-1-0.DLL​

и не запускался ЕХЕшник через батник.
нашёл файл, засунул в систему,
Запустилось
и
теперь говорит :

C:Users****Desktopdanila-miner-2.2.2-win64>danila-miner.exe run https://serv
er1.whalestonpool.com @кошечек@
Error loading Python DLL ‘C:UsersLiteAppDataLocalTemp_MEI60562python39.dl
l’.
No error messages generated.
FormatMessageW: ╧рЁрьхЄЁ чрфрэ эхтхЁэю.
LoadLibrary: PyInstaller: FormatMessageW failed.
C:Users******Desktopdanila-miner-2.2.2-win64>danila-miner.exe run https://serv
er1.whalestonpool.com @кошечек@
Error loading Python DLL ‘C:UsersLiteAppDataLocalTemp_MEI59482python39.dl

Майнить пытаюсь на пуле Whales
Лень переставлять винду на 10 , поиск по интернету не дал результатов, что ему надо, непонятно
+
Есть у кого опыт по настройки тона на Windows 7 ???? Так вообще можно?
з.ы.
На win 10 нормально майнится.

тон тон диги тон тон

Данила-рукожоп не догадался свой говномайнер скомпилить на питоне-3.8, кушайте на здоровье

  • #15

Подскажите плиз, какой порог выплаты с пула TonWhales на кошелек?
Копалось 5GH примерно сутки через рейв, по телего-боту баланс 3.6тона — но баланс адреса пула нулевой, и сам адрес неинициализирован.

null.jpg

  • #16

Подскажите плиз, какой порог выплаты с пула TonWhales на кошелек?
Копалось 5GH примерно сутки через рейв, по телего-боту баланс 3.6тона — но баланс адреса пула нулевой, и сам адрес неинициализирован.

Минималка на выплату вроде 5 тон.

  • #17

Неработает на Win 7, сначала говорило нет файла :

API-MS-WIN-CORE-PATH-L1-1-0.DLL​

и не запускался ЕХЕшник через батник.
нашёл файл, засунул в систему,
Запустилось
и
теперь говорит :

C:Users****Desktopdanila-miner-2.2.2-win64>danila-miner.exe run https://serv
er1.whalestonpool.com @кошечек@
Error loading Python DLL ‘C:UsersLiteAppDataLocalTemp_MEI60562python39.dl
l’.
No error messages generated.
FormatMessageW: ╧рЁрьхЄЁ чрфрэ эхтхЁэю.
LoadLibrary: PyInstaller: FormatMessageW failed.
C:Users******Desktopdanila-miner-2.2.2-win64>danila-miner.exe run https://serv
er1.whalestonpool.com @кошечек@
Error loading Python DLL ‘C:UsersLiteAppDataLocalTemp_MEI59482python39.dl

Майнить пытаюсь на пуле Whales
Лень переставлять винду на 10 , поиск по интернету не дал результатов, что ему надо, непонятно
+
Есть у кого опыт по настройки тона на Windows 7 ???? Так вообще можно?
з.ы.
На win 10 нормально майнится.

тон тон диги тон тон

такая же проблема. не работает. кто решил вопрос, напишите как.

  • #18

Минималка на выплату вроде 5 тон.

0.1

  • #20

такая же проблема. не работает. кто решил вопрос, напишите как.

Установкой windows 10

Forum rules
Help us help you:

  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.

gnmusgrave

Newbie
Newbie
Posts: 2
Joined: April 4th, 2021, 8:31 am

Error Loading python39.dll

I just upgraded from V3.2.0 to 3.2.1 on a Win 7 SP1 system.

All previous versions have worked perfectly.

I cannot start the new version. I get the following error:

C:Program Files (x86)SABnzbd-3.2.1>SABnzbd-console.exe
Error loading Python DLL ‘C:Program Files (x86)SABnzbd-3.2.1python39.dll’.
No error messages generated.
FormatMessageW: The parameter is incorrect.
LoadLibrary: PyInstaller: FormatMessageW failed.

Any suggestions?

Thanks.

User avatar

safihre

Administrator
Administrator
Posts: 4930
Joined: April 30th, 2015, 7:35 am
Contact:

Re: Error Loading python39.dll

Post

by safihre » April 4th, 2021, 9:06 am

Yes, Windows 7 is no longer supported by Python 3.9.
You can use the Legacy version of Sabnzbd from the Downloads page. This is also mentioned in the release motes.

I’m surprised you even managed to install it, did you use the installer? It should block you from installing it on Windows 7 system and redirect you to the Downloads page.

If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate

gnmusgrave

Newbie
Newbie
Posts: 2
Joined: April 4th, 2021, 8:31 am

Re: Error Loading python39.dll

Post

by gnmusgrave » April 4th, 2021, 10:11 am

I didn’t use the installer. I downloaded the standalone version, but used the 64-bit version rather than the 32-bit and legacy version (didn’t read the message carefully enough!). Problem now solved! Thank you!

I guess I’m going to have to bite the bullet and change to Win 10 soon if this sort of thing continues. I applied the free upgrade from Win 7 to Win 10 several years ago, and it was a world of pain for several days. That early version of Win 10 broke many things on my system, and then I had to rebuild a lot of stuff after applying the «seamless» regression back to Win 7 that was provided in the newly upgraded Win 10. Since then I’ve avoided Win 10 like the plague. However, now it seems I might have no choice. The saving grace might be that Win 10 has been updated many times since then, so maybe it will be a smoother transition now. Sigh….

Description of the issue

Executables compiled on windows 10 with pyinstaller are not able to be ran on Windows 7. I think this is a huge issue, because I personally use pyinstaller to fix the need for users to have python installed, when using my open source projects. A still remarkable amount of users are on Windows 7 and this really takes the entire sense behind the story of compiling python code to executables. The only solution that works for me is compiling with python 3.8.10 (which is compatible with both versions of Windows), else I keep running into this error.

Context information (for bug reports)

  • Pyinstaller Version: 5.1
  • Version of Python: 3.10.4
  • Platform: Windows 10, Windows 7
  • How you installed Python: python.org/downloads
  • Did you also try this on another platform? Does it work there? Compiled on Windows 10, ran on Windows 7 doesn’t work there but works on windows 10.

A minimal example program which shows the error

You can literally compile any code with pyinstaller on windows 10 with python 3.10.4 and try to run that compiled executable on windows 7; it’ll always result in the same exact error.

Stacktrace / full error message

Error loading Python DLL appdatalocaltemp_mei17882python310.dll
No error messages generated.
FormatMessageW: The parameter is incorrect.
LoadLibrary: Pyinstaller: FormatMessageW failed.

This issue has also been pointed out before in #3999 but was falsely closed, because the contributor or maintainer at the time thought it would only be related to wine.

Понравилась статья? Поделить с друзьями:
  • Error loading psycopg2 module dll load failed while importing psycopg
  • Error loading program files
  • Error loading postfx shaders mount and blade что делать
  • Error loading postfx shaders make sure you have the latest directx runtime library installed
  • Error loading postcss plugin failed cannot find module autoprefixer