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.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have installed psutil in directory third_party, using
pip install psutil -t ./third_party
And from test.py which is outside third_party directory, I have imported as shown below by adding third_party to sys path.
import sys
import os
sys.path.append(os.path.join(os.path.dirname(__file__), "third_party" ))
import psutil.
and it throws the error.
Traceback (most recent call last):
File ".\libtest.py", line 9, in <module>
import psutil
File ".\third_party\psutil\__init__.py", line 109, in <module>
from . import _pswindows as _psplatform
File ".\third_party\psutil\_pswindows.py", line 35, in <module>
from ._psutil_windows import ABOVE_NORMAL_PRIORITY_CLASS
ImportError: DLL load failed while importing _psutil_windows: The parameter is incorrect.
All other python libraries which does not have dll and saved in third_party has worked.
However, below code works,
import third_party.psutil
Why does import psutil not working even though third_party library is in sys path. Am i missing something related to loading of Dll ?
The text was updated successfully, but these errors were encountered:
Summary
Description
I have installed psutil in directory
third_party
, usingAnd from
test.py
which is outsidethird_party
directory, I have imported as shown below by addingthird_party
to sys path.and it throws the error.
All other python libraries which does not have dll and saved in
third_party
has worked.However, below code works,
Why does
import psutil
not working even thoughthird_party
library is in sys path. Am i missing something related to loading of Dll ?The text was updated successfully, but these errors were encountered: