Skip to content

ImportError: DLL load failed: Access is denied -- (Windows 10 - Admin mode) (1549) #870

@GalacticEmperor1

Description

@GalacticEmperor1

Issue №1549 opened by scordee at 2020-01-02 08:28:09

After installing pygame 1.9.6 using pip install --user in admin mode, I get the following traceback on Windows 10. All the installed site-packages have full access (F).

C:\windows\system32>python
Python 3.7.2rc1 (tags/v3.7.2rc1:75a402a217, Dec 11 2018, 23:05:39) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.

import pygame
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\UserName\AppData\Roaming\Python\Python37\site-packages\pygame_init_.py", line 79, in
from pygame.base import *
ImportError: DLL load failed: Access is denied.


Comments

# # illume commented at 2020-01-19 09:20:22

It might be interesting to know if other binary python packages work when installing like this? Like numpy or pandas?

If it fails with numpy or pandas too, then we know it's a generic python packaging problem.
If it works with them, then maybe it's a pygame specific problem.


# # scordee commented at 2020-01-28 07:37:14

Numpy and Pandas do work.


# # MyreMylar commented at 2020-02-07 14:12:38

This sounds like a standard windows security thing with dlls.

By using the --user flag when in admin mode I expect you have installed pygame dlls only for the admin user. The same problem happens with Tensorflow:

tensorflow/tensorflow#27451

Just don't install pygame like this if you want it to be usable for other users. You can probably get your code to work by putting it in a script and saying 'run as administrator'.


# # illume commented at 2020-02-08 08:56:36

I guess this is a pip usability issue.


# # vincevenomenon commented at 2021-09-24 05:34:00

I met similar issue, any solution?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions