gerip.blogg.se

Packages in python
Packages in python











packages in python

The layout is irrelevant, it’s just a directory of importable code. In the first case, I’d say you want your link to the system Python to include a PYTHONPATH setting to an arbitrary directory that you control where you put your packages. Does this mean that if I have a Spack environment (in its “unique installation prefix”) and add Python to it, it may just link in my system install? If I then add a package written in Python, do I have to launch Python through the Spack environment in order to access that package? Or can I launch the system install directly to get it? Spack supports reusing system installations of Python (built with apt, yum, conda, etc.).

packages in python

Note: I originally opened this question on the setuptools GitHub but it seems like this question is better asked to the broader community. Is this how these installation methods make the decision? How do these installation methods decide whether to use purelib or platlib? So far the most reliable method I’ve found is to query _python_lib(.) (deprecated) or sysconfig.get_path(.). installer: python -c 'import installer installer.install(.)'.setuptools: legacy python setup.py install (deprecated).distutils: legacy python setup.py install (deprecated).My question is, when installing a Python library, how does the site-packages directory get decided? Does it depend on the installation method? For example, do all of the following make the same decisions: We would like to know this directory ahead of time so that we can set PYTHONPATH appropriately. lib/python/site-packages on macOS with framework Python.

packages in python

  • lib/pythonX/dist-packages on Debian/Ubuntu with system Python.
  • lib64/pythonX.Y/site-packages on RHEL/CentOS/Fedora with system Python.
  • lib/pythonX.Y/site-packages on most POSIX systems.
  • When dealing with Python installations, we’ve noticed that third-party Python libraries may be installed in one of several directories: Spack is similar to Conda in the sense that it can install both Python and non-Python libraries, and similar to Nix in the sense that each package is installed to a unique installation prefix. I’m a developer for the Spack package manager.













    Packages in python