Unable to lookup package in PYTHONUSERBASE path #2073
Unanswered
ksrangarajan
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Environment
Pythonnet version: 3.0.0
Python version: 3.10
Operating System: Windows 10
.NET Runtime: 4.7.2
Details
Downloaded the 3.0.0 version code (into C:) and built them locally in Windows 10 Operating System
Created folder structure c:\sitelibs\Python310\site-packages
Installed the pip package six into c:\sitelibs\Python310\site-packages
Opened command prompt and followed below steps
C:>SET PYTHONNET_PYDLL=c:\program files\python310\python310.dll
C:>SET PYTHONUSERBASE=C:\sitelibs
C:>"c:\program files\python310python.exe"
Python 3.10.9 (tags/v3.10.9:1dd9be6, Dec 6 2022, 20:01:21) [MSC v.1934 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information.
<module 'six' from 'c:\sitelibs\Python310\site-packages\six.py'>
Run the console application code of Pythonnet which throws module not found error.
c:>C:\pythonnet-master\src\console\bin\x64\Debug\net472\npython
Python 3.10.9 (tags/v3.10.9:1dd9be6, Dec 6 2022, 20:01:21) [MSC v.1934 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information.
Traceback (most recent call last):
File "", line 1, in
ModuleNotFoundError: No module named 'six' >>> exit()
Unhandled Exception: System, AccessViolationException: Attempted to read or write protected memory.
This is often an indication that other memory is corrupt. at Python.Runtime.Runtime.PyGIL State Ensure()
at Python.Runtime.PythonEngine. AcquireLock()
at Python.Runtime.Py.GILState..ctor()
at Python Runtime.Py.GIL()
at Python Runtime.PythonEngine Shutdown()
at Python.Runtime.PythonEngine.OnProcessExit(Object, EventArgs)
released from the same thread that acquired it.
Unhandled Exception: System.InvalidOperationException: GIL must always be released, and it must be
at Python.Runtime.Py GILState.Finalize()
All reactions