Rocksolid Light

Welcome to Rocksolid Light

mail  files  register  newsreader  groups  login

Message-ID:  

Portability should be the default. -- Larry Wall in <199711072201.OAA01123@wall.org>


devel / comp.lang.python / Changing path to python in pip.exe, ipython.exe, etc

SubjectAuthor
o Changing path to python in pip.exe, ipython.exe, etcOlivier B.

1
Changing path to python in pip.exe, ipython.exe, etc

<mailman.0.1714054420.3326.python-list@python.org>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=25685&group=comp.lang.python#25685

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: perso.olivier.barthelemy@gmail.com (Olivier B.)
Newsgroups: comp.lang.python
Subject: Changing path to python in pip.exe, ipython.exe, etc
Date: Thu, 25 Apr 2024 16:13:26 +0200
Lines: 22
Message-ID: <mailman.0.1714054420.3326.python-list@python.org>
References: <CA+cSArirBGanhDoD5=z21RVP5F8sh-MA9H5GtCeprzRXzCTJbw@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Trace: news.uni-berlin.de u+C5OrsVWgczO5ocWJjcCAmlud6kdwbxgczicA6lQYqQ==
Cancel-Lock: sha1:6Qeu0Zsbeo2Hpz5hxKn9y3S4FQw= sha256:DXMnjt/HLk+p6pcZC1epnbnRWQtZ0pQkBwOScmz53TU=
Return-Path: <perso.olivier.barthelemy@gmail.com>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=pass
reason="2048-bit key; unprotected key"
header.d=gmail.com header.i=@gmail.com header.b=EmDsoBPt;
dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.001
X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'generated': 0.03; 'pip':
0.04; 'subject:python': 0.06; 'linux,': 0.07; 'scripts.': 0.07;
'compressed': 0.09; 'machines,': 0.09; 'command.': 0.16; 'exe':
0.16; 'executables,': 0.16; 'installed.': 0.16; 'ipython,': 0.16;
'jupyter': 0.16; 'jupyter,': 0.16; 'pip,': 0.16; 'them?': 0.16;
'python': 0.16; 'probably': 0.17; 'to:addr:python-list': 0.20;
'issue': 0.21; 'creates': 0.22; 'install': 0.23; 'etc': 0.28;
'example,': 0.28; 'environment': 0.29; 'module': 0.31; 'assume':
0.32; 'else,': 0.32; 'structure': 0.32; 'message-
id:@mail.gmail.com': 0.32; 'there': 0.33; 'path': 0.33; 'windows':
0.34; 'able': 0.34; 'same': 0.34; 'received:google.com': 0.34;
'final': 0.35; 'from:addr:gmail.com': 0.35; 'those': 0.36; 'way':
0.38; 'similar': 0.65; 'tool': 0.65; 'relevant': 0.73; 'sources':
0.75; 'deployed': 0.84
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20230601; t=1714054418; x=1714659218; darn=python.org;
h=to:subject:message-id:date:from:mime-version:from:to:cc:subject
:date:message-id:reply-to;
bh=+w1DXnvIMvLRQvntmIolx3J/epUCmWGcxuEdj7BMadQ=;
b=EmDsoBPtOqDyCY3ZGFWS5PJPfUuEVMvaHLoU4zPeObDlPSSBpPtuGlJVj33V0QfMsw
XewbpfAprkgB+Lub0X+DAHOQfGHwLJFQk9N9nPKZ4QCQ+SzYDFQ8rbOKOt9rC4vSIu40
Qu3LxfPSNTqg0chIQB+VmGM7pDt0dNO+bH9HblQGpw5P4aCUgUdSZqsGdfuCyFAsw09L
duIG5yKKzW3K+4r/4adWXgAVTc/3KtO9FG8Zsh6TTQhHjFxx+x1VBBa2YcQdmx7mCaMK
nhL6gVXuMycPuBz68FD63KPCX1p4ocmwDIU1TfLnlICLjZHBNAawMSS/zJAt0th9b4wT
2YPw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1714054418; x=1714659218;
h=to:subject:message-id:date:from:mime-version:x-gm-message-state
:from:to:cc:subject:date:message-id:reply-to;
bh=+w1DXnvIMvLRQvntmIolx3J/epUCmWGcxuEdj7BMadQ=;
b=PLtCydUX011nOAMXaOWLmIzJvwrN9kQsAPQxPt7o+gKrSSoSMfkjdrPf/oeW1VRD2C
PqaXVXFFUxNFZ4470izt1iRtavVxQuo8XjrTK5579PpkyDwuJZHyV9HEqUJp/PDiqRV9
q84+ZZMT9LnN0KLCXzcLcP6h1jw27WnYZ3vfwyn7/mDjRc1zktfvT7vDLj3FVPy7Jtto
lW9cmpswx7vbZIb+aqsNA8ro1Lmn/aV2O40bsGQyRWe7jdd3uK2uho+OW//WF8Bg/vrp
L922LL1LTxWvVBrN8YEuycnJdNNSlaRIDxddWCIJxDBBMVx/tGAuorQULQrU2sqV+Y+8
Rfzw==
X-Gm-Message-State: AOJu0Ywcymf6M2GAJdjEpIxvzR0PuLNUyM6/HasT/jv1cuS3T0zJ+JtC
esyJaGDdauw/QIDwRi1+yMblj3sVtL318kSvDcu3t2Sw6oyF2lFyqO02u5XF8nYnzLyFiOFEi8B
teCqyznfKSD+BjLKOR621jmxcEVSIMeU0
X-Google-Smtp-Source: AGHT+IHWpM3Qk3kQUys23P7Yg2/iuRGHOCSmizflMC+KpGnbSdgZJcasF2OJHnHdtXzxFOdmMF6g+bz51ly2ufl7PEs=
X-Received: by 2002:a17:906:d794:b0:a58:7fa5:811f with SMTP id
pj20-20020a170906d79400b00a587fa5811fmr3582944ejb.69.1714054417993; Thu, 25
Apr 2024 07:13:37 -0700 (PDT)
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <CA+cSArirBGanhDoD5=z21RVP5F8sh-MA9H5GtCeprzRXzCTJbw@mail.gmail.com>
 by: Olivier B. - Thu, 25 Apr 2024 14:13 UTC

I am building a python work environment where
- i build python from sources
- install pip with the wheel bundled with python
- then install things with pip, like Jupyter

That environment is then deployed on various machines, at various
installation folders.

One issue I encounter, is the path to python in scripts like pip,
ipython, jupyter, etc is the original path where python is installed.
On linux, i can just do some sed in the problematic scripts.
On windows however, those scripts are python embedded in an EXE.
Probably generated by the same tool, as they all have a similar size
and a structure of an exe that contains a compressed __main__.py that
launch the relevant python module for the command.

What is the tool that creates those executables, and is there a way to
regenerate them from the python that has been deployed somewhere else,
so they point to the correct final path to python on that machine?
Since pip is able to create ipython.exe with path to my python
embedded for example, i assume i already have all i need in my python
installation to regenerate them?

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor