Environment :
- Pythonnet version: 2.3.0, installed with pip in Amaconda3
- Python version: 3.6.6 using with Anaconda
- Visual Studio 2017 Community
- Operating System: Windows 7, 64 bit
I am running Visbrain module by Pythonnet. I had create a virtual environment named py36 in Anaconda 3. Anaconda 3 is in D drive. Trying to run below code in my c# program.
using (Py.GIL())
{
dynamic np = Py.Import("visbrain");
}
But it pops out an error which is
Python.Runtime.PythonException: 'ModuleNotFoundError : No module named 'visbrain''
stack trace :
Python.Runtime.PythonException
HResult=0x80131500
Message=ModuleNotFoundError : No module named 'visbrain'
Source=Python.Runtime
StackTrace:
i had visbrain under Lib\site-packages.
Tried Solution but did not success:
1) add PATH, PYTHONHOME in environment variable. PATH : D:\Anaconda3\envs\py36; PYTHONHOME : D:\Anaconda3\envs\py36;
2) pythonnet Embedding Python in .net example failing to load module added PYTHONPATH : D:\Anaconda3\envs\py36\Lib\site-packages;
===
i am strange that "numpy" module is also inside of the Lib\site-packages.
when i tried below example
dynamic np = Py.Import("numpy");
It is fine.
Would like to know what is the issue here and how to solve this, thank you.