[Slackbuilds-users] Python3 module installation issues

Ricardo J. Barberis ricardo at palmtx.com.ar
Sat Dec 26 21:08:49 UTC 2020

El Sábado 26/12/2020 a las 16:57, Rich Shepard escribió:
> Some of my python3 modules ended up in the python2.7/site-packages/
> directory rather than the python3.9/site-packages/ directory. I've started
> by removing, rebuilding, and re-installing all packages starting with
> Python3-3.9.1. I've found two issues:
> 1.) The SlackBuild script for Pygments-2.7.2 (and perhaps more packages)
> accommodates both python2 and python3. However, since Python2-2.7.17 is
> installed here the script installs Pygment there and ignores the Python3
> installation. I fixed this by commenting out the python2 setup.py command
> line.
> 2.) There are both /usr/lib/python3.9/site-packages/ and
> /usr/lib64/python3.9/site-packages. Pygments installed in the first one
> while Cython and PyQt5 (rebuilt and re-installed) are in the latter one.
> Since this is a x86_64 host I want all packages in /usr/lib64/ but find no
> way to specify this in the Pygments build script.
> How can I fix this and avoid future issues as I re-do Python3 and remove
> the Python2 modules as they reach EOL this coming Thursday and I don't need
> them?
> Regards,
> Rich

Hello Rich,

Pygments from SBo is installed here on Slackware64 -current, all of the files 
end up in /usr/lib64/python{2.7,3.9}, I don't even have any /usr/lib/python* 

To verifiy, I installed python3 and Pygments in a Slackware64 14.2 docker 
container, same result (except of course python being 3.7 instead of 3.9).

Have you installed something with pip3 perhaps? Or by hand?

Sometimes those usually end up under /usr/lib instead of /usr/lib64, AFAIK, 
though I couldn't reproduce it in a clean docker container with pip3.

Ricardo J. Barberis
Usuario Linux Nº 250625: http://counter.li.org/
Usuario LFS Nº 5121: http://www.linuxfromscratch.org/
Senior SysAdmin / IT Architect - www.DonWeb.com

More information about the SlackBuilds-users mailing list