ubuntu 14.04]$ sudo aa-complain
Traceback (most recent call last):
File "/usr/sbin/aa-complain", line 17, in <module>
import apparmor.tools
ImportError: No module named apparmor.tools
I tried 2ways to install apparmor (apt-get case and 'make install' case)
For apt-get case, I found apparmor-python related .deb packages in /var/cache/apt/archives
and found python modules are installed in /usr/lib/python3/dist-packages/apparmor/tools.py
For 'make install' case, /usr/lib/python2.7/site-packages/apparmor/tools.py
This seems to be cause of "Import Error: No module named apparmor.tools"
When I copied it manually to /usr/lib/python2.7/dist-packages/apparmor/tools.py, it worked ok
Apparmor/utils/python-tools-setup.py imports distutils.command.install.py and it copies to relevant paths.
So README file in apparmor source packages needs newer version.
ubuntu 14.04]$ sudo aa-complain aa-complain" , line 17, in <module>
Traceback (most recent call last):
File "/usr/sbin/
import apparmor.tools
ImportError: No module named apparmor.tools
I tried 2ways to install apparmor (apt-get case and 'make install' case) apt/archives python3/ dist-packages/ apparmor/ tools.py
For apt-get case, I found apparmor-python related .deb packages in /var/cache/
and found python modules are installed in /usr/lib/
apparmor- profiles_ 2.8.95~ 2430-ubuntu5. 3_all.deb utils_2. 8.95~2430- 0ubuntu5. 1_i386. deb apparmor_ 2.8.95~ 2430-0ubuntu5. 1_i386. deb libapparmor_ 2.8.95~ 2430-0ubuntu5. 1_i386. deb
apparmor-
python3-
python3-
$ dpkg --contents python3- apparmor_ 2.8.95~ 2430-0ubuntu5. 1_i386. deb python3/ dist-packages/ python3/ dist-packages/ apparmor/ logparser. py
./usr/lib/
./usr/lib/
$ dpkg --contents python3- libapparmor_ 2.8.95~ 2430-0ubuntu5. 1_i386. deb python3/ dist-packages/ LibAppArmor- 2.8.95. egg-info python3/ dist-packages/ LibAppArmor/
./usr/lib/
./usr/lib/
For 'make install' case, /usr/lib/ python2. 7/site- packages/ apparmor/ tools.py python2. 7/dist- packages/ apparmor/ tools.py, it worked ok utils/python- tools-setup. py imports distutils. command. install. py and it copies to relevant paths.
This seems to be cause of "Import Error: No module named apparmor.tools"
When I copied it manually to /usr/lib/
Apparmor/
So README file in apparmor source packages needs newer version.