What is the difference between / usr / lib / python and / usr / lib64 / python?

I used ubuntu.

I found that many Python libraries are installed both in /usr/lib/python and /usr/lib64/python .

When I print the module object, the module path showed that the module lived in /usr/lib/python .

Why do we need the /usr/lib64/python directory then? What is the difference between the two directories?

BTW

Some of the script and egg-info package controls that lived in both directories are actually package links in /usr/share .

Most Python modules are just links, but so files are not.

+4
source share
2 answers

64-bit libraries?

What version of Python are you using? If you are using the 32-bit version, you probably will not need these files.

+3
source

Debian (and probably its derivatives, primarily ubuntu) uses / usr / lib for both architectures. / usr / lib 64 is provided as a symbolic link to / usr / lib for compatibility reasons. Some newer applications may look in / usr / lib 64 for libraries, while some legacy codes may use / usr / lib. Other distributions can provide support for several architectures that have 32-bit and 64-bit libraries installed on the same computer, which will then be placed in / usr / lib and / usr / lib64, respectively. An example of this is Arch Linux, as described here .

Some python libraries are platform independent in any case (.py code), so it makes sense to create a single package for both architectures to minimize maintenance efforts. Then this package will be installed both in lib and in lib64 or, as you have already indicated, in one directory, which is symbolically associated with lib and lib64.

+4
source

All Articles