Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.maint.python > #12934

Re: Update PYTHONPATH after install

From Paul Wise <pabs@debian.org>
Newsgroups linux.debian.maint.python
Subject Re: Update PYTHONPATH after install
Date 2020-10-08 03:10 +0200
Message-ID <AXsBr-5uI-1@gated-at.bofh.it> (permalink)
References <AXsBs-5uI-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, Oct 7, 2020 at 5:56 PM Francis Murtagh wrote:

> My understanding of Debian policy means python3 modules should be installed in /usr/lib/python3/dist-packages/

Correct.

> Once the package installs there how is the PYTHONPATH meant to be updated so that user can import the module into the python3 interpreter?

This is not necessary...

> As the PYTHONPATH would normally look in /usr/local/ rather than /usr/lib/

... since the default import path includes /usr/lib:

$ unset PYTHONPATH
$ python3 -c 'import sys ; print("\n".join(sys.path))'

/usr/lib/python38.zip
/usr/lib/python3.8
/usr/lib/python3.8/lib-dynload
/usr/local/lib/python3.8/dist-packages
/usr/lib/python3/dist-packages
/usr/lib/python3.8/dist-packages

-- 
bye,
pabs

https://wiki.debian.org/PaulWise

Back to linux.debian.maint.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Update PYTHONPATH after install Paul Wise <pabs@debian.org> - 2020-10-08 03:10 +0200

csiph-web