Reputation: 2266
I've been trying to deploy my Python Flask App that uses Conv nets using Theano on local IIS. When I try to load a pickled Neural Network , I get following Errors
Unable to Create compiledir.
I solved this by changing compiledir path in configdefaults.py and giving read/write rights to IIS on that directory. Now compiledir gets created.
Now I'm getting MissingGXX error "g++ not available! We can't compile c code.". G++ is there in my PythonFolder\Scripts and I've added this path to my environmental variable PATH.
I just Want to know that what causes this error? Is it because Theano can't find g++ and it's all about path issues or it has something to do with compiledir lock
PS: I can run the code from my Winpython console and everything works fine. I've seen the contents of %PATH% and %PYTHONPATH% from my Win python console and replicated the same on my deployed IIS web App.
Here's the header of the stack trace :
(MissingGXX('The following error happened while compiling the node', Shape_i{0}(input.input), '\n', "g++ not available! We can't compile c code.", '[Shape_i{0}(input.input)]'), , (
Upvotes: 3
Views: 1259
Reputation: 2266
I've solved the problem , I had two g++ executables in my WinPython environment at following paths
Spyder used the correct one (2) and IIS seems to use the one mentioned in 1. I explicitly added path to 2 in my PATH env variable on IIS. Spyder didn't have 2 in PATH (that's strange) but it used the one mentioned in 2 (I confirmed that after logging in Theano files).
After this my MissingGxx error was gone but Now Theano was unable to create compilation directory because IIS uses System profile and Theano uses that profile to generate path to compile_dir , It was somewhere in C;|Windows|System32\config\SystemsProfile|Theano\compile_dir and IIS didn't have rights to it (Spyder uses my local USERPROFILE). I changed the default_base_compiledir path in Theano's configdefaults.py and gave IIS rights to access and modify it. I wasn't able to assign rights to previous compiledir in SystemsProfile beacause that location is pretty sensitive and OS restricted me to do so.
PS : I copied PATH by doing
echo %PATH%
from my WinPython console and concatenated g++ path mentioned at 2 with it and added to PATH variable on IIS because WinPython PATH variable didn't have 2 in it.
Upvotes: 1