Error loading python dll python27 dll

Ошибка загрузки python27.dll ошибка для pyinstaller

Я успешно отредактировал мой файл spec и добавил папку с моими данными. Он строит отлично, но по-прежнему не может получить доступ к данным. Когда я пытаюсь запустить скомпилированный .exe, я получаю эту ошибку: Error loading Python DLL: C:\Users\Sal\AppData\Local\Temp\_MEI60122\python27.dll (error code 126) РЕДАКТИРОВАТЬ 1 — Я все еще не понял, что мой файл спецификации выглядит следующим образом:

a = Analysis(['Clock_In.py'], pathex=['C:\\Users\\Sal\\Desktop'], hiddenimports=[], hookspath=None, runtime_hooks=None) a.datas += [('CO_time.pkl','CO_time.pkl', 'DATA')] a.datas += [('hours.pkl','hours.pkl', 'DATA')] a.datas += [('Obj_file.pkl','Obj_file.pkl', 'DATA')] a.datas += [('weekly_hours_dict.pkl','weekly_hours_dict.pkl', 'DATA')] pyz = PYZ(a.pure) exe = EXE(pyz, a.datas, a.binaries, a.scripts, exclude_binaries=True, name='Clock_In.exe', debug=False, strip=None, upx=True, console=True, icon="C:\Users\Sal\Desktop\Raindropmemory-Legendora-BrokenSword.ico") coll = COLLECT(exe, a.binaries, a.zipfiles, a.datas, strip=None, upx=True, **name='Clock_In') 

РЕДАКТИРОВАТЬ 2 Я использую 32-разрядный питон в 64-разрядной ОС (Windows 8), и мне было доведено до моего сведения, что это потенциально может вызвать проблемы, но все равно никакого решения. РЕДАКТИРОВАТЬ 3 Итак, я только что попробовал загрузить 64-битный питон и поместить его в свой системный путь. запущен pyinstaller с моим .spec файлом и все еще получил тот же самый код ошибки! Что здесь происходит! Любопытная деталь заключается в том, что оператор icon=»C:\Users\Sal\Desktop\Raindropmemory-Legendora-BrokenSword.ico») из файла спецификации выполнил и успешно обновил значок, где, как и раньше, этого не произошло. EDIT 4 Это утверждение, которое у меня есть в моем коде для MEIPASS прямо из документации.

if getattr(sys, 'frozen', False): # we are running in a |PyInstaller| bundle basedir = sys._MEIPASS else: # we are running in a normal Python environment basedir = os.path.dirname(__file__) 

Источник

Читайте также:  Зачем нужна java update scheduler

Error loading python27.dll error for pyinstaller

You put that code snippet right at the top of the Python script you are turning into an executable — not in the spec and not in its own script. I found an example here:

Solution 2

I found same error after creating a standalone executable like this:

pyi-makespec.exe -F program.py ## Customize script.spec just created 
pyinstaller.exe -F script.spec 

so I needed to run the executable as administrator to solve it.

I don’t know the reason because it wasn’t my computer. I had done the process in mine first and worked like a charm but not there. Perhaps some security configuration or a weird installation of python or wxpython, but I add this solution here because I was looking for hours without success, and it’s a simple task that can save you some time before trying more complex approaches.

Solution 3

Having the same issue on python3.7 on windows 10.

Fixed this by adding —upx-exclude»vcruntime140.dll» option.

After_Sunset

Comments

I have successfully edited my spec file and added the folder with my data to it. It builds fine but it still can’t access the data. WHen i try to run the compiled .exe i get this error: Error loading Python DLL: C:\Users\Sal\AppData\Local\Temp\_MEI60122\python27.dll (error code 126) EDIT 1 — I still don’t have this figured out my spec file looks like this:

a = Analysis(['Clock_In.py'], pathex=['C:\\Users\\Sal\\Desktop'], hiddenimports=[], hookspath=None, runtime_hooks=None) a.datas += [('CO_time.pkl','CO_time.pkl', 'DATA')] a.datas += [('hours.pkl','hours.pkl', 'DATA')] a.datas += [('Obj_file.pkl','Obj_file.pkl', 'DATA')] a.datas += [('weekly_hours_dict.pkl','weekly_hours_dict.pkl', 'DATA')] pyz = PYZ(a.pure) exe = EXE(pyz, a.datas, a.binaries, a.scripts, exclude_binaries=True, name='Clock_In.exe', debug=False, strip=None, upx=True, console=True, icon="C:\Users\Sal\Desktop\Raindropmemory-Legendora-BrokenSword.ico") coll = COLLECT(exe, a.binaries, a.zipfiles, a.datas, strip=None, upx=True, **name='Clock_In') 

EDIT 2 I am using 32-Bit python on a 64-bit OS(windows 8) and it has been brought to my attention that this could potentially be causing my issue, but still no solution. EDIT 3 So i have just tried download 64-bit python and putting it in my system path. ran pyinstaller with my .spec file and still got the exact same error code! What is going on here! A curious detail though is that the icon=»C:\Users\Sal\Desktop\Raindropmemory-Legendora-BrokenSword.ico») statement from spec file executed and updated the icon successfully, where as before it would not. EDIT 4 This is the statement i have in my code for MEIPASS straight from the documentation.

if getattr(sys, 'frozen', False): # we are running in a |PyInstaller| bundle basedir = sys._MEIPASS else: # we are running in a normal Python environment basedir = os.path.dirname(__file__) 

Thanks i can’t tell if it helped or not but after adding i am now getting this Error loading Python DLL: C:\Users\Sal\AppData\Local\Temp\_MEI60122\python27.dll (error code 126) any clue about this?

What options are you giving to your call to pyinstaller? I believe you will need -F at a minimum — see stackoverflow.com/questions/19225132/… — but double-check the manual to see if you require other flags as well — pythonhosted.org/PyInstaller/#using-pyinstaller

I tried that it didn’t do anything. I am using this: pyinstaller Clock_In.spec but still getting that same error code Error loading Python DLL: C:\Users\Sal\AppData\Local\Temp\_MEI60122\python27.dll (error code 126)

Just to be clear it compiles fine and all the necessary data files are there its when i try to click the .exe i get this.

Do you have Python in your path? Seems like it is having trouble locating it. I have also seen this when I had a 32-bit Python distro on a 64-bit os and it found python27.dll but for the wrong platform.

Yes , im in the same boat. I have python 32-bit on a 64-bit OS(Windows 8). I checked my path and python is there. SO how did you resolve it? Any suggestions? I really need to get to the bottom of this lol.

So after changing my system path to 64-bit python and re-compiling i still get that exact same error code 126! A curious detail though this time it actually executed the icon=»C:\Users\Sal\Desktop\Raindropmemory-Legendora-BrokenSw‌​ord.ico») successfully from my spec file and updated the icon where-as before it wouldn’t

Interesting. Are there any other Python libraries you are using aside from Pyinstaller? If so did you reinstall them after you put down the new Python?

Источник

Google Drive Error Code 5 – Error Loading Python DLL [MiniTool Tips]

You can’t deny the fact that Google Drive is used widely throughout the world. You also need to admit that there are sometimes errors occurred in Google Drive. For instance, the Error Loading Python DLL error (error code 5) shows up on your device, all of a sudden.

Please back up at least important data with MiniTool software.

Google Drive Error: Error loading Python DLL

What is Google Drive?

Google LLC designed and released Google Drive as a file storage and synchronization service on April 24, 2012. Three main functions of Google Drive are storing files on servers, synchronizing files across devices, and sharing files with others. Google Drive also provides applications equipped with offline capabilities for users of multiple devices (Windows and macOS computers, Android and iOS smartphones, and tablets).

Google Drive Error 5

Like any other programs and services, the Google Drive also suffers from various errors. For instance, Error loading Python DLL is a typical Google Drive fatal error people may encounter.

Fatal Error!

C:\Users\User\AppData\Local\Temp\_MEI22042\python27.dll (error code 5)

Error loading Python DLL

The prompt window above shows up when:

When you see such Google Drive fatal error, you have no choice but to click on the OK button to close the prompt window. However, this error persists. Please read the following content to know what can cause the error and how to fix it.

What Causes Google Drive Error Loading Python DLL

The Error Loading Python DLL error usually shows up on your screen when you try to open the desktop version of Google Drive or several seconds after the syncing procedure was started. Most of the time, the Error Loading Python DLL prompt window shows you that a DLL named python27.dll is in trouble.

Why does the error loading Python DLL appears in Google Drive? There are mainly 6 reasons to explain why you can’t open Google Drive.

  • The executable is losing admin access: the error loading python27.dll may be a result of lack of admin access. Thus, the Google syncing app cannot maintain a persistent connection with Google Drive.
  • Lack Visual C++ 2008 Redist Pack: if an essential Visual C++ pack (2008 SP1 Redist) is not included in the Windows installation, the python27.dll loading error will also appear.
  • There’s problem with permission: you can’t use the syncing feature of the Backup and Sync application to communicate with the Drive servers correctly if any permission problem is found.
  • There’s compatibility issue: if the GoogleDriveSync.exe executable (Backup and Sync version) is not compatible with your current Windows version, the error will also occur.
  • GoogleDriveSync.exe executable is outdated: people running a severely outdated version of the Backup and Sync application tend to receive the error loading Python DLL message.
  • Corrupted drive files are found in Temp folder: the files contained in Temp folder may be corrupted when you sync the local data with the Google Drive cloud.

How to recover corrupted files?

How To Recover Corrupted Files Efficiently To Minimize Losses

The work to recover corrupted files can be either difficult or easy. The main point is whether you’ve got effective way and tool when starting that work.

How to Solve Error Loading Python DLL on Windows

#1. Run the executable file (GoogleDriveSync.exe) with admin access.

  1. Open Windows Explorer (also called File Explorer).
  2. Go to this path: C:\Program Files\Google\Drive.
  3. Look for theexe file and right click on it.
  4. Choose Properties from the menu you see.
  5. Shift to the Compatibility tab in the Properties window.
  6. Look for the Settings section and check Run this program as an administrator under it.
  7. Click on the Apply button to confirm.
  8. Restart your Google Drive to have a try.

Run this program as an administrator

#2. Install the latest Microsoft Visual C++ 2008 SP1 Redist.

  1. Click here to select language and then click on the Download button.
  2. Check a version based on your system (vcredist_x86.exe for 32-bit version and vcredist_x64.exe for 64-bit).
  3. Wait for the download process to complete.
  4. Follow the instructions to complete installing the Redist Pack.
  5. Restart your computer.

Download

#3. Get the latest Backup and Sync version.

  1. Right click on the Start button in the lower left corner.
  2. Choose Run from the menu and type appwiz.cpl.
  3. Hit Enter to open the Programs and Features window.
  4. Look for Backup and Sync from Google application and select it.
  5. Click on the Uninstall button and click Yes to confirm.
  6. Wait for the uninstallation process to end.
  7. Open the browser on your computer and go to this page.
  8. Follow the instructions to finish the installation.
  9. Restart your computer.

Run

Also, you can troubleshoot error loading Python DLL by:

About The Author

Sarah has been working as an editor at MiniTool since she graduated from university. Sarah aims at helping users with their computer problems such as disk errors and data loss. She feels a sense of accomplishment to see that users get their issues fixed relying on her articles. Besides, she likes to make friends and listen to music after work.

Источник

Оцените статью