-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Closed
Copy link
Labels
Description
PIL version: 9.4.0
OS: Windows 10.
I have installed PIL in custom directory named contrib, using
pip install PIL-t ./contrib
And from test.py which is outside contrib directory, I have imported as shown below by adding contrib to sys path.
import sys
import os
sys.path.append(os.path.join(os.path.dirname(__file__), "contrib" ))
from PIL import Image
# from contrib.PIL import Image
im = Image.open(r"image.jpg")
# This method will show image in any image viewer
im.show()and it throws the error.
Traceback (most recent call last):
File ".\test.py", line 15, in <module>
from PIL import Image
File ".\contrib\PIL\Image.py", line 103, in <module>
from . import _imaging as core
ImportError: DLL load failed while importing _imaging: The parameter is incorrect.Even below import throws error.
from contrib.PIL import Image
import contrib.PIL.ImageHowever, it is working when it is installed in default location lib. Am i missing something like adding dll part in windows or something like that??
Reactions are currently unavailable