Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

follow the steps or example but crash #6

Closed
maochaokuo opened this issue Jul 16, 2019 · 16 comments
Closed

follow the steps or example but crash #6

maochaokuo opened this issue Jul 16, 2019 · 16 comments

Comments

@maochaokuo
Copy link

Hi there:

I try to clone this repository, or follow the steps from readme.md. They both crash with the following messages:

C:\Program Files\dotnet\dotnet.exe (process 8912) exited with code -1073741795.
To automatically close the console when debugging stops, enable Tools->Options->Debugging->Automatically close the console when debugging stops.
Press any key to close this window . . .

Is there any further hint for me to resolve it? Thanks

@deepakkumar1984
Copy link
Member

Which example project you running? Can you please take the latest and run the basic example which should work fine.

@maochaokuo
Copy link
Author

maochaokuo commented Jul 17, 2019 via email

@henon
Copy link
Contributor

henon commented Jul 17, 2019

We know that Pythonnet (which we use to access Python) does not find Python with an Anaconda install. It works with a normal Python installation, that can be said.
If you could clone the Pythonnet repo from source and execute the example on their main readme you should get the same error. Then if you will, please try setting the path right until it works with Anaconda. We then have to discuss how to support Anaconda (automatically, or via manual steps).

@maochaokuo
Copy link
Author

No, I just clean my environment and reinstall Python 3.6.8. The problem is still the same.

@henon
Copy link
Contributor

henon commented Jul 17, 2019

does the sample from the pythonnet readme work for you? if not when you single step, where does it fail? what message?

@maochaokuo
Copy link
Author

maochaokuo commented Jul 18, 2019 via email

@deepakkumar1984
Copy link
Member

Can you try setting the Python.Runtime.PythonEngine.PythonPath and Python.Runtime.PythonEngine.PythonHome to the virtual env directory?

@maochaokuo
Copy link
Author

When I tried to set either one of the two variables, I got the following error:

Unable to load DLL 'python36' or one of its dependencies; The specified module could not be found.

@deepakkumar1984
Copy link
Member

I never tested with virtual environment, will give a try and let you know if its supported or not.

@adnanlanewla
Copy link

When I tried to set either one of the two variables, I got the following error:

Unable to load DLL 'python36' or one of its dependencies; The specified module could not be found.

I am getting the exact same error. Spent two days on trying to fix this error.

I set my PythonHome and PythonPath same as my anaconda virtual env (C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64)

@itzukah
Copy link

itzukah commented Aug 31, 2019

Same problem. I have already installed python3.6.8 win64 and python 3.7
image

image

@philvanzu
Copy link

Trying to load a trained keras model file to make predictions here.

I think I found a solution to make my miniconda environment work, but then I crash on the next line because Keras module is not found, I imagine that's because I installed tensorflow 2.0 rc1 in that environment and keras is no longer its own thing, it is tensorflow.keras now. Anyway the "Python36.dll not found" crash is resolved for me after this.

            string envPythonHome = "C:\\Users\\username\\Miniconda3\\envs\\tensorflow\\";
            string envPythonLib = envPythonHome + "Lib;" + envPythonHome + "Lib\\site-packages";
            Environment.SetEnvironmentVariable("PYTHONHOME", envPythonHome, EnvironmentVariableTarget.Process);
            Environment.SetEnvironmentVariable("PATH", envPythonHome + ";" + Environment.GetEnvironmentVariable("PATH", EnvironmentVariableTarget.Machine), EnvironmentVariableTarget.Process);
            Environment.SetEnvironmentVariable("PYTHONPATH", envPythonLib, EnvironmentVariableTarget.Process);

            PythonEngine.PythonHome = envPythonHome;
            PythonEngine.PythonPath = Environment.GetEnvironmentVariable("PYTHONPATH");`

I wonder if I should try to bypass keras.net and try my luck with pythonnet embedding. I would just have to execute a few python lines and the necessary imports.

@deepakkumar1984
Copy link
Member

Can I close this issue?

@philvanzu
Copy link

philvanzu commented Sep 27, 2019 via email

@deepakkumar1984
Copy link
Member

I know dear :), I was asking the original requester

@deepakkumar1984
Copy link
Member

Closing this issue, please reopen if still having the problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants