I believe I have successfully configured mod_wsgi with the conda evironment 'MMDBpy', as it works with the HelloWorld.wsgi on the docs and the python paths line up. I am having an issue however with using a .wsgi file to import my flask app built using Python Dash.
My Dash app works locally when run from Spyder on the environment. I am looking to host this app on https on localhost apache with a self-signed certificate (Not the usual workflow I know but it suits my purposes)
Initially apache would throw "No module caled xxx" when I tried to import the application from my scripts in the same folder as the .wsgi script, so I then moved the scripts to a folder in the environment directory, which is already on the path from the .wsgi test file from the docs. This allows the .wsgi file to start my dash script, but throws an error importing Numpy as a Pandas Depenency. Both Numpy and Pandas are up to date on Conda so I am stuck.
I tried the advice in the link given in the error but numpy seem to blame the installation method - any help would be much appreciated!
[Tue Jan 12 16:13:43.463252 2021] [wsgi:info] [pid 7704:tid 1304] [client ::1:50226] mod_wsgi (pid=7704, process='', application=''): Loading Python script file 'C:/wamp64/https_www/MMDBpy.wsgi'., referer:
https://localhost/[Tue Jan 12 16:13:43.475240 2021] [wsgi:error] [pid 7704:tid 1304] [client ::1:50226] mod_wsgi (pid=7704): Failed to exec Python script file 'C:/wamp64/https_www/MMDBpy.wsgi'., referer:
https://localhost/[Tue Jan 12 16:13:43.476240 2021] [wsgi:error] [pid 7704:tid 1304] [client ::1:50226] mod_wsgi (pid=7704): Exception occurred processing WSGI script 'C:/wamp64/https_www/MMDBpy.wsgi'., referer:
https://localhost/[Tue Jan 12 16:13:43.476240 2021] [wsgi:error] [pid 7704:tid 1304] [client ::1:50226] Traceback (most recent call last):\r, referer:
https://localhost/[Tue Jan 12 16:13:43.477239 2021] [wsgi:error] [pid 7704:tid 1304] [client ::1:50226] File "C:/wamp64/https_www/MMDBpy.wsgi", line 1, in <module>\r, referer:
https://localhost/[Tue Jan 12 16:13:43.477239 2021] [wsgi:error] [pid 7704:tid 1304] [client ::1:50226] from MMDBA_Scripts.Dash_Server_Host import app as application\r, referer:
https://localhost/[Tue Jan 12 16:13:43.477239 2021] [wsgi:error] [pid 7704:tid 1304] [client ::1:50226] File "C:\\Users\\Constantin\\anaconda3\\envs\\MMDBpy\\MMDBA_Scripts\\Dash_Server_Host.py", line 29, in <module>\r, referer:
https://localhost/[Tue Jan 12 16:13:43.477239 2021] [wsgi:error] [pid 7704:tid 1304] [client ::1:50226] import pandas as pd\r, referer:
https://localhost/[Tue Jan 12 16:13:43.477239 2021] [wsgi:error] [pid 7704:tid 1304] [client ::1:50226] File "C:\\Users\\Constantin\\anaconda3\\envs\\MMDBpy\\lib\\site-packages\\pandas\\__init__.py", line 16, in <module>\r, referer:
https://localhost/[Tue Jan 12 16:13:43.477239 2021] [wsgi:error] [pid 7704:tid 1304] [client ::1:50226] raise ImportError(\r, referer:
https://localhost/[Tue Jan 12 16:13:43.477239 2021] [wsgi:error] [pid 7704:tid 1304] [client ::1:50226] ImportError: Unable to import required dependencies:\r, referer:
https://localhost/[Tue Jan 12 16:13:43.477239 2021] [wsgi:error] [pid 7704:tid 1304] [client ::1:50226] numpy: \r, referer:
https://localhost/[Tue Jan 12 16:13:43.477239 2021] [wsgi:error] [pid 7704:tid 1304] [client ::1:50226] \r, referer:
https://localhost/[Tue Jan 12 16:13:43.477239 2021] [wsgi:error] [pid 7704:tid 1304] [client ::1:50226] IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!\r, referer:
https://localhost/[Tue Jan 12 16:13:43.477239 2021] [wsgi:error] [pid 7704:tid 1304] [client ::1:50226] \r, referer:
https://localhost/[Tue Jan 12 16:13:43.477239 2021] [wsgi:error] [pid 7704:tid 1304] [client ::1:50226] Importing the numpy C-extensions failed. This error can happen for\r, referer:
https://localhost/[Tue Jan 12 16:13:43.477239 2021] [wsgi:error] [pid 7704:tid 1304] [client ::1:50226] many reasons, often due to issues with your setup or how NumPy was\r, referer:
https://localhost/[Tue Jan 12 16:13:43.477239 2021] [wsgi:error] [pid 7704:tid 1304] [client ::1:50226] installed.\r, referer:
https://localhost/[Tue Jan 12 16:13:43.477239 2021] [wsgi:error] [pid 7704:tid 1304] [client ::1:50226] \r, referer:
https://localhost/[Tue Jan 12 16:13:43.477239 2021] [wsgi:error] [pid 7704:tid 1304] [client ::1:50226] We have compiled some common reasons and troubleshooting tips at:\r, referer:
https://localhost/[Tue Jan 12 16:13:43.477239 2021] [wsgi:error] [pid 7704:tid 1304] [client ::1:50226] \r, referer:
https://localhost/[Tue Jan 12 16:13:43.477239 2021] [wsgi:error] [pid 7704:tid 1304] [client ::1:50226] \r, referer:
https://localhost/[Tue Jan 12 16:13:43.477239 2021] [wsgi:error] [pid 7704:tid 1304] [client ::1:50226] Please note and check the following:\r, referer:
https://localhost/[Tue Jan 12 16:13:43.478238 2021] [wsgi:error] [pid 7704:tid 1304] [client ::1:50226] \r, referer:
https://localhost/[Tue Jan 12 16:13:43.478238 2021] [wsgi:error] [pid 7704:tid 1304] [client ::1:50226] * The Python version is: Python3.8 from "C:\\wamp64\\bin\\apache\\apache2.4.46\\bin\\httpd.exe"\r, referer:
https://localhost/[Tue Jan 12 16:13:43.478238 2021] [wsgi:error] [pid 7704:tid 1304] [client ::1:50226] * The NumPy version is: "1.19.2"\r, referer:
https://localhost/[Tue Jan 12 16:13:43.478238 2021] [wsgi:error] [pid 7704:tid 1304] [client ::1:50226] \r, referer:
https://localhost/[Tue Jan 12 16:13:43.478238 2021] [wsgi:error] [pid 7704:tid 1304] [client ::1:50226] and make sure that they are the versions you expect.\r, referer:
https://localhost/[Tue Jan 12 16:13:43.478238 2021] [wsgi:error] [pid 7704:tid 1304] [client ::1:50226] Please carefully study the documentation linked above for further help.\r, referer:
https://localhost/[Tue Jan 12 16:13:43.478238 2021] [wsgi:error] [pid 7704:tid 1304] [client ::1:50226] \r, referer:
https://localhost/[Tue Jan 12 16:13:43.478238 2021] [wsgi:error] [pid 7704:tid 1304] [client ::1:50226] Original error was: DLL load failed while importing _multiarray_umath: The specified module could not be found.\r, referer:
https://localhost/[Tue Jan 12 16:13:43.478238 2021] [wsgi:error] [pid 7704:tid 1304] [client ::1:50226] \r, referer:
https://localhost/sys.path = ['C:\\Users\\Constantin\\anaconda3\\envs\\MMDBpy\\python38.zip', 'C:\\Users\\Constantin\\anaconda3\\envs\\MMDBpy\\DLLs', 'C:\\Users\\Constantin\\anaconda3\\envs\\MMDBpy\\lib', 'C:\\wamp64\\bin\\apache\\apache2.4.46\\bin', 'C:\\Users\\Constantin\\anaconda3\\envs\\MMDBpy', 'C:\\Users\\Constantin\\anaconda3\\envs\\MMDBpy\\lib\\site-packages', 'C:\\Users\\Constantin\\anaconda3\\envs\\MMDBpy\\lib\\site-packages\\win32', 'C:\\Users\\Constantin\\anaconda3\\envs\\MMDBpy\\lib\\site-packages\\win32\\lib', 'C:\\Users\\Constantin\\anaconda3\\envs\\MMDBpy\\lib\\site-packages\\Pythonwin']