Sheridan Posted April 29, 2024 Posted April 29, 2024 We've been asked to install pygame on a handful of PCs - which seems to worked ok - but the thing that fails is the 'import pygame' part Running as a local administrator (in cmd or IDE) we get this error: ImportError: DLL load failed while importing base: Access is denied. So it looks like a permission issue, even as an admin but I've got no clue as to what its trying to access - anyone know how this works?
Sheridan Posted April 29, 2024 Author Posted April 29, 2024 I just ran the 'pip install pygame' command - that seemed to work OK
mavhc Posted April 29, 2024 Posted April 29, 2024 If I run that as a normal user I get: Defaulting to user installation because normal site-packages is not writeable running CMD as admin I get it installing in c:\python3xx\lib\site-packages pip --debug install pygame will show the path
Sheridan Posted May 1, 2024 Author Posted May 1, 2024 It seems to install ok (either for user or as admin) but the import always fails: File "", line 1, in File "C:\Program Files (x86)\Python\Lib\site-packages\pygame\__init__.py", line 92, in from pygame.base import * # pylint: disable=wildcard-import; lgtm[py/polluting-import] ^^^^^^^^^^^^^^^^^^^^^^^^^ImportError: DLL load failed while importing base: Access is denied Problem is, I can't work out where its trying to copy/edit a file, as I get that error as an admin as well
mavhc Posted May 1, 2024 Posted May 1, 2024 Are the file permissions on that file correct? read for all users or similar?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now