<html style="direction: ltr;">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style id="bidiui-paragraph-margins" type="text/css">body p { margin-bottom: 0cm; margin-top: 0pt; } </style>
</head>
<body bidimailui-charset-is-forced="true" style="direction: ltr;">
<p><font face="FreeSans">Another option is Nix, which with some
effort can be installed in Ubuntu and can provide you with
different environments for many languages. You can use it to
create as many python installations as you want.<br>
</font></p>
<p><font face="FreeSans"></font><br>
</p>
<div class="moz-cite-prefix">On 22/07/2021 20:05, Dan Yasny wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CALLXwb6_+ScrFd4vTEoT=BwYsxz7Rmvk9Ckk-t1H_xokPqZmxQ@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div dir="ltr"><br>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Thu, Jul 22, 2021 at
12:51 PM Shlomo Solomon <<a
href="mailto:shlomo.solomon@gmail.com"
moz-do-not-send="true">shlomo.solomon@gmail.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">I guess I don't
completely understand the concept after all. If I setup<br>
a virtual environment for 3.9.6, how would it "know" that
modules are<br>
installed in the 3.8 directory? As I wrote in my original
post, without<br>
a virtual environment, in 3.9.6 I get:<br>
<br>
>>> import scapy <br>
Traceback (most recent call last):<br>
File "<stdin>", line 1, in <module><br>
ModuleNotFoundError: No module named 'scapy'<br>
<br>
but the module does exist in 3.8:<br>
<br>
sudo pip3 install scapy<br>
Requirement already satisfied: scapy in<br>
/usr/local/lib/python3.8/dist-packages (2.4.4)<br>
<br>
<br>
So how do I tell the 3.9.6 environment to look for modules
in the 3.8<br>
directory?<br>
</blockquote>
<div><br>
</div>
<div>You don't, that's the whole point of venv - you have a
separate set of modules in each environment, specific to
it's version. <br>
<br>
There's the site-packages argument of course, but it's far
from being best-practice. </div>
<div><br>
</div>
<div> </div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
<br>
<br>
<br>
<br>
<br>
<br>
On Thu, 22 Jul 2021 12:41:41 -0400<br>
Dan Yasny <<a href="mailto:dyasny@gmail.com"
target="_blank" moz-do-not-send="true">dyasny@gmail.com</a>>
wrote:<br>
<br>
> why reinstall? Keep your versions venvs in place and
hop in/out<br>
> <br>
> <br>
> On Thu, Jul 22, 2021 at 12:37 PM Shlomo Solomon<br>
> <<a href="mailto:shlomo.solomon@gmail.com"
target="_blank" moz-do-not-send="true">shlomo.solomon@gmail.com</a>>
wrote:<br>
> <br>
> > Omer Zak <<a href="mailto:w1@zak.co.il"
target="_blank" moz-do-not-send="true">w1@zak.co.il</a>>
wrote:<br>
> > > The answer to your prayers is pyenv.<br>
> > > It allows you to install multiple Python
versions in parallel,<br>
> > > and for each version you can maintain several
virtualenvs.<br>
> ><br>
> > Dan Yasny <<a href="mailto:dyasny@gmail.com"
target="_blank" moz-do-not-send="true">dyasny@gmail.com</a>>
wrote:<br>
> > > How about using virtualenv for alternative
versions?<br>
> ><br>
> ><br>
> > Yes, I know about pyenv and virtualenv, but
wouldn't I have to<br>
> > re-install modules for each version/environment?
That's what I'm<br>
> > trying to avoid.<br>
> ><br>
> ><br>
> > --<br>
> > Shlomo Solomon<br>
> > <a href="http://the-solomons.net"
rel="noreferrer" target="_blank" moz-do-not-send="true">http://the-solomons.net</a><br>
> > Claws Mail 3.17.5 - KDE Plasma 5.18.5 - Kubuntu
20.04<br>
> ><br>
<br>
<br>
<br>
-- <br>
Shlomo Solomon<br>
<a href="http://the-solomons.net" rel="noreferrer"
target="_blank" moz-do-not-send="true">http://the-solomons.net</a><br>
Claws Mail 3.17.5 - KDE Plasma 5.18.5 - Kubuntu 20.04<br>
</blockquote>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
Linux-il mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Linux-il@cs.huji.ac.il">Linux-il@cs.huji.ac.il</a>
<a class="moz-txt-link-freetext" href="http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il">http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il</a>
</pre>
</blockquote>
</body>
</html>