EDIT: Nvm, I got it....
$ aurman -Rdns python-postfix-policyd-spf
$ aurman -S --rebuild python-postfix-policyd-spf
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!
]]>$yaourt -Rdns python-postfix-policyd-spf
Then reinstall python-postfix-policyd-spf solved the problem for me.
]]>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.
]]>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!
]]>Check the output of pacman -Ql python-pyspf to make sure that it is installed under /usr/lib/python3.7 as expected.
]]>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'