From mboxrd@z Thu Jan 1 00:00:00 1970 From: sirgazil Subject: How can I replace Python venv and pip with Guix? Date: Sun, 02 Feb 2020 18:00:33 -0500 Message-ID: <170082257a9.bbf196a73697.871070894081541659@zoho.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:44739) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iyOEN-0004IG-73 for help-guix@gnu.org; Sun, 02 Feb 2020 18:00:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iyOEL-0005m5-V0 for help-guix@gnu.org; Sun, 02 Feb 2020 18:00:43 -0500 Received: from sender4-pp-o91.zoho.com ([136.143.188.91]:25143) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iyOEL-0005jy-Lu for help-guix@gnu.org; Sun, 02 Feb 2020 18:00:41 -0500 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane-mx.org@gnu.org Sender: "Help-Guix" To: Guix Help Hi, I'm currently using two package managers when working on my projects writte= n in Python. I use Guix to install Python, and Python pip to install Python= packages in project environments created with Python venv. So, for working= on a specific project, I do the following: #+BEGIN_EXAMPLE # Create an environment (one-time operation) $ python3 -m venv ~/.virtualenvs/my-project # Activate the environment $ source ~/.virtualenvs/my-project/bin/activate (my-project) $ # Install packages in the environment (my-project) $ pip install -r packages.txt # Deactivate the environment (Ctrl+D) $ deactivate #+END_EXAMPLE Emacs Elpy detects the virtual environments I create in this way, so I can = activate and deactivate them from Emacs with an easy to use interface and h= ave code completion that depends on the packages available in the active en= vironment. I'd like to use Guix and its environments to replace this functionality and= to make my development environments easier to reproduce, but I don't under= stand how to that exactly. So far I have tried the "guix environment" command as follows, trying to cr= eate a persistent environment I can activate/deactivate whenever I want: #+BEGIN_EXAMPLE $ guix environment --pure --manifest=3Dguix.scm --root=3D/path/to/my-guix-e= nvs/my-project #+END_EXAMPLE After running that command, I can see the prompt adds a "[env]" label indic= ating that I'm in the environment, and I can use the packages specified in = the manifest file. But =E2=80=A2 How could one make the prompt add "[my-project]" instead of the g= eneric "[env]"? =E2=80=A2 Once I deactivate this environment (Ctrl+D), how can I activate i= t again? Thanks, --- https://sirgazil.bitbucket.io/