You are not logged in.
policyd-spf is throwing errors after yesterday's python upgrades. There was a big update of multiple python packages including python (3.6.6-1 -> 3.7.0-3). I reinstalled policyd-spf and python-pyspf from AUR thinking maybe those needed to be rebuilt, but the same "ModuleNotFoundError" persists. I also rebuilt python-postfix-policyd-spf to no avail. The problem seems to be specific to the python 3.7.0-3 upgrade.
Dependencies
python-pydns 3.2.0-1
python-pyspf 2.0.12-1
$ /usr/bin/python --version; /usr/bin/policyd-spf
Python 3.7.0
Traceback (most recent call last):
File "/usr/bin/policyd-spf", line 39, in <module>
import spf
ModuleNotFoundError: No module named 'spf'
Well, python-postfix-policyd-spf was definitely working fine with Python 3.6.6-1, so what I also did was install python36 3.6.6-1 from AUR, but pointing policyd-spf to this version still makes no difference.
$ /usr/bin/python3.6 /usr/bin/policyd-spf
Traceback (most recent call last):
File "/usr/bin/policyd-spf", line 39, in <module>
import spf
File "/usr/lib/python3.6/site-packages/spf.py", line 128, in <module>
import DNS # http://pydns.sourceforge.net
ModuleNotFoundError: No module named 'DNS'
$ python3.6
Python 3.6.6 (default, Aug 7 2018, 03:32:18)
[GCC 8.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import spf
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.6/site-packages/spf.py", line 128, in <module>
import DNS # http://pydns.sourceforge.net
ModuleNotFoundError: No module named 'DNS'
Offline
The import of spf succeeds on my system with the current version of python, python-postfix-policyd-spf, python-pydns and python-pyspf.
Check the output of pacman -Ql python-pyspf to make sure that it is installed under /usr/lib/python3.7 as expected.
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
Thank you very much for the suggestion. Oddly enough completely uninstalling then reinstalling python-postfix-policyd-spf, python-pydns and python-pyspf still resulted in python-pyspf installing to /usr/lib/python3.6 instead of /usr/lib/python3.7. Before this, I went ahead and removed AUR package python36 so that only python37 is on the system, then installed python-pyspf which still did not go into /usr/lib/python3.7 like it should have.
What I did instead was slightly modify the PKGBUILD to point to the python3.7 binary even though /usr/bin/python is already version 3.7 so it seems a bit redundant, yet made python-pyspf correctly install to /usr/lib/python3.7.
20c20
< python setup.py build
---
> python3.7 setup.py build
29c29
< python setup.py install --root="$pkgdir" --optimize=1
---
> python3.7 setup.py install --root="$pkgdir" --optimize=1
I'm still not entirely sure why it seems like some sort of "cache" is remembering the former path and not updating to the new library 3.7 path where rebuilt packages like python-pyspf should be installing to.
Thanks again!
Offline
policyd-spf is throwing errors after yesterday's python upgrades. There was a big update of multiple python packages including python (3.6.6-1 -> 3.7.0-3). I reinstalled policyd-spf and python-pyspf from AUR thinking maybe those needed to be rebuilt, but the same "ModuleNotFoundError" persists. I also rebuilt python-postfix-policyd-spf to no avail. The problem seems to be specific to the python 3.7.0-3 upgrade.
Did you actually rebuild them or did you accidentally reinstall the previously built python 3.6 version from a $PKGDEST cache?
pacman -Qi python-pyspf # what's the build date
EDIT: oh, I see. Well, since you definitely rebuilt it, maybe you should ask what `type -a python` resolves to -- if it is something other than /usr/bin/python then that's obviously not good.
Last edited by eschwartz (2018-08-08 01:36:14)
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
Doing `type -a python` resolves to the python symlinks pointing to python3 (3.7.0) as expected. Being that 3.6 isn't even installed, but the 3.6 paths still exist, I'm not entirely why /usr/lib/python3.7 doesn't take precedence over the former 3.6 paths.
Offline
Completely remove python-postfix-policyd-spf with
$yaourt -Rdns python-postfix-policyd-spf
Then reinstall python-postfix-policyd-spf solved the problem for me.
Offline
This broke my mail server, so annoying
However:
Completely remove python-postfix-policyd-spf with
$yaourt -Rdns python-postfix-policyd-spf
Then reinstall python-postfix-policyd-spf solved the problem for me.
Did fixed the path to python 3.7.
Thanks for this thread!
Offline
I am late to the party, I just disabled spf for the time being, but now I read this and would like to fix the error. I did remove the packages with `aurman -Rdns python-postfix-policyd-spf` and reinstalled them, but this did not fix my problem. How do I fix the path?
EDIT: Nvm, I got it....
$ aurman -Rdns python-postfix-policyd-spf
$ aurman -S --rebuild python-postfix-policyd-spf
Last edited by Ztjuh (2018-08-20 08:47:14)
Offline