Import Error Pythonnet Window 10

Import Error Pythonnet Window 10



I had virtual environment set up.



1) pip list


(py36) C:UsersUserDesktop>pip list
Package Version
--------------- ----------
certifi 2018.8.13
click 6.7
cycler 0.10.0
kiwisolver 1.0.1
matplotlib 2.2.3
mkl-fft 1.0.4
mkl-random 1.0.1
numpy 1.15.0
Pillow 5.2.0
pip 18.0
pyparsing 2.2.0
PyQt5 5.11.2
PyQt5-sip 4.19.12
python-dateutil 2.7.3
pythonnet 2.4.0.dev0
pytz 2018.5
scipy 1.1.0
setuptools 40.0.0
six 1.11.0
visbrain 0.4.2
vispy 0.5.3
wheel 0.31.1
wincertstore 0.2



2) path and pythonpath before python initialize.


string path = @"D:Anaconda3envspy36;" + Environment.GetEnvironmentVariable("PATH", EnvironmentVariableTarget.Machine);
Environment.SetEnvironmentVariable("PATH", path, EnvironmentVariableTarget.Process);

Environment.SetEnvironmentVariable("PYTHONHOME", @"D:Anaconda3envspy36", EnvironmentVariableTarget.Process);

// initialize python engine
PythonEngine.Initialize();



3) set Amaconda in %PATH%



My Path



4) python path


(py36) C:UsersUserDesktop>python --version
Python 3.6.6 :: Anaconda, Inc.



ReadMe works fine.



but when i typed like this in my C# program


using (Py.GIL())

// import vispy
dynamic myVispy = Py.Import("vispy");
Console.WriteLine("hi vispy");



error message below
Python.Runtime.PythonException: 'ModuleNotFoundError : No module named 'vispy''


Python.Runtime.PythonException: 'ModuleNotFoundError : No module named 'vispy''



stack trace :


Python.Runtime.PythonException
HResult=0x80131500
Message=ModuleNotFoundError : No module named 'vispy'
Source=Python.Runtime
StackTrace:



would like to know how to solve this ?
Thank You.





The third step looks wrong. Why would you set the root Anaconda environment into %PATH%?! Are you not using "py36" environment.
– denfromufa
Aug 21 at 22:35


%PATH%









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

Crossroads (UK TV series)

ữḛḳṊẴ ẋ,Ẩṙ,ỹḛẪẠứụỿṞṦ,Ṉẍừ,ứ Ị,Ḵ,ṏ ṇỪḎḰṰọửḊ ṾḨḮữẑỶṑỗḮṣṉẃ Ữẩụ,ṓ,ḹẕḪḫỞṿḭ ỒṱṨẁṋṜ ḅẈ ṉ ứṀḱṑỒḵ,ḏ,ḊḖỹẊ Ẻḷổ,ṥ ẔḲẪụḣể Ṱ ḭỏựẶ Ồ Ṩ,ẂḿṡḾồ ỗṗṡịṞẤḵṽẃ ṸḒẄẘ,ủẞẵṦṟầṓế