unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Efraim Flashner <efraim@flashner.co.il>
To: phodina <phodina@protonmail.com>
Cc: "help-guix@gnu.org" <help-guix@gnu.org>
Subject: Re: Guix Jupyter notebook
Date: Sun, 25 Apr 2021 09:14:31 +0300	[thread overview]
Message-ID: <YIUIx5HJjPMZN6X/@3900XT> (raw)
In-Reply-To: <lSQbclHn0AdB7f5-2DN0we0WJYaMaf8kiKmkG6b3U3-G1Kc4gxNEM1BE4eIPdVpUYimwzu3jHiq49QVkTMWUJd-lTIc9imhv_KiO6kfCza8=@protonmail.com>

[-- Attachment #1: Type: text/plain, Size: 4867 bytes --]

On Sat, Apr 24, 2021 at 09:33:47AM +0000, phodina via wrote:
> I wanted to run a Jupyter notebook using Guix to define the inputs. However I run into an issue in python module. Could you help me with the DistributionNotFound error?
> 
> $ guix install jupyter guix-jupyter
> ...
> $ guix describe
> Generation 21	Apr 21 2021 10:14:08	(current)
>   guix 13c4a37
>     repository URL:
> https://git.savannah.gnu.org/git/guix.git
> branch: master
>     commit: 13c4a377f5a2e1240790679f3d5643385b6d7635
> $ jupyter notebook
> Traceback (most recent call last):
>   File "/gnu/store/sqml7rpr1zamp1llapd208dv2n34anh5-python-jupyter-core-4.7.1/bin/.jupyter-real", line 6, in <module>
>     from pkg_resources import load_entry_point
>   File "/gnu/store/w32f5mp0x0sklmkxkm3gbidanxxj05k8-python-3.8.2/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3251, in <module>
>     def _initialize_master_working_set():
>   File "/gnu/store/w32f5mp0x0sklmkxkm3gbidanxxj05k8-python-3.8.2/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3234, in _call_aside
>     f(*args, **kwargs)
>   File "/gnu/store/w32f5mp0x0sklmkxkm3gbidanxxj05k8-python-3.8.2/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3263, in _initialize_master_working_set
>     working_set = WorkingSet._build_master()
>   File "/gnu/store/w32f5mp0x0sklmkxkm3gbidanxxj05k8-python-3.8.2/lib/python3.8/site-packages/pkg_resources/__init__.py", line 583, in _build_master
>     ws.require(__requires__)
>   File "/gnu/store/w32f5mp0x0sklmkxkm3gbidanxxj05k8-python-3.8.2/lib/python3.8/site-packages/pkg_resources/__init__.py", line 900, in require
>     needed = self.resolve(parse_requirements(requirements))
>   File "/gnu/store/w32f5mp0x0sklmkxkm3gbidanxxj05k8-python-3.8.2/lib/python3.8/site-packages/pkg_resources/__init__.py", line 786, in resolve
>     raise DistributionNotFound(req, requirers)
> pkg_resources.DistributionNotFound: The 'six' distribution was not found and is required by traitlets
> 

I'm unable to reproduce this

(ins)efraim@3900XT ~/workspace/guix$ guix describe
Generation 19   Apr 25 2021 08:28:36    (current)
  guix 8380b16
    repository URL: https://git.savannah.gnu.org/git/guix.git
    branch: master
    commit: 8380b16a8a63eb1ed01cf9db1677e93aac8f3ae8
(ins)efraim@3900XT ~/workspace/guix$ guix environment -C -N --ad-hoc jupyter guix-jupyter -- jupyter notebook
[I 06:08:47.078 NotebookApp] Writing notebook server cookie secret to /home/efraim/.local/share/jupyter/runtime/notebook_cookie_secret
[I 06:08:47.222 NotebookApp] Serving notebooks from local directory: /home/efraim/workspace/guix
[I 06:08:47.222 NotebookApp] Jupyter Notebook 6.3.0 is running at:
[I 06:08:47.222 NotebookApp] http://localhost:8888/?token=52eaa1ab139b0ebbcc86e2f2939924eb706033ae2f5e9775
[I 06:08:47.222 NotebookApp]  or http://127.0.0.1:8888/?token=52eaa1ab139b0ebbcc86e2f2939924eb706033ae2f5e9775
[I 06:08:47.222 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[W 06:08:47.224 NotebookApp] No web browser found: could not locate runnable browser.
[C 06:08:47.224 NotebookApp]

    To access the notebook, open this file in a browser:
        file:///home/efraim/.local/share/jupyter/runtime/nbserver-1-open.html
    Or copy and paste one of these URLs:
        http://localhost:8888/?token=52eaa1ab139b0ebbcc86e2f2939924eb706033ae2f5e9775
     or http://127.0.0.1:8888/?token=52eaa1ab139b0ebbcc86e2f2939924eb706033ae2f5e9775
^C[I 06:09:26.510 NotebookApp] interrupted
Serving notebooks from local directory: /home/efraim/workspace/guix
0 active kernels
Jupyter Notebook 6.3.0 is running at:
http://localhost:8888/?token=52eaa1ab139b0ebbcc86e2f2939924eb706033ae2f5e9775
 or http://127.0.0.1:8888/?token=52eaa1ab139b0ebbcc86e2f2939924eb706033ae2f5e9775

The traitlets error I was able to reproduce though:

(ins)efraim@3900XT ~/workspace/guix$ guix environment --ad-hoc python python-traitlets -- python3 -c 'import traitlets'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/gnu/store/3zwlgb58b6wca49yk9hjpz90s12crgid-profile/lib/python3.8/site-packages/traitlets/__init__.py", line 1, in <module>
    from .traitlets import *
  File "/gnu/store/3zwlgb58b6wca49yk9hjpz90s12crgid-profile/lib/python3.8/site-packages/traitlets/traitlets.py", line 57, in <module>
    import six
ModuleNotFoundError: No module named 'six'

I fixed that by adding python-six as a propagated-input to
python-traitlets. So in any case go ahead and run `guix pull` again and
try again, it should be working now.

-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      reply	other threads:[~2021-04-25  6:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-24  9:33 Guix Jupyter notebook phodina via
2021-04-25  6:14 ` Efraim Flashner [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YIUIx5HJjPMZN6X/@3900XT \
    --to=efraim@flashner.co.il \
    --cc=help-guix@gnu.org \
    --cc=phodina@protonmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).