-
-
Notifications
You must be signed in to change notification settings - Fork 165
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
ModuleNotFoundError: No module named 'flask' on RHEL 8 #353
Comments
Update: If I set variable puppetboard::python_version: '3.6' then puppetboard does install properly and runs. The RedHat.8.yaml sets the python version to '3.8' and only when python is set to 3.6 does the virtual environment initialize properly. |
Same as #333? |
Yep, nearly identical. When I changed the Python version to 3.6 everything worked. I'll rebuild my VM with python 3.8 and post the errors. |
Hello everyone! I think I've chased down the issue here. Couple things to keep in mind:
So if you have a
Note that this module requires you to specify the Python version including the decimal point between major and minor release, but the RHEL packages do not have a decimal. The upshot of all this is that at first the modules don't even get installed in the virtual environment, and then if you fix the problem with the puppet-python package trying to install the wrong version, they are installed but don't work, because the mod_wsgi that's installed is looking for packages in the Python 3.6 paths (I got this error by making wsgi.py write out sys.path: |
Hello again, I've found a workaround for the "wrong mod_wsgi" issue: use Hiera to declare some class defaults for
...and now Puppet runs and sets up Puppetboard without issues. Note you do need both, if you try to specify just |
After days of attempting to solve the problem myself I'm forced to realize that I don't have the skills to debug Python or Apache.
On a brand new RHEL8 system with @minimal installed, I am unable to get Puppetboard installed properly due to an error about the flask module not being found.
Using a simple:
Apache barks with:
Now, Puppetboard does seem to install properly but it's the Python module (I hope I'm describing it properly) that's giving me trouble.
Apache is running, but I get the following from curl/browser:
A manual run of the WSGI yeilds:
It's been about four years since I've implemented a Puppet environment so I'm a bit rusty. I've tried the recommendations here:
voxpupuli/puppetboard#527
and here:
voxpupuli/puppetboard#582
but to no avail.
I've had even less success with RHEL7.
SELinux is off and the local firewall allows incoming TCP/80.
Here's my apache vhost config:
The text was updated successfully, but these errors were encountered: