* guix import error
@ 2020-10-16 11:50 Zelphir Kaltstahl
2020-10-16 12:19 ` zimoun
2020-10-16 12:25 ` Tobias Geerinckx-Rice
0 siblings, 2 replies; 15+ messages in thread
From: Zelphir Kaltstahl @ 2020-10-16 11:50 UTC (permalink / raw)
To: help-guix
Hi Guix users!
Today I tried to import another package from PyPI:
~~~~
$ guix import pypi 'jupyterlab@2.1.5' --recursive
following redirection to `https://pypi.org/pypi/jupyterlab@2.1.5/json/'...
Backtrace:
4 (primitive-load "/home/user/.config/guix/current/bi…")
In guix/ui.scm:
2115:12 3 (run-guix-command _ . _)
In guix/scripts/import.scm:
120:11 2 (guix-import . _)
In guix/scripts/import/pypi.scm:
97:16 1 (guix-import-pypi . _)
In guix/import/utils.scm:
427:36 0 (recursive-import "jupyterlab@2.1.5" #f # _ #:guix-name _)
guix/import/utils.scm:427:36: In procedure recursive-import:
Wrong number of values returned to continuation (expected 2)
~~~~
But when I leave away the version, it works:
~~~~
$ guix import pypi 'jupyterlab' --recursive
Starting download of /tmp/guix-file.OuiOPJ
From https://files.pythonhosted.org/packages/39/dc/a0d48fa885fce1efa8a7dcee9c86d52cf59aa312cc35fc78077c841ee411/jupyterlab-2.2.8.tar.gz...
…2.2.8.tar.gz 8.1MiB 9.3MiB/s 00:01 [##################] 100.0%
Starting download of /tmp/guix-file.hQu7pJ
From https://files.pythonhosted.org/packages/d7/a9/d7c904ee406d1ce320fd1d91e05111fa158e66bb217f68d070b5f58c5937/jupyterlab-2.2.8-py3-none-any.whl...
…-py3-none-any.whl 7.5MiB 8.7MiB/s 00:01 [##################] 100.0%
Starting download of /tmp/guix-file.v4NZXH
From https://files.pythonhosted.org/packages/92/54/5f321ca4cebfb644ac59eb21601b46a2ff9831ffe1b4e5a588f2a7e98d48/jupyterlab_server-1.2.0.tar.gz...
…er-1.2.0.tar.gz 22KiB 749KiB/s 00:00 [##################] 100.0%
Starting download of /tmp/guix-file.XvrOHJ
From https://files.pythonhosted.org/packages/b4/eb/560043dcd8376328f8b98869efed66ef68307278406ab99c7f63a34d4ae2/jupyterlab_server-1.2.0-py3-none-any.whl...
…2.0-py3-none-any.whl 28KiB 986KiB/s 00:00 [##################] 100.0%
(define-public python-jupyterlab-server
(package
(name "python-jupyterlab-server")
(version "1.2.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "jupyterlab-server" version))
(sha256
(base32
"132xby7531rbrjg9bqvsx86birr1blynjxy8gi5kcnb6x7fxjcal"))))
(build-system python-build-system)
(propagated-inputs
`(("python-jinja2" ,python-jinja2)
("python-json5" ,python-json5)
("python-jsonschema" ,python-jsonschema)
("python-notebook" ,python-notebook)
("python-requests" ,python-requests)))
(native-inputs
`(("python-pytest" ,python-pytest)
("python-requests" ,python-requests)))
(home-page "https://jupyter.org")
(synopsis "JupyterLab Server")
(description "JupyterLab Server")
(license license:bsd-3)))
(define-public python-jupyterlab
(package
(name "python-jupyterlab")
(version "2.2.8")
(source
(origin
(method url-fetch)
(uri (pypi-uri "jupyterlab" version))
(sha256
(base32
"134b1i0hi0by62ajqqmyqksvffj46pzgjjcrwz0ijjah63p7ndy8"))))
(build-system python-build-system)
(propagated-inputs
`(("python-jinja2" ,python-jinja2)
("python-jupyterlab-server"
,python-jupyterlab-server)
("python-notebook" ,python-notebook)
("python-tornado" ,python-tornado)))
(native-inputs
`(("python-pytest" ,python-pytest)
("python-pytest-check-links"
,python-pytest-check-links)
("python-requests" ,python-requests)
("python-virtualenv" ,python-virtualenv)
("python-wheel" ,python-wheel)))
(home-page "http://jupyter.org")
(synopsis
"The JupyterLab notebook server extension.")
(description
"The JupyterLab notebook server extension.")
(license license:bsd-3)))
~~~~
So I checked in the manual and there is says:
> A specific package version may optionally be specified by following
the package name by an at-sign and a version number as in the following
example:
> guix import hackage mtl@2.1.3.1
But that is in the "hackage" import section. Is the same not available
for PyPI?
When I check with:
~~~~
$ guix import pypi 'jupyterlab@2.2.8' --recursive
following redirection to `https://pypi.org/pypi/jupyterlab@2.2.8/json/'...
Backtrace:
4 (primitive-load "/home/user/.config/guix/current/bi…")
In guix/ui.scm:
2115:12 3 (run-guix-command _ . _)
In guix/scripts/import.scm:
120:11 2 (guix-import . _)
In guix/scripts/import/pypi.scm:
97:16 1 (guix-import-pypi . _)
In guix/import/utils.scm:
427:36 0 (recursive-import "jupyterlab@2.2.8" #f # _ #:guix-name _)
guix/import/utils.scm:427:36: In procedure recursive-import:
Wrong number of values returned to continuation (expected 2)
~~~~
It also errors, although 2.2.8 is the version shown on PyPI currently.
Do the various importers work differently?
Regards,
Zelphir
--
repositories: https://notabug.org/ZelphirKaltstahl
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: guix import error
2020-10-16 11:50 guix import error Zelphir Kaltstahl
@ 2020-10-16 12:19 ` zimoun
2020-10-16 12:25 ` Tobias Geerinckx-Rice
1 sibling, 0 replies; 15+ messages in thread
From: zimoun @ 2020-10-16 12:19 UTC (permalink / raw)
To: Zelphir Kaltstahl; +Cc: help-guix
Hi,
On Fri, 16 Oct 2020 at 14:07, Zelphir Kaltstahl
<zelphirkaltstahl@posteo.de> wrote:
> Do the various importers work differently?
Yes.
However, there is a bug somehow.
> $ guix import pypi 'jupyterlab@2.2.8' --recursive
> following redirection to `https://pypi.org/pypi/jupyterlab@2.2.8/json/'...
The file <https://pypi.org/pypi/jupyterlab@2.2.8/json/> does exist but
the file <https://pypi.org/pypi/jupyterlab/json/> does and it contains
the relevant information. The PyPI importer should be improved... or
they changed their API.
Thanks for the report.
All the best,
simon
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: guix import error
2020-10-16 11:50 guix import error Zelphir Kaltstahl
2020-10-16 12:19 ` zimoun
@ 2020-10-16 12:25 ` Tobias Geerinckx-Rice
2020-10-16 13:51 ` zimoun
2020-10-18 11:55 ` guix import error + New: setting up a jupyterlab environment Zelphir Kaltstahl
1 sibling, 2 replies; 15+ messages in thread
From: Tobias Geerinckx-Rice @ 2020-10-16 12:25 UTC (permalink / raw)
To: Zelphir Kaltstahl; +Cc: help-guix
[-- Attachment #1: Type: text/plain, Size: 826 bytes --]
Zelphir,
Zelphir Kaltstahl 写道:
> $ guix import pypi 'jupyterlab@2.1.5' --recursive
It will work if you substitute ‘/’ for ‘@’. Yes, this is a happy
accident specific to the PyPI importer, and I'm sure you can guess
why it happens to work.
>> guix import hackage mtl@2.1.3.1
>
> But that is in the "hackage" import section. Is the same not
> available
> for PyPI?
[...]
> Do the various importers work differently?
Unfortunately so. It would be great(TM) if PACKAGE[@VERSION] were
standard. Each importer could handle it properly (e.g., by
turning it into "/") or return a friendlier ‘the foo importer does
not yet support versions’ error.
I don't have the time, but this sounds like a good
intermediate-level hack for someone who does :-)
Kind regards,
T G-R
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: guix import error
2020-10-16 12:25 ` Tobias Geerinckx-Rice
@ 2020-10-16 13:51 ` zimoun
2020-10-18 11:55 ` guix import error + New: setting up a jupyterlab environment Zelphir Kaltstahl
1 sibling, 0 replies; 15+ messages in thread
From: zimoun @ 2020-10-16 13:51 UTC (permalink / raw)
To: Tobias Geerinckx-Rice, Zelphir Kaltstahl; +Cc: help-guix
On Fri, 16 Oct 2020 at 14:25, Tobias Geerinckx-Rice <me@tobias.gr> wrote:
> Unfortunately so. It would be great(TM) if PACKAGE[@VERSION] were
> standard. Each importer could handle it properly (e.g., by
> turning it into "/") or return a friendlier ‘the foo importer does
> not yet support versions’ error.
>
> I don't have the time, but this sounds like a good
> intermediate-level hack for someone who does :-)
Since we are lacking “easy” bug for first contribution, I opened this:
<http://issues.guix.gnu.org/issue/44030>
and tagged as “easy”.
All the best,
simon
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: guix import error + New: setting up a jupyterlab environment
2020-10-16 12:25 ` Tobias Geerinckx-Rice
2020-10-16 13:51 ` zimoun
@ 2020-10-18 11:55 ` Zelphir Kaltstahl
2020-10-18 16:35 ` Efraim Flashner
1 sibling, 1 reply; 15+ messages in thread
From: Zelphir Kaltstahl @ 2020-10-18 11:55 UTC (permalink / raw)
To: Tobias Geerinckx-Rice, zimoun; +Cc: help-guix
Hello Guix Users, hello Zimoun and Tobias!
Thanks for your information regarding the importer syntax thing.
I continued trying to get a jupyterlab environment today.
Here is what I did so far:
(1) Create my manifest file:
~~~~START~~~~
(specifications->manifest
'("python"))
~~~~~END~~~~~
(2) Create my channels file:
~~~~START~~~~
$ guix describe --format=channels > channels.scm
$ cat channels.scm
(list (channel
(name 'guix)
(url "https://git.savannah.gnu.org/git/guix.git")
(commit
"6ca673b30dac281ba27a8dac242c0ac83e5e354b")
(introduction
(make-channel-introduction
"9edb3f66fd807b096b48283debdcddccfea34bad"
(openpgp-fingerprint
"BBB0 2DDF 2CEA F6A8 0D1D E643 A2A0 6DF2 A33A 54FA")))))
~~~~~END~~~~~
(3) Create my jupyterlab PyPI import file, this time around using the
"/" instead of "@" for specifying the version:
~~~~START~~~~
$ guix import pypi --recursive jupyterlab/2.1.5 > jupyterlab.scm
~~~~~END~~~~~
(4) Add missing import expressions and add output expression at the end:
~~~~START~~~~
;; add module imports
(use-modules
(guix packages)
(guix download)
(guix build-system python)
((guix licenses) #:prefix license:)
;; use `guix environment --ad-hoc python-jinja2 -- guix package -A python-jinja2` to find the location of python-jinja2, which is gnu/packages/python-xyz.scm
(gnu packages python-xyz)
;; for python-tornado
(gnu packages python-web)
;; for python-pytest
(gnu packages check))
;; QUESTION: Why are those required packages not imported by guix automatically?
;; QUESTION: Why are the manually imported packages not actually in files with their own name, but instead jinja2 -> python-xyz, tornado -> python-web, and pytest -> check?
;; QUESTION: Is my process of finding the files in which the packages are correct or just working by chance?
(define-public python-jupyterlab-server
(package
(name "python-jupyterlab-server")
(version "1.2.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "jupyterlab-server" version))
(sha256
(base32
"132xby7531rbrjg9bqvsx86birr1blynjxy8gi5kcnb6x7fxjcal"))))
(build-system python-build-system)
(propagated-inputs
`(("python-jinja2" ,python-jinja2)
("python-json5" ,python-json5)
("python-jsonschema" ,python-jsonschema)
("python-notebook" ,python-notebook)
("python-requests" ,python-requests)))
(native-inputs
`(("python-pytest" ,python-pytest)
("python-requests" ,python-requests)))
(home-page "https://jupyter.org")
(synopsis "JupyterLab Server")
(description "JupyterLab Server")
(license license:bsd-3)))
(define-public python-jupyterlab
(package
(name "python-jupyterlab")
(version "2.1.5")
(source
(origin
(method url-fetch)
(uri (pypi-uri "jupyterlab" version))
(sha256
(base32
"162jn51cg36fsn4l2zhnb5n4nbkhm9wlv974ggcnmdij3i4r4yya"))))
(build-system python-build-system)
(propagated-inputs
`(("python-jinja2" ,python-jinja2)
("python-jupyterlab-server"
,python-jupyterlab-server)
("python-notebook" ,python-notebook)
("python-tornado" ,python-tornado)))
(native-inputs
`(("python-pytest" ,python-pytest)
("python-pytest-check-links"
,python-pytest-check-links)
("python-requests" ,python-requests)
("python-virtualenv" ,python-virtualenv)
("python-wheel" ,python-wheel)))
(home-page "http://jupyter.org")
(synopsis
"The JupyterLab notebook server extension.")
(description
"The JupyterLab notebook server extension.")
(license license:bsd-3)))
python-jupyterlab
~~~~~END~~~~~
And as noted in the comments, I have 3 questions at this point:
(Q1) Why are those required packages not imported by guix automatically?
(My guess: This functionality simply has not yet been implemented.)
(Q2) Why are the manually imported packages not actually in files with
their own name, but instead jinja2 -> python-xyt, tornado -> python-web,
and pytest -> check? Why not (gnu packages python pytest) for example?
(Q3) Is my process of finding the files in which the packages are
correct or just working by chance? Basically I am creating temporary
environments, in which I then lookup "where would the package be
installed" and then exit the temporary environment to use that
information in my imported package file's import expressions /
use-modules expression. This seems to be a bit of a convoluted process,
though worth it, if it always works in the end.
(4) Now I run my time-machine command:
~~~~START~~~~
$ guix time-machine --channels=channels.scm -- environment --manifest=manifest.scm --load=jupyterlab.scm
~~~~~END~~~~~
This take a moment and then I get an error (the full output is longer,
but when running it multiple times, already successful steps are not all
done repeatedly, so the output is then reduced to what fails):
~~~~START~~~~
$ guix time-machine --channels=channels.scm -- environment --manifest=manifest.scm --load=jupyterlab.scm
Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.org/git/guix.git'...
The following derivations will be built:
/gnu/store/wzmfn9m45bmsbrx094rv3lf3w0rpmw49-python-pytest-check-links-0.3.0.drv
/gnu/store/n9i421lrbwrr8d0947w5vma7rhy3iyba-python-jupyterlab-server-1.2.0.drv
/gnu/store/s7jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv
4,2 MB will be downloaded
downloading from https://ci.guix.gnu.org/nar/lzip/2nahbs5v8q073gjmy224gk0h5lsh1kkw-python-nbconvert-5.0.0b1 ...
python-nbconvert-5.0.0b1 301KiB 2.0MiB/s 00:00 [##################] 100.0%
building /gnu/store/s7jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv...
|builder for `/gnu/store/s7jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv' failed to produce output path `/gnu/store/92md7gh966n4fzj6al267lqq4xjx0ncf-jupyterlab-server-1.2.0.tar.gz'
build of /gnu/store/s7jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv failed
View build log at '/var/log/guix/drvs/s7/jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv.bz2'.
cannot build derivation `/gnu/store/n9i421lrbwrr8d0947w5vma7rhy3iyba-python-jupyterlab-server-1.2.0.drv': 1 dependencies couldn't be built
killing process 7384
guix environment: error: build of `/gnu/store/n9i421lrbwrr8d0947w5vma7rhy3iyba-python-jupyterlab-server-1.2.0.drv' failed
~~~~~END~~~~~
OK, an error, perhaps I can understand it. Lets look at that log file:
~~~~START~~~~
$ cp /var/log/guix/drvs/s7/jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv.bz2 .
$ bzip2 --decompress jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv.bz2
$ cat jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv
Starting download of /gnu/store/92md7gh966n4fzj6al267lqq4xjx0ncf-jupyterlab-server-1.2.0.tar.gz
From https://files.pythonhosted.org/packages/source/j/jupyterlab-server/jupyterlab-server-1.2.0.tar.gz...
download failed "https://files.pythonhosted.org/packages/source/j/jupyterlab-server/jupyterlab-server-1.2.0.tar.gz" 404 "Not Found"
Starting download of /gnu/store/92md7gh966n4fzj6al267lqq4xjx0ncf-jupyterlab-server-1.2.0.tar.gz
From https://ci.guix.gnu.org/file/jupyterlab-server-1.2.0.tar.gz/sha256/132xby7531rbrjg9bqvsx86birr1blynjxy8gi5kcnb6x7fxjcal...
download failed "https://ci.guix.gnu.org/file/jupyterlab-server-1.2.0.tar.gz/sha256/132xby7531rbrjg9bqvsx86birr1blynjxy8gi5kcnb6x7fxjcal" 404 "Not Found"
Starting download of /gnu/store/92md7gh966n4fzj6al267lqq4xjx0ncf-jupyterlab-server-1.2.0.tar.gz
From https://tarballs.nixos.org/sha256/132xby7531rbrjg9bqvsx86birr1blynjxy8gi5kcnb6x7fxjcal...
download failed "https://tarballs.nixos.org/sha256/132xby7531rbrjg9bqvsx86birr1blynjxy8gi5kcnb6x7fxjcal" 404 "Not Found"
Starting download of /gnu/store/92md7gh966n4fzj6al267lqq4xjx0ncf-jupyterlab-server-1.2.0.tar.gz
From https://archive.softwareheritage.org/api/1/content/sha256:5431d9dde96659364b7cc877693d5d21e7b80cea7ae3959ecc2b87518e5f5d8c/raw/...
download failed "https://archive.softwareheritage.org/api/1/content/sha256:5431d9dde96659364b7cc877693d5d21e7b80cea7ae3959ecc2b87518e5f5d8c/raw/" 404 "Not Found"
failed to download "/gnu/store/92md7gh966n4fzj6al267lqq4xjx0ncf-jupyterlab-server-1.2.0.tar.gz" from "https://files.pythonhosted.org/packages/source/j/jupyterlab-server/jupyterlab-server-1.2.0.tar.gz"
~~~~~END~~~~~
So it seems, that the jupyterlab-server file is simply not downloadable
any longer!
Trying using wget:
~~~~START~~~~
$ wget https://files.pythonhosted.org/packages/source/j/jupyterlab-server/jupyterlab-server-1.2.0.tar.gz
--2020-10-18 13:49:52-- https://files.pythonhosted.org/packages/source/j/jupyterlab-server/jupyterlab-server-1.2.0.tar.gz
Resolving files.pythonhosted.org (files.pythonhosted.org)... 2a04:4e42:9::319, 151.101.37.63
Connecting to files.pythonhosted.org (files.pythonhosted.org)|2a04:4e42:9::319|:443... failed: Connection refused.
Connecting to files.pythonhosted.org (files.pythonhosted.org)|151.101.37.63|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2020-10-18 13:49:53 ERROR 404: Not Found.
~~~~~END~~~~~
So now I am out of ideas. It seems the file is not available any longer
and the definition of jupyterlab needs to be updated somewhere, so that
it does not try to download an old or non-existent version of
jupyter-labserver. But how is this usually done? Can I specify it
somewhere in one of the 3 files I have, or am I dependent on someone
fixing the jupyterlab-server dependency / input for juypterlab?
Thanks for your help so far! Tell me, if I need to provide any more
information to solve the problem.
Best regards,
Zelphir
On 10/16/20 2:25 PM, Tobias Geerinckx-Rice wrote:
> Zelphir,
>
> Zelphir Kaltstahl 写道:
>> $ guix import pypi 'jupyterlab@2.1.5' --recursive
>
> It will work if you substitute ‘/’ for ‘@’. Yes, this is a happy
> accident specific to the PyPI importer, and I'm sure you can guess why
> it happens to work.
>
>>> guix import hackage mtl@2.1.3.1
>>
>> But that is in the "hackage" import section. Is the same not available
>> for PyPI?
>
> [...]
>
>> Do the various importers work differently?
>
> Unfortunately so. It would be great(TM) if PACKAGE[@VERSION] were
> standard. Each importer could handle it properly (e.g., by turning it
> into "/") or return a friendlier ‘the foo importer does not yet
> support versions’ error.
>
> I don't have the time, but this sounds like a good intermediate-level
> hack for someone who does :-)
>
> Kind regards,
>
> T G-R
--
repositories: https://notabug.org/ZelphirKaltstahl
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: guix import error + New: setting up a jupyterlab environment
2020-10-18 11:55 ` guix import error + New: setting up a jupyterlab environment Zelphir Kaltstahl
@ 2020-10-18 16:35 ` Efraim Flashner
2020-10-19 14:31 ` Zelphir Kaltstahl
0 siblings, 1 reply; 15+ messages in thread
From: Efraim Flashner @ 2020-10-18 16:35 UTC (permalink / raw)
To: Zelphir Kaltstahl; +Cc: help-guix
[-- Attachment #1: Type: text/plain, Size: 12740 bytes --]
On Sun, Oct 18, 2020 at 01:55:49PM +0200, Zelphir Kaltstahl wrote:
> Hello Guix Users, hello Zimoun and Tobias!
>
> Thanks for your information regarding the importer syntax thing.
>
> I continued trying to get a jupyterlab environment today.
>
> Here is what I did so far:
>
> (1) Create my manifest file:
>
> ~~~~START~~~~
> (specifications->manifest
> '("python"))
> ~~~~~END~~~~~
>
> (2) Create my channels file:
>
> ~~~~START~~~~
> $ guix describe --format=channels > channels.scm
> $ cat channels.scm
> (list (channel
> (name 'guix)
> (url "https://git.savannah.gnu.org/git/guix.git")
> (commit
> "6ca673b30dac281ba27a8dac242c0ac83e5e354b")
> (introduction
> (make-channel-introduction
> "9edb3f66fd807b096b48283debdcddccfea34bad"
> (openpgp-fingerprint
> "BBB0 2DDF 2CEA F6A8 0D1D E643 A2A0 6DF2 A33A 54FA")))))
> ~~~~~END~~~~~
>
> (3) Create my jupyterlab PyPI import file, this time around using the
> "/" instead of "@" for specifying the version:
>
> ~~~~START~~~~
> $ guix import pypi --recursive jupyterlab/2.1.5 > jupyterlab.scm
> ~~~~~END~~~~~
>
> (4) Add missing import expressions and add output expression at the end:
>
> ~~~~START~~~~
> ;; add module imports
> (use-modules
> (guix packages)
> (guix download)
> (guix build-system python)
> ((guix licenses) #:prefix license:)
> ;; use `guix environment --ad-hoc python-jinja2 -- guix package -A python-jinja2` to find the location of python-jinja2, which is gnu/packages/python-xyz.scm
This can be just 'guix package -A python-jinja2', no need for the
environment.
> (gnu packages python-xyz)
> ;; for python-tornado
> (gnu packages python-web)
> ;; for python-pytest
> (gnu packages check))
>
> ;; QUESTION: Why are those required packages not imported by guix automatically?
> ;; QUESTION: Why are the manually imported packages not actually in files with their own name, but instead jinja2 -> python-xyz, tornado -> python-web, and pytest -> check?
> ;; QUESTION: Is my process of finding the files in which the packages are correct or just working by chance?
>
> (define-public python-jupyterlab-server
> (package
> (name "python-jupyterlab-server")
> (version "1.2.0")
> (source
> (origin
> (method url-fetch)
> (uri (pypi-uri "jupyterlab-server" version))
> (sha256
> (base32
> "132xby7531rbrjg9bqvsx86birr1blynjxy8gi5kcnb6x7fxjcal"))))
> (build-system python-build-system)
> (propagated-inputs
> `(("python-jinja2" ,python-jinja2)
> ("python-json5" ,python-json5)
> ("python-jsonschema" ,python-jsonschema)
> ("python-notebook" ,python-notebook)
> ("python-requests" ,python-requests)))
> (native-inputs
> `(("python-pytest" ,python-pytest)
> ("python-requests" ,python-requests)))
> (home-page "https://jupyter.org")
> (synopsis "JupyterLab Server")
> (description "JupyterLab Server")
> (license license:bsd-3)))
>
> (define-public python-jupyterlab
> (package
> (name "python-jupyterlab")
> (version "2.1.5")
> (source
> (origin
> (method url-fetch)
> (uri (pypi-uri "jupyterlab" version))
> (sha256
> (base32
> "162jn51cg36fsn4l2zhnb5n4nbkhm9wlv974ggcnmdij3i4r4yya"))))
> (build-system python-build-system)
> (propagated-inputs
> `(("python-jinja2" ,python-jinja2)
> ("python-jupyterlab-server"
> ,python-jupyterlab-server)
> ("python-notebook" ,python-notebook)
> ("python-tornado" ,python-tornado)))
> (native-inputs
> `(("python-pytest" ,python-pytest)
> ("python-pytest-check-links"
> ,python-pytest-check-links)
> ("python-requests" ,python-requests)
> ("python-virtualenv" ,python-virtualenv)
> ("python-wheel" ,python-wheel)))
> (home-page "http://jupyter.org")
> (synopsis
> "The JupyterLab notebook server extension.")
> (description
> "The JupyterLab notebook server extension.")
> (license license:bsd-3)))
>
> python-jupyterlab
> ~~~~~END~~~~~
>
> And as noted in the comments, I have 3 questions at this point:
>
> (Q1) Why are those required packages not imported by guix automatically?
> (My guess: This functionality simply has not yet been implemented.)
>
> (Q2) Why are the manually imported packages not actually in files with
> their own name, but instead jinja2 -> python-xyt, tornado -> python-web,
> and pytest -> check? Why not (gnu packages python pytest) for example?
>
> (Q3) Is my process of finding the files in which the packages are
> correct or just working by chance? Basically I am creating temporary
> environments, in which I then lookup "where would the package be
> installed" and then exit the temporary environment to use that
> information in my imported package file's import expressions /
> use-modules expression. This seems to be a bit of a convoluted process,
> though worth it, if it always works in the end.
>
> (4) Now I run my time-machine command:
>
> ~~~~START~~~~
> $ guix time-machine --channels=channels.scm -- environment --manifest=manifest.scm --load=jupyterlab.scm
> ~~~~~END~~~~~
>
> This take a moment and then I get an error (the full output is longer,
> but when running it multiple times, already successful steps are not all
> done repeatedly, so the output is then reduced to what fails):
>
> ~~~~START~~~~
> $ guix time-machine --channels=channels.scm -- environment --manifest=manifest.scm --load=jupyterlab.scm
> Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.org/git/guix.git'...
> The following derivations will be built:
> /gnu/store/wzmfn9m45bmsbrx094rv3lf3w0rpmw49-python-pytest-check-links-0.3.0.drv
> /gnu/store/n9i421lrbwrr8d0947w5vma7rhy3iyba-python-jupyterlab-server-1.2.0.drv
> /gnu/store/s7jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv
>
> 4,2 MB will be downloaded
> downloading from https://ci.guix.gnu.org/nar/lzip/2nahbs5v8q073gjmy224gk0h5lsh1kkw-python-nbconvert-5.0.0b1 ...
> python-nbconvert-5.0.0b1 301KiB 2.0MiB/s 00:00 [##################] 100.0%
>
> building /gnu/store/s7jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv...
> |builder for `/gnu/store/s7jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv' failed to produce output path `/gnu/store/92md7gh966n4fzj6al267lqq4xjx0ncf-jupyterlab-server-1.2.0.tar.gz'
> build of /gnu/store/s7jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv failed
> View build log at '/var/log/guix/drvs/s7/jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv.bz2'.
> cannot build derivation `/gnu/store/n9i421lrbwrr8d0947w5vma7rhy3iyba-python-jupyterlab-server-1.2.0.drv': 1 dependencies couldn't be built
> killing process 7384
> guix environment: error: build of `/gnu/store/n9i421lrbwrr8d0947w5vma7rhy3iyba-python-jupyterlab-server-1.2.0.drv' failed
> ~~~~~END~~~~~
>
> OK, an error, perhaps I can understand it. Lets look at that log file:
>
> ~~~~START~~~~
> $ cp /var/log/guix/drvs/s7/jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv.bz2 .
> $ bzip2 --decompress jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv.bz2
> $ cat jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv
>
> Starting download of /gnu/store/92md7gh966n4fzj6al267lqq4xjx0ncf-jupyterlab-server-1.2.0.tar.gz
> From https://files.pythonhosted.org/packages/source/j/jupyterlab-server/jupyterlab-server-1.2.0.tar.gz...
> download failed "https://files.pythonhosted.org/packages/source/j/jupyterlab-server/jupyterlab-server-1.2.0.tar.gz" 404 "Not Found"
>
> Starting download of /gnu/store/92md7gh966n4fzj6al267lqq4xjx0ncf-jupyterlab-server-1.2.0.tar.gz
> From https://ci.guix.gnu.org/file/jupyterlab-server-1.2.0.tar.gz/sha256/132xby7531rbrjg9bqvsx86birr1blynjxy8gi5kcnb6x7fxjcal...
> download failed "https://ci.guix.gnu.org/file/jupyterlab-server-1.2.0.tar.gz/sha256/132xby7531rbrjg9bqvsx86birr1blynjxy8gi5kcnb6x7fxjcal" 404 "Not Found"
>
> Starting download of /gnu/store/92md7gh966n4fzj6al267lqq4xjx0ncf-jupyterlab-server-1.2.0.tar.gz
> From https://tarballs.nixos.org/sha256/132xby7531rbrjg9bqvsx86birr1blynjxy8gi5kcnb6x7fxjcal...
> download failed "https://tarballs.nixos.org/sha256/132xby7531rbrjg9bqvsx86birr1blynjxy8gi5kcnb6x7fxjcal" 404 "Not Found"
>
> Starting download of /gnu/store/92md7gh966n4fzj6al267lqq4xjx0ncf-jupyterlab-server-1.2.0.tar.gz
> From https://archive.softwareheritage.org/api/1/content/sha256:5431d9dde96659364b7cc877693d5d21e7b80cea7ae3959ecc2b87518e5f5d8c/raw/...
> download failed "https://archive.softwareheritage.org/api/1/content/sha256:5431d9dde96659364b7cc877693d5d21e7b80cea7ae3959ecc2b87518e5f5d8c/raw/" 404 "Not Found"
> failed to download "/gnu/store/92md7gh966n4fzj6al267lqq4xjx0ncf-jupyterlab-server-1.2.0.tar.gz" from "https://files.pythonhosted.org/packages/source/j/jupyterlab-server/jupyterlab-server-1.2.0.tar.gz"
> ~~~~~END~~~~~
>
> So it seems, that the jupyterlab-server file is simply not downloadable
> any longer!
>
> Trying using wget:
>
> ~~~~START~~~~
> $ wget https://files.pythonhosted.org/packages/source/j/jupyterlab-server/jupyterlab-server-1.2.0.tar.gz
> --2020-10-18 13:49:52-- https://files.pythonhosted.org/packages/source/j/jupyterlab-server/jupyterlab-server-1.2.0.tar.gz
> Resolving files.pythonhosted.org (files.pythonhosted.org)... 2a04:4e42:9::319, 151.101.37.63
> Connecting to files.pythonhosted.org (files.pythonhosted.org)|2a04:4e42:9::319|:443... failed: Connection refused.
> Connecting to files.pythonhosted.org (files.pythonhosted.org)|151.101.37.63|:443... connected.
> HTTP request sent, awaiting response... 404 Not Found
> 2020-10-18 13:49:53 ERROR 404: Not Found.
> ~~~~~END~~~~~
>
> So now I am out of ideas. It seems the file is not available any longer
> and the definition of jupyterlab needs to be updated somewhere, so that
> it does not try to download an old or non-existent version of
> jupyter-labserver. But how is this usually done? Can I specify it
> somewhere in one of the 3 files I have, or am I dependent on someone
> fixing the jupyterlab-server dependency / input for juypterlab?
>
> Thanks for your help so far! Tell me, if I need to provide any more
> information to solve the problem.
Try chaning the URL line to (uri (pypi-uri "jupyterlab_server" version)),
with an underscore (_). I don't have any special suggestions for knowing
that it should be an underscore instead of a dash. The best I have is
the output from 'guix import pypi jupyterlab-server:
(ins)efraim@E5400 ~$ guix import pypi jupyterlab-server
Starting download of /tmp/guix-file.ayJ41F
From https://files.pythonhosted.org/packages/92/54/5f321ca4cebfb644ac59eb21601b46a2ff9831ffe1b4e5a588f2a7e98d48/jupyterlab_server-1.2.0.tar.gz...
…er-1.2.0.tar.gz 22KiB 57KiB/s 00:00 [##################] 100.0%
> Best regards,
> Zelphir
>
>
> On 10/16/20 2:25 PM, Tobias Geerinckx-Rice wrote:
> > Zelphir,
> >
> > Zelphir Kaltstahl 写道:
> >> $ guix import pypi 'jupyterlab@2.1.5' --recursive
> >
> > It will work if you substitute ‘/’ for ‘@’. Yes, this is a happy
> > accident specific to the PyPI importer, and I'm sure you can guess why
> > it happens to work.
> >
> >>> guix import hackage mtl@2.1.3.1
> >>
> >> But that is in the "hackage" import section. Is the same not available
> >> for PyPI?
> >
> > [...]
> >
> >> Do the various importers work differently?
> >
> > Unfortunately so. It would be great(TM) if PACKAGE[@VERSION] were
> > standard. Each importer could handle it properly (e.g., by turning it
> > into "/") or return a friendlier ‘the foo importer does not yet
> > support versions’ error.
> >
> > I don't have the time, but this sounds like a good intermediate-level
> > hack for someone who does :-)
> >
> > Kind regards,
> >
> > T G-R
>
> --
> repositories: https://notabug.org/ZelphirKaltstahl
>
--
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 --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: guix import error + New: setting up a jupyterlab environment
2020-10-18 16:35 ` Efraim Flashner
@ 2020-10-19 14:31 ` Zelphir Kaltstahl
2020-10-19 16:54 ` Efraim Flashner
0 siblings, 1 reply; 15+ messages in thread
From: Zelphir Kaltstahl @ 2020-10-19 14:31 UTC (permalink / raw)
To: Efraim Flashner; +Cc: help-guix
Hello Efraim!
Thank you! Your idea of replacing "-" with "_" seems to partially help:
The package is downloaded and byte compiled. However, afterwards there
is a problem, when it tries to copy the byte-compiled files in the "wrap
phase" (comments inserted in some places):
~~~~START~~~~
### ... a lot of output before this ...
byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/__init__.py to __init__.cpython-38.pyc
byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/_version.py to _version.cpython-38.pyc
byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/app.py to app.cpython-38.pyc
byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/handlers.py to handlers.cpython-38.pyc
byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/listings_handler.py to listings_handler.cpython-38.pyc
byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/process.py to process.cpython-38.pyc
byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/process_app.py to process_app.cpython-38.pyc
byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/server.py to server.cpython-38.pyc
byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/servertest.py to servertest.cpython-38.pyc
byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/settings_handler.py to settings_handler.cpython-38.pyc
byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/themes_handler.py to themes_handler.cpython-38.pyc
byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/workspaces_handler.py to workspaces_handler.cpython-38.pyc
byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/tests/__init__.py to __init__.cpython-38.pyc
byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/tests/test_settings_api.py to test_settings_api.cpython-38.pyc
byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/tests/test_workspaces_api.py to test_workspaces_api.cpython-38.pyc
byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/tests/utils.py to utils.cpython-38.pyc
### ... seems byte-compiling went without problems, but not comes the problem ...
running install_egg_info
Copying jupyterlab_server.egg-info to /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server-1.2.0-py3.8.egg-info
running install_scripts
phase `install' succeeded after 0.3 seconds
starting phase `wrap'
find-files: /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/bin: No such file or directory
find-files: /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/sbin: No such file or directory
phase `wrap' succeeded after 0.0 seconds
starting phase `check'
running "python setup.py" with command "test" and parameters ()
running test
Searching for ipykernel
Reading https://pypi.org/simple/ipykernel/
Download error on https://pypi.org/simple/ipykernel/: [Errno -2] Name or service not known -- Some packages may not be found!
Couldn't find index page for 'ipykernel' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.org/simple/
Download error on https://pypi.org/simple/: [Errno -2] Name or service not known -- Some packages may not be found!
No local packages or working download links found for ipykernel
error: Could not find suitable distribution for Requirement.parse('ipykernel')
command "python" "-c" "import setuptools, tokenize;__file__='setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\\r\\n', '\\n');f.close();exec(compile(code, __file__, 'exec'))" "test" failed with status 1
~~~~~END~~~~~
So it seems, that while the download URL is corrected, there is another
place, where Guix has an error now, resulting in a final error shown in
command line:
~~~~START~~~~
$ guix time-machine --channels=channels.scm -- environment --manifest=manifest.scm --load=jupyterlab.scm
Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.org/git/guix.git'...
substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0%
The following derivations will be built:
/gnu/store/wzmfn9m45bmsbrx094rv3lf3w0rpmw49-python-pytest-check-links-0.3.0.drv
/gnu/store/96xf5mrg134mcsp01b0m1qs1lxkb401a-python-jupyterlab-server-1.2.0.drv
/gnu/store/32a28hd7aainwn0hfsnf3blh8prmfz61-jupyterlab_server-1.2.0.tar.gz.drv
3,9 MB will be downloaded
downloading from https://ci.guix.gnu.org/nar/lzip/54kpl9psx16jwic4gpnjwh44kim04wlk-python-notebook-5.7.4 ...
python-notebook-5.7.4 3.7MiB 5.1MiB/s 00:01 [##################] 100.0%
building /gnu/store/32a28hd7aainwn0hfsnf3blh8prmfz61-jupyterlab_server-1.2.0.tar.gz.drv...
downloading from https://files.pythonhosted.org/packages/source/j/jupyterlab_server/jupyterlab_server-1.2.0.tar.gz ...
building /gnu/store/wzmfn9m45bmsbrx094rv3lf3w0rpmw49-python-pytest-check-links-0.3.0.drv...
building /gnu/store/96xf5mrg134mcsp01b0m1qs1lxkb401a-python-jupyterlab-server-1.2.0.drv...
\ 'check' phasebuilder for `/gnu/store/96xf5mrg134mcsp01b0m1qs1lxkb401a-python-jupyterlab-server-1.2.0.drv' failed with exit code 1
build of /gnu/store/96xf5mrg134mcsp01b0m1qs1lxkb401a-python-jupyterlab-server-1.2.0.drv failed
View build log at '/var/log/guix/drvs/96/xf5mrg134mcsp01b0m1qs1lxkb401a-python-jupyterlab-server-1.2.0.drv.bz2'.
guix environment: error: build of `/gnu/store/96xf5mrg134mcsp01b0m1qs1lxkb401a-python-jupyterlab-server-1.2.0.drv' failed
~~~~~END~~~~~
Apparently ipykernel is not found, but when I visit
https://pypi.org/simple/ipykernel/, I see packages there.
From the logs:
~~~~START~~~~
Download error on https://pypi.org/simple/ipykernel/: [Errno -2] Name or service not known -- Some packages may not be found!
Couldn't find index page for 'ipykernel' (maybe misspelled?)
~~~~~END~~~~~
Do I need to add another input in my `jupyterlab.scm`? (How?) Or perhaps
I need to create a separate `ipykernel.scm` which contains the output of
`guix import pypi --recursive ipykernel`?
However, it somehow seems to fail for PyPI simple in general (from the
logs again):
~~~~START~~~~
Reading https://pypi.org/simple/
Download error on https://pypi.org/simple/: [Errno -2] Name or service not known -- Some packages may not be found!
No local packages or working download links found for ipykernel
error: Could not find suitable distribution for Requirement.parse('ipykernel')
command "python" "-c" "import setuptools, tokenize;__file__='setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\\r\\n', '\\n');f.close();exec(compile(code, __file__, 'exec'))" "test" failed with status 1
~~~~~END~~~~~
Thanks,
Zelphir
On 10/18/20 6:35 PM, Efraim Flashner wrote:
> On Sun, Oct 18, 2020 at 01:55:49PM +0200, Zelphir Kaltstahl wrote:
>> Hello Guix Users, hello Zimoun and Tobias!
>>
>> Thanks for your information regarding the importer syntax thing.
>>
>> I continued trying to get a jupyterlab environment today.
>>
>> Here is what I did so far:
>>
>> (1) Create my manifest file:
>>
>> ~~~~START~~~~
>> (specifications->manifest
>> '("python"))
>> ~~~~~END~~~~~
>>
>> (2) Create my channels file:
>>
>> ~~~~START~~~~
>> $ guix describe --format=channels > channels.scm
>> $ cat channels.scm
>> (list (channel
>> (name 'guix)
>> (url "https://git.savannah.gnu.org/git/guix.git")
>> (commit
>> "6ca673b30dac281ba27a8dac242c0ac83e5e354b")
>> (introduction
>> (make-channel-introduction
>> "9edb3f66fd807b096b48283debdcddccfea34bad"
>> (openpgp-fingerprint
>> "BBB0 2DDF 2CEA F6A8 0D1D E643 A2A0 6DF2 A33A 54FA")))))
>> ~~~~~END~~~~~
>>
>> (3) Create my jupyterlab PyPI import file, this time around using the
>> "/" instead of "@" for specifying the version:
>>
>> ~~~~START~~~~
>> $ guix import pypi --recursive jupyterlab/2.1.5 > jupyterlab.scm
>> ~~~~~END~~~~~
>>
>> (4) Add missing import expressions and add output expression at the end:
>>
>> ~~~~START~~~~
>> ;; add module imports
>> (use-modules
>> (guix packages)
>> (guix download)
>> (guix build-system python)
>> ((guix licenses) #:prefix license:)
>> ;; use `guix environment --ad-hoc python-jinja2 -- guix package -A python-jinja2` to find the location of python-jinja2, which is gnu/packages/python-xyz.scm
> This can be just 'guix package -A python-jinja2', no need for the
> environment.
>
>> (gnu packages python-xyz)
>> ;; for python-tornado
>> (gnu packages python-web)
>> ;; for python-pytest
>> (gnu packages check))
>>
>> ;; QUESTION: Why are those required packages not imported by guix automatically?
>> ;; QUESTION: Why are the manually imported packages not actually in files with their own name, but instead jinja2 -> python-xyz, tornado -> python-web, and pytest -> check?
>> ;; QUESTION: Is my process of finding the files in which the packages are correct or just working by chance?
>>
>> (define-public python-jupyterlab-server
>> (package
>> (name "python-jupyterlab-server")
>> (version "1.2.0")
>> (source
>> (origin
>> (method url-fetch)
>> (uri (pypi-uri "jupyterlab-server" version))
>> (sha256
>> (base32
>> "132xby7531rbrjg9bqvsx86birr1blynjxy8gi5kcnb6x7fxjcal"))))
>> (build-system python-build-system)
>> (propagated-inputs
>> `(("python-jinja2" ,python-jinja2)
>> ("python-json5" ,python-json5)
>> ("python-jsonschema" ,python-jsonschema)
>> ("python-notebook" ,python-notebook)
>> ("python-requests" ,python-requests)))
>> (native-inputs
>> `(("python-pytest" ,python-pytest)
>> ("python-requests" ,python-requests)))
>> (home-page "https://jupyter.org")
>> (synopsis "JupyterLab Server")
>> (description "JupyterLab Server")
>> (license license:bsd-3)))
>>
>> (define-public python-jupyterlab
>> (package
>> (name "python-jupyterlab")
>> (version "2.1.5")
>> (source
>> (origin
>> (method url-fetch)
>> (uri (pypi-uri "jupyterlab" version))
>> (sha256
>> (base32
>> "162jn51cg36fsn4l2zhnb5n4nbkhm9wlv974ggcnmdij3i4r4yya"))))
>> (build-system python-build-system)
>> (propagated-inputs
>> `(("python-jinja2" ,python-jinja2)
>> ("python-jupyterlab-server"
>> ,python-jupyterlab-server)
>> ("python-notebook" ,python-notebook)
>> ("python-tornado" ,python-tornado)))
>> (native-inputs
>> `(("python-pytest" ,python-pytest)
>> ("python-pytest-check-links"
>> ,python-pytest-check-links)
>> ("python-requests" ,python-requests)
>> ("python-virtualenv" ,python-virtualenv)
>> ("python-wheel" ,python-wheel)))
>> (home-page "http://jupyter.org")
>> (synopsis
>> "The JupyterLab notebook server extension.")
>> (description
>> "The JupyterLab notebook server extension.")
>> (license license:bsd-3)))
>>
>> python-jupyterlab
>> ~~~~~END~~~~~
>>
>> And as noted in the comments, I have 3 questions at this point:
>>
>> (Q1) Why are those required packages not imported by guix automatically?
>> (My guess: This functionality simply has not yet been implemented.)
>>
>> (Q2) Why are the manually imported packages not actually in files with
>> their own name, but instead jinja2 -> python-xyt, tornado -> python-web,
>> and pytest -> check? Why not (gnu packages python pytest) for example?
>>
>> (Q3) Is my process of finding the files in which the packages are
>> correct or just working by chance? Basically I am creating temporary
>> environments, in which I then lookup "where would the package be
>> installed" and then exit the temporary environment to use that
>> information in my imported package file's import expressions /
>> use-modules expression. This seems to be a bit of a convoluted process,
>> though worth it, if it always works in the end.
>>
>> (4) Now I run my time-machine command:
>>
>> ~~~~START~~~~
>> $ guix time-machine --channels=channels.scm -- environment --manifest=manifest.scm --load=jupyterlab.scm
>> ~~~~~END~~~~~
>>
>> This take a moment and then I get an error (the full output is longer,
>> but when running it multiple times, already successful steps are not all
>> done repeatedly, so the output is then reduced to what fails):
>>
>> ~~~~START~~~~
>> $ guix time-machine --channels=channels.scm -- environment --manifest=manifest.scm --load=jupyterlab.scm
>> Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.org/git/guix.git'...
>> The following derivations will be built:
>> /gnu/store/wzmfn9m45bmsbrx094rv3lf3w0rpmw49-python-pytest-check-links-0.3.0.drv
>> /gnu/store/n9i421lrbwrr8d0947w5vma7rhy3iyba-python-jupyterlab-server-1.2.0.drv
>> /gnu/store/s7jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv
>>
>> 4,2 MB will be downloaded
>> downloading from https://ci.guix.gnu.org/nar/lzip/2nahbs5v8q073gjmy224gk0h5lsh1kkw-python-nbconvert-5.0.0b1 ...
>> python-nbconvert-5.0.0b1 301KiB 2.0MiB/s 00:00 [##################] 100.0%
>>
>> building /gnu/store/s7jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv...
>> |builder for `/gnu/store/s7jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv' failed to produce output path `/gnu/store/92md7gh966n4fzj6al267lqq4xjx0ncf-jupyterlab-server-1.2.0.tar.gz'
>> build of /gnu/store/s7jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv failed
>> View build log at '/var/log/guix/drvs/s7/jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv.bz2'.
>> cannot build derivation `/gnu/store/n9i421lrbwrr8d0947w5vma7rhy3iyba-python-jupyterlab-server-1.2.0.drv': 1 dependencies couldn't be built
>> killing process 7384
>> guix environment: error: build of `/gnu/store/n9i421lrbwrr8d0947w5vma7rhy3iyba-python-jupyterlab-server-1.2.0.drv' failed
>> ~~~~~END~~~~~
>>
>> OK, an error, perhaps I can understand it. Lets look at that log file:
>>
>> ~~~~START~~~~
>> $ cp /var/log/guix/drvs/s7/jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv.bz2 .
>> $ bzip2 --decompress jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv.bz2
>> $ cat jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv
>>
>> Starting download of /gnu/store/92md7gh966n4fzj6al267lqq4xjx0ncf-jupyterlab-server-1.2.0.tar.gz
>> From https://files.pythonhosted.org/packages/source/j/jupyterlab-server/jupyterlab-server-1.2.0.tar.gz...
>> download failed "https://files.pythonhosted.org/packages/source/j/jupyterlab-server/jupyterlab-server-1.2.0.tar.gz" 404 "Not Found"
>>
>> Starting download of /gnu/store/92md7gh966n4fzj6al267lqq4xjx0ncf-jupyterlab-server-1.2.0.tar.gz
>> From https://ci.guix.gnu.org/file/jupyterlab-server-1.2.0.tar.gz/sha256/132xby7531rbrjg9bqvsx86birr1blynjxy8gi5kcnb6x7fxjcal...
>> download failed "https://ci.guix.gnu.org/file/jupyterlab-server-1.2.0.tar.gz/sha256/132xby7531rbrjg9bqvsx86birr1blynjxy8gi5kcnb6x7fxjcal" 404 "Not Found"
>>
>> Starting download of /gnu/store/92md7gh966n4fzj6al267lqq4xjx0ncf-jupyterlab-server-1.2.0.tar.gz
>> From https://tarballs.nixos.org/sha256/132xby7531rbrjg9bqvsx86birr1blynjxy8gi5kcnb6x7fxjcal...
>> download failed "https://tarballs.nixos.org/sha256/132xby7531rbrjg9bqvsx86birr1blynjxy8gi5kcnb6x7fxjcal" 404 "Not Found"
>>
>> Starting download of /gnu/store/92md7gh966n4fzj6al267lqq4xjx0ncf-jupyterlab-server-1.2.0.tar.gz
>> From https://archive.softwareheritage.org/api/1/content/sha256:5431d9dde96659364b7cc877693d5d21e7b80cea7ae3959ecc2b87518e5f5d8c/raw/...
>> download failed "https://archive.softwareheritage.org/api/1/content/sha256:5431d9dde96659364b7cc877693d5d21e7b80cea7ae3959ecc2b87518e5f5d8c/raw/" 404 "Not Found"
>> failed to download "/gnu/store/92md7gh966n4fzj6al267lqq4xjx0ncf-jupyterlab-server-1.2.0.tar.gz" from "https://files.pythonhosted.org/packages/source/j/jupyterlab-server/jupyterlab-server-1.2.0.tar.gz"
>> ~~~~~END~~~~~
>>
>> So it seems, that the jupyterlab-server file is simply not downloadable
>> any longer!
>>
>> Trying using wget:
>>
>> ~~~~START~~~~
>> $ wget https://files.pythonhosted.org/packages/source/j/jupyterlab-server/jupyterlab-server-1.2.0.tar.gz
>> --2020-10-18 13:49:52-- https://files.pythonhosted.org/packages/source/j/jupyterlab-server/jupyterlab-server-1.2.0.tar.gz
>> Resolving files.pythonhosted.org (files.pythonhosted.org)... 2a04:4e42:9::319, 151.101.37.63
>> Connecting to files.pythonhosted.org (files.pythonhosted.org)|2a04:4e42:9::319|:443... failed: Connection refused.
>> Connecting to files.pythonhosted.org (files.pythonhosted.org)|151.101.37.63|:443... connected.
>> HTTP request sent, awaiting response... 404 Not Found
>> 2020-10-18 13:49:53 ERROR 404: Not Found.
>> ~~~~~END~~~~~
>>
>> So now I am out of ideas. It seems the file is not available any longer
>> and the definition of jupyterlab needs to be updated somewhere, so that
>> it does not try to download an old or non-existent version of
>> jupyter-labserver. But how is this usually done? Can I specify it
>> somewhere in one of the 3 files I have, or am I dependent on someone
>> fixing the jupyterlab-server dependency / input for juypterlab?
>>
>> Thanks for your help so far! Tell me, if I need to provide any more
>> information to solve the problem.
> Try chaning the URL line to (uri (pypi-uri "jupyterlab_server" version)),
> with an underscore (_). I don't have any special suggestions for knowing
> that it should be an underscore instead of a dash. The best I have is
> the output from 'guix import pypi jupyterlab-server:
>
> (ins)efraim@E5400 ~$ guix import pypi jupyterlab-server
>
> Starting download of /tmp/guix-file.ayJ41F
> From https://files.pythonhosted.org/packages/92/54/5f321ca4cebfb644ac59eb21601b46a2ff9831ffe1b4e5a588f2a7e98d48/jupyterlab_server-1.2.0.tar.gz...
> …er-1.2.0.tar.gz 22KiB 57KiB/s 00:00 [##################] 100.0%
>
>
>
>> Best regards,
>> Zelphir
>>
>>
>> On 10/16/20 2:25 PM, Tobias Geerinckx-Rice wrote:
>>> Zelphir,
>>>
>>> Zelphir Kaltstahl 写道:
>>>> $ guix import pypi 'jupyterlab@2.1.5' --recursive
>>> It will work if you substitute ‘/’ for ‘@’. Yes, this is a happy
>>> accident specific to the PyPI importer, and I'm sure you can guess why
>>> it happens to work.
>>>
>>>>> guix import hackage mtl@2.1.3.1
>>>> But that is in the "hackage" import section. Is the same not available
>>>> for PyPI?
>>> [...]
>>>
>>>> Do the various importers work differently?
>>> Unfortunately so. It would be great(TM) if PACKAGE[@VERSION] were
>>> standard. Each importer could handle it properly (e.g., by turning it
>>> into "/") or return a friendlier ‘the foo importer does not yet
>>> support versions’ error.
>>>
>>> I don't have the time, but this sounds like a good intermediate-level
>>> hack for someone who does :-)
>>>
>>> Kind regards,
>>>
>>> T G-R
>> --
>> repositories: https://notabug.org/ZelphirKaltstahl
>>
--
repositories: https://notabug.org/ZelphirKaltstahl
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: guix import error + New: setting up a jupyterlab environment
2020-10-19 14:31 ` Zelphir Kaltstahl
@ 2020-10-19 16:54 ` Efraim Flashner
2020-10-19 18:19 ` Zelphir Kaltstahl
0 siblings, 1 reply; 15+ messages in thread
From: Efraim Flashner @ 2020-10-19 16:54 UTC (permalink / raw)
To: Zelphir Kaltstahl; +Cc: help-guix
It looks like you need to add python-ipykernel to native-inputs. Unless it's needed to run the program and not just for the test suite, in which case it should go in propagated-inputs. There's no network available in the build environment so it can't retrieve ipykernel while building.
On October 19, 2020 2:31:53 PM UTC, Zelphir Kaltstahl <zelphirkaltstahl@posteo.de> wrote:
>Hello Efraim!
>
>Thank you! Your idea of replacing "-" with "_" seems to partially help:
>
>The package is downloaded and byte compiled. However, afterwards there
>is a problem, when it tries to copy the byte-compiled files in the "wrap
>phase" (comments inserted in some places):
>
>~~~~START~~~~
>### ... a lot of output before this ...
>
>byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/__init__.py to __init__.cpython-38.pyc
>byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/_version.py to _version.cpython-38.pyc
>byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/app.py to app.cpython-38.pyc
>byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/handlers.py to handlers.cpython-38.pyc
>byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/listings_handler.py to listings_handler.cpython-38.pyc
>byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/process.py to process.cpython-38.pyc
>byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/process_app.py to process_app.cpython-38.pyc
>byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/server.py to server.cpython-38.pyc
>byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/servertest.py to servertest.cpython-38.pyc
>byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/settings_handler.py to settings_handler.cpython-38.pyc
>byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/themes_handler.py to themes_handler.cpython-38.pyc
>byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/workspaces_handler.py to workspaces_handler.cpython-38.pyc
>byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/tests/__init__.py to __init__.cpython-38.pyc
>byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/tests/test_settings_api.py to test_settings_api.cpython-38.pyc
>byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/tests/test_workspaces_api.py to test_workspaces_api.cpython-38.pyc
>byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/tests/utils.py to utils.cpython-38.pyc
>
>### ... seems byte-compiling went without problems, but not comes the problem ...
>
>running install_egg_info
>Copying jupyterlab_server.egg-info to /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server-1.2.0-py3.8.egg-info
>running install_scripts
>phase `install' succeeded after 0.3 seconds
>starting phase `wrap'
>find-files: /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/bin: No such file or directory
>find-files: /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/sbin: No such file or directory
>phase `wrap' succeeded after 0.0 seconds
>starting phase `check'
>running "python setup.py" with command "test" and parameters ()
>running test
>Searching for ipykernel
>Reading https://pypi.org/simple/ipykernel/
>Download error on https://pypi.org/simple/ipykernel/: [Errno -2] Name or service not known -- Some packages may not be found!
>Couldn't find index page for 'ipykernel' (maybe misspelled?)
>Scanning index of all packages (this may take a while)
>Reading https://pypi.org/simple/
>Download error on https://pypi.org/simple/: [Errno -2] Name or service not known -- Some packages may not be found!
>No local packages or working download links found for ipykernel
>error: Could not find suitable distribution for Requirement.parse('ipykernel')
>command "python" "-c" "import setuptools, tokenize;__file__='setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\\r\\n', '\\n');f.close();exec(compile(code, __file__, 'exec'))" "test" failed with status 1
>~~~~~END~~~~~
>
>So it seems, that while the download URL is corrected, there is another
>place, where Guix has an error now, resulting in a final error shown in
>command line:
>
>~~~~START~~~~
>$ guix time-machine --channels=channels.scm -- environment --manifest=manifest.scm --load=jupyterlab.scm
>Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.org/git/guix.git'...
>substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0%
>The following derivations will be built:
> /gnu/store/wzmfn9m45bmsbrx094rv3lf3w0rpmw49-python-pytest-check-links-0.3.0.drv
> /gnu/store/96xf5mrg134mcsp01b0m1qs1lxkb401a-python-jupyterlab-server-1.2.0.drv
> /gnu/store/32a28hd7aainwn0hfsnf3blh8prmfz61-jupyterlab_server-1.2.0.tar.gz.drv
>
>3,9 MB will be downloaded
>downloading from https://ci.guix.gnu.org/nar/lzip/54kpl9psx16jwic4gpnjwh44kim04wlk-python-notebook-5.7.4 ...
> python-notebook-5.7.4 3.7MiB 5.1MiB/s 00:01 [##################] 100.0%
>
>building /gnu/store/32a28hd7aainwn0hfsnf3blh8prmfz61-jupyterlab_server-1.2.0.tar.gz.drv...
>downloading from https://files.pythonhosted.org/packages/source/j/jupyterlab_server/jupyterlab_server-1.2.0.tar.gz ...
>building /gnu/store/wzmfn9m45bmsbrx094rv3lf3w0rpmw49-python-pytest-check-links-0.3.0.drv...
>building /gnu/store/96xf5mrg134mcsp01b0m1qs1lxkb401a-python-jupyterlab-server-1.2.0.drv...
>\ 'check' phasebuilder for `/gnu/store/96xf5mrg134mcsp01b0m1qs1lxkb401a-python-jupyterlab-server-1.2.0.drv' failed with exit code 1
>build of /gnu/store/96xf5mrg134mcsp01b0m1qs1lxkb401a-python-jupyterlab-server-1.2.0.drv failed
>View build log at '/var/log/guix/drvs/96/xf5mrg134mcsp01b0m1qs1lxkb401a-python-jupyterlab-server-1.2.0.drv.bz2'.
>guix environment: error: build of `/gnu/store/96xf5mrg134mcsp01b0m1qs1lxkb401a-python-jupyterlab-server-1.2.0.drv' failed
>~~~~~END~~~~~
>
>Apparently ipykernel is not found, but when I visit
>https://pypi.org/simple/ipykernel/, I see packages there.
>
>From the logs:
>
>~~~~START~~~~
>Download error on https://pypi.org/simple/ipykernel/: [Errno -2] Name or service not known -- Some packages may not be found!
>Couldn't find index page for 'ipykernel' (maybe misspelled?)
>~~~~~END~~~~~
>
>Do I need to add another input in my `jupyterlab.scm`? (How?) Or perhaps
>I need to create a separate `ipykernel.scm` which contains the output of
>`guix import pypi --recursive ipykernel`?
>
>However, it somehow seems to fail for PyPI simple in general (from the
>logs again):
>
>~~~~START~~~~
>Reading https://pypi.org/simple/
>Download error on https://pypi.org/simple/: [Errno -2] Name or service not known -- Some packages may not be found!
>No local packages or working download links found for ipykernel
>error: Could not find suitable distribution for Requirement.parse('ipykernel')
>command "python" "-c" "import setuptools, tokenize;__file__='setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\\r\\n', '\\n');f.close();exec(compile(code, __file__, 'exec'))" "test" failed with status 1
>~~~~~END~~~~~
>
>Thanks,
>Zelphir
>
>
>On 10/18/20 6:35 PM, Efraim Flashner wrote:
>> On Sun, Oct 18, 2020 at 01:55:49PM +0200, Zelphir Kaltstahl wrote:
>>> Hello Guix Users, hello Zimoun and Tobias!
>>>
>>> Thanks for your information regarding the importer syntax thing.
>>>
>>> I continued trying to get a jupyterlab environment today.
>>>
>>> Here is what I did so far:
>>>
>>> (1) Create my manifest file:
>>>
>>> ~~~~START~~~~
>>> (specifications->manifest
>>> '("python"))
>>> ~~~~~END~~~~~
>>>
>>> (2) Create my channels file:
>>>
>>> ~~~~START~~~~
>>> $ guix describe --format=channels > channels.scm
>>> $ cat channels.scm
>>> (list (channel
>>> (name 'guix)
>>> (url "https://git.savannah.gnu.org/git/guix.git")
>>> (commit
>>> "6ca673b30dac281ba27a8dac242c0ac83e5e354b")
>>> (introduction
>>> (make-channel-introduction
>>> "9edb3f66fd807b096b48283debdcddccfea34bad"
>>> (openpgp-fingerprint
>>> "BBB0 2DDF 2CEA F6A8 0D1D E643 A2A0 6DF2 A33A 54FA")))))
>>> ~~~~~END~~~~~
>>>
>>> (3) Create my jupyterlab PyPI import file, this time around using the
>>> "/" instead of "@" for specifying the version:
>>>
>>> ~~~~START~~~~
>>> $ guix import pypi --recursive jupyterlab/2.1.5 > jupyterlab.scm
>>> ~~~~~END~~~~~
>>>
>>> (4) Add missing import expressions and add output expression at the end:
>>>
>>> ~~~~START~~~~
>>> ;; add module imports
>>> (use-modules
>>> (guix packages)
>>> (guix download)
>>> (guix build-system python)
>>> ((guix licenses) #:prefix license:)
>>> ;; use `guix environment --ad-hoc python-jinja2 -- guix package -A python-jinja2` to find the location of python-jinja2, which is gnu/packages/python-xyz.scm
>> This can be just 'guix package -A python-jinja2', no need for the
>> environment.
>>
>>> (gnu packages python-xyz)
>>> ;; for python-tornado
>>> (gnu packages python-web)
>>> ;; for python-pytest
>>> (gnu packages check))
>>>
>>> ;; QUESTION: Why are those required packages not imported by guix automatically?
>>> ;; QUESTION: Why are the manually imported packages not actually in files with their own name, but instead jinja2 -> python-xyz, tornado -> python-web, and pytest -> check?
>>> ;; QUESTION: Is my process of finding the files in which the packages are correct or just working by chance?
>>>
>>> (define-public python-jupyterlab-server
>>> (package
>>> (name "python-jupyterlab-server")
>>> (version "1.2.0")
>>> (source
>>> (origin
>>> (method url-fetch)
>>> (uri (pypi-uri "jupyterlab-server" version))
>>> (sha256
>>> (base32
>>> "132xby7531rbrjg9bqvsx86birr1blynjxy8gi5kcnb6x7fxjcal"))))
>>> (build-system python-build-system)
>>> (propagated-inputs
>>> `(("python-jinja2" ,python-jinja2)
>>> ("python-json5" ,python-json5)
>>> ("python-jsonschema" ,python-jsonschema)
>>> ("python-notebook" ,python-notebook)
>>> ("python-requests" ,python-requests)))
>>> (native-inputs
>>> `(("python-pytest" ,python-pytest)
>>> ("python-requests" ,python-requests)))
>>> (home-page "https://jupyter.org")
>>> (synopsis "JupyterLab Server")
>>> (description "JupyterLab Server")
>>> (license license:bsd-3)))
>>>
>>> (define-public python-jupyterlab
>>> (package
>>> (name "python-jupyterlab")
>>> (version "2.1.5")
>>> (source
>>> (origin
>>> (method url-fetch)
>>> (uri (pypi-uri "jupyterlab" version))
>>> (sha256
>>> (base32
>>> "162jn51cg36fsn4l2zhnb5n4nbkhm9wlv974ggcnmdij3i4r4yya"))))
>>> (build-system python-build-system)
>>> (propagated-inputs
>>> `(("python-jinja2" ,python-jinja2)
>>> ("python-jupyterlab-server"
>>> ,python-jupyterlab-server)
>>> ("python-notebook" ,python-notebook)
>>> ("python-tornado" ,python-tornado)))
>>> (native-inputs
>>> `(("python-pytest" ,python-pytest)
>>> ("python-pytest-check-links"
>>> ,python-pytest-check-links)
>>> ("python-requests" ,python-requests)
>>> ("python-virtualenv" ,python-virtualenv)
>>> ("python-wheel" ,python-wheel)))
>>> (home-page "http://jupyter.org")
>>> (synopsis
>>> "The JupyterLab notebook server extension.")
>>> (description
>>> "The JupyterLab notebook server extension.")
>>> (license license:bsd-3)))
>>>
>>> python-jupyterlab
>>> ~~~~~END~~~~~
>>>
>>> And as noted in the comments, I have 3 questions at this point:
>>>
>>> (Q1) Why are those required packages not imported by guix automatically?
>>> (My guess: This functionality simply has not yet been implemented.)
>>>
>>> (Q2) Why are the manually imported packages not actually in files with
>>> their own name, but instead jinja2 -> python-xyt, tornado -> python-web,
>>> and pytest -> check? Why not (gnu packages python pytest) for example?
>>>
>>> (Q3) Is my process of finding the files in which the packages are
>>> correct or just working by chance? Basically I am creating temporary
>>> environments, in which I then lookup "where would the package be
>>> installed" and then exit the temporary environment to use that
>>> information in my imported package file's import expressions /
>>> use-modules expression. This seems to be a bit of a convoluted process,
>>> though worth it, if it always works in the end.
>>>
>>> (4) Now I run my time-machine command:
>>>
>>> ~~~~START~~~~
>>> $ guix time-machine --channels=channels.scm -- environment --manifest=manifest.scm --load=jupyterlab.scm
>>> ~~~~~END~~~~~
>>>
>>> This take a moment and then I get an error (the full output is longer,
>>> but when running it multiple times, already successful steps are not all
>>> done repeatedly, so the output is then reduced to what fails):
>>>
>>> ~~~~START~~~~
>>> $ guix time-machine --channels=channels.scm -- environment --manifest=manifest.scm --load=jupyterlab.scm
>>> Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.org/git/guix.git'...
>>> The following derivations will be built:
>>> /gnu/store/wzmfn9m45bmsbrx094rv3lf3w0rpmw49-python-pytest-check-links-0.3.0.drv
>>> /gnu/store/n9i421lrbwrr8d0947w5vma7rhy3iyba-python-jupyterlab-server-1.2.0.drv
>>> /gnu/store/s7jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv
>>>
>>> 4,2 MB will be downloaded
>>> downloading from https://ci.guix.gnu.org/nar/lzip/2nahbs5v8q073gjmy224gk0h5lsh1kkw-python-nbconvert-5.0.0b1 ...
>>> python-nbconvert-5.0.0b1 301KiB 2.0MiB/s 00:00 [##################] 100.0%
>>>
>>> building /gnu/store/s7jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv...
>>> |builder for `/gnu/store/s7jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv' failed to produce output path `/gnu/store/92md7gh966n4fzj6al267lqq4xjx0ncf-jupyterlab-server-1.2.0.tar.gz'
>>> build of /gnu/store/s7jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv failed
>>> View build log at '/var/log/guix/drvs/s7/jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv.bz2'.
>>> cannot build derivation `/gnu/store/n9i421lrbwrr8d0947w5vma7rhy3iyba-python-jupyterlab-server-1.2.0.drv': 1 dependencies couldn't be built
>>> killing process 7384
>>> guix environment: error: build of `/gnu/store/n9i421lrbwrr8d0947w5vma7rhy3iyba-python-jupyterlab-server-1.2.0.drv' failed
>>> ~~~~~END~~~~~
>>>
>>> OK, an error, perhaps I can understand it. Lets look at that log file:
>>>
>>> ~~~~START~~~~
>>> $ cp /var/log/guix/drvs/s7/jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv.bz2 .
>>> $ bzip2 --decompress jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv.bz2
>>> $ cat jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv
>>>
>>> Starting download of /gnu/store/92md7gh966n4fzj6al267lqq4xjx0ncf-jupyterlab-server-1.2.0.tar.gz
>>> From https://files.pythonhosted.org/packages/source/j/jupyterlab-server/jupyterlab-server-1.2.0.tar.gz...
>>> download failed "https://files.pythonhosted.org/packages/source/j/jupyterlab-server/jupyterlab-server-1.2.0.tar.gz" 404 "Not Found"
>>>
>>> Starting download of /gnu/store/92md7gh966n4fzj6al267lqq4xjx0ncf-jupyterlab-server-1.2.0.tar.gz
>>> From https://ci.guix.gnu.org/file/jupyterlab-server-1.2.0.tar.gz/sha256/132xby7531rbrjg9bqvsx86birr1blynjxy8gi5kcnb6x7fxjcal...
>>> download failed "https://ci.guix.gnu.org/file/jupyterlab-server-1.2.0.tar.gz/sha256/132xby7531rbrjg9bqvsx86birr1blynjxy8gi5kcnb6x7fxjcal" 404 "Not Found"
>>>
>>> Starting download of /gnu/store/92md7gh966n4fzj6al267lqq4xjx0ncf-jupyterlab-server-1.2.0.tar.gz
>>> From https://tarballs.nixos.org/sha256/132xby7531rbrjg9bqvsx86birr1blynjxy8gi5kcnb6x7fxjcal...
>>> download failed "https://tarballs.nixos.org/sha256/132xby7531rbrjg9bqvsx86birr1blynjxy8gi5kcnb6x7fxjcal" 404 "Not Found"
>>>
>>> Starting download of /gnu/store/92md7gh966n4fzj6al267lqq4xjx0ncf-jupyterlab-server-1.2.0.tar.gz
>>> From https://archive.softwareheritage.org/api/1/content/sha256:5431d9dde96659364b7cc877693d5d21e7b80cea7ae3959ecc2b87518e5f5d8c/raw/...
>>> download failed "https://archive.softwareheritage.org/api/1/content/sha256:5431d9dde96659364b7cc877693d5d21e7b80cea7ae3959ecc2b87518e5f5d8c/raw/" 404 "Not Found"
>>> failed to download "/gnu/store/92md7gh966n4fzj6al267lqq4xjx0ncf-jupyterlab-server-1.2.0.tar.gz" from "https://files.pythonhosted.org/packages/source/j/jupyterlab-server/jupyterlab-server-1.2.0.tar.gz"
>>> ~~~~~END~~~~~
>>>
>>> So it seems, that the jupyterlab-server file is simply not downloadable
>>> any longer!
>>>
>>> Trying using wget:
>>>
>>> ~~~~START~~~~
>>> $ wget https://files.pythonhosted.org/packages/source/j/jupyterlab-server/jupyterlab-server-1.2.0.tar.gz
>>> --2020-10-18 13:49:52-- https://files.pythonhosted.org/packages/source/j/jupyterlab-server/jupyterlab-server-1.2.0.tar.gz
>>> Resolving files.pythonhosted.org (files.pythonhosted.org)... 2a04:4e42:9::319, 151.101.37.63
>>> Connecting to files.pythonhosted.org (files.pythonhosted.org)|2a04:4e42:9::319|:443... failed: Connection refused.
>>> Connecting to files.pythonhosted.org (files.pythonhosted.org)|151.101.37.63|:443... connected.
>>> HTTP request sent, awaiting response... 404 Not Found
>>> 2020-10-18 13:49:53 ERROR 404: Not Found.
>>> ~~~~~END~~~~~
>>>
>>> So now I am out of ideas. It seems the file is not available any longer
>>> and the definition of jupyterlab needs to be updated somewhere, so that
>>> it does not try to download an old or non-existent version of
>>> jupyter-labserver. But how is this usually done? Can I specify it
>>> somewhere in one of the 3 files I have, or am I dependent on someone
>>> fixing the jupyterlab-server dependency / input for juypterlab?
>>>
>>> Thanks for your help so far! Tell me, if I need to provide any more
>>> information to solve the problem.
>> Try chaning the URL line to (uri (pypi-uri "jupyterlab_server" version)),
>> with an underscore (_). I don't have any special suggestions for knowing
>> that it should be an underscore instead of a dash. The best I have is
>> the output from 'guix import pypi jupyterlab-server:
>>
>> (ins)efraim@E5400 ~$ guix import pypi jupyterlab-server
>>
>> Starting download of /tmp/guix-file.ayJ41F
>> From https://files.pythonhosted.org/packages/92/54/5f321ca4cebfb644ac59eb21601b46a2ff9831ffe1b4e5a588f2a7e98d48/jupyterlab_server-1.2.0.tar.gz...
>> …er-1.2.0.tar.gz 22KiB 57KiB/s 00:00 [##################] 100.0%
>>
>>
>>
>>> Best regards,
>>> Zelphir
>>>
>>>
>>> On 10/16/20 2:25 PM, Tobias Geerinckx-Rice wrote:
>>>> Zelphir,
>>>>
>>>> Zelphir Kaltstahl 写道:
>>>>> $ guix import pypi 'jupyterlab@2.1.5' --recursive
>>>> It will work if you substitute ‘/’ for ‘@’. Yes, this is a happy
>>>> accident specific to the PyPI importer, and I'm sure you can guess why
>>>> it happens to work.
>>>>
>>>>>> guix import hackage mtl@2.1.3.1
>>>>> But that is in the "hackage" import section. Is the same not available
>>>>> for PyPI?
>>>> [...]
>>>>
>>>>> Do the various importers work differently?
>>>> Unfortunately so. It would be great(TM) if PACKAGE[@VERSION] were
>>>> standard. Each importer could handle it properly (e.g., by turning it
>>>> into "/") or return a friendlier ‘the foo importer does not yet
>>>> support versions’ error.
>>>>
>>>> I don't have the time, but this sounds like a good intermediate-level
>>>> hack for someone who does :-)
>>>>
>>>> Kind regards,
>>>>
>>>> T G-R
>>> --
>>> repositories: https://notabug.org/ZelphirKaltstahl
>>>
>--
>repositories: https://notabug.org/ZelphirKaltstahl
>
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: guix import error + New: setting up a jupyterlab environment
2020-10-19 16:54 ` Efraim Flashner
@ 2020-10-19 18:19 ` Zelphir Kaltstahl
2020-10-19 21:12 ` Zelphir Kaltstahl
2020-10-21 7:09 ` Efraim Flashner
0 siblings, 2 replies; 15+ messages in thread
From: Zelphir Kaltstahl @ 2020-10-19 18:19 UTC (permalink / raw)
To: Efraim Flashner; +Cc: help-guix
Hello Efraim,
Thanks for your patience! It seems with that I am getting quite far (at
least it feels like making progress, or even being close to have a
working environment), up to the "check phase". There some tests failing
in the "check phase". Here is what I am getting now, regardless of
whether I stick ("python-ipykernel" ,python-ipykernel) in the native
inputs or propagated inputs:
~~~~START~~~~
running install_egg_info
Copying jupyterlab_server.egg-info to /gnu/store/2h44ldpcqqd0q7hqpbcqdavcnbjsibfb-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server-1.2.0-py3.8.egg-info
running install_scripts
phase `install' succeeded after 0.3 seconds
starting phase `wrap'
find-files: /gnu/store/2h44ldpcqqd0q7hqpbcqdavcnbjsibfb-python-jupyterlab-server-1.2.0/bin: No such file or directory
find-files: /gnu/store/2h44ldpcqqd0q7hqpbcqdavcnbjsibfb-python-jupyterlab-server-1.2.0/sbin: No such file or directory
phase `wrap' succeeded after 0.0 seconds
starting phase `check'
running "python setup.py" with command "test" and parameters ()
running test
running egg_info
writing jupyterlab_server.egg-info/PKG-INFO
writing dependency_links to jupyterlab_server.egg-info/dependency_links.txt
writing requirements to jupyterlab_server.egg-info/requires.txt
writing top-level names to jupyterlab_server.egg-info/top_level.txt
reading manifest file 'jupyterlab_server.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*~' found anywhere in distribution
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '*.pyo' found anywhere in distribution
warning: no previously-included files matching '.git' found anywhere in distribution
warning: no previously-included files matching '.ipynb_checkpoints' found anywhere in distribution
writing manifest file 'jupyterlab_server.egg-info/SOURCES.txt'
running build_ext
test_get (jupyterlab_server.tests.test_settings_api.SettingsAPITest) ... ERROR
test_get_bad (jupyterlab_server.tests.test_settings_api.SettingsAPITest) ... ERROR
test_listing (jupyterlab_server.tests.test_settings_api.SettingsAPITest) ... ERROR
test_patch (jupyterlab_server.tests.test_settings_api.SettingsAPITest) ... ERROR
test_patch_bad_data (jupyterlab_server.tests.test_settings_api.SettingsAPITest) ... ERROR
test_patch_wrong_id (jupyterlab_server.tests.test_settings_api.SettingsAPITest) ... ERROR
test_bad_put (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest) ... ERROR
test_blank_put (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest) ... ERROR
test_delete (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest) ... ERROR
test_get (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest) ... ERROR
test_listing (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest) ... ERROR
test_put (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest) ... ERROR
======================================================================
ERROR: test_get (jupyterlab_server.tests.test_settings_api.SettingsAPITest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_settings_api.py", line 31, in setUp
dst = os.path.join(self.lab_config.schemas_dir, '@jupyterlab')
AttributeError: 'SettingsAPITest' object has no attribute 'lab_config'
======================================================================
ERROR: test_get_bad (jupyterlab_server.tests.test_settings_api.SettingsAPITest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_settings_api.py", line 31, in setUp
dst = os.path.join(self.lab_config.schemas_dir, '@jupyterlab')
AttributeError: 'SettingsAPITest' object has no attribute 'lab_config'
======================================================================
ERROR: test_listing (jupyterlab_server.tests.test_settings_api.SettingsAPITest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_settings_api.py", line 31, in setUp
dst = os.path.join(self.lab_config.schemas_dir, '@jupyterlab')
AttributeError: 'SettingsAPITest' object has no attribute 'lab_config'
======================================================================
ERROR: test_patch (jupyterlab_server.tests.test_settings_api.SettingsAPITest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_settings_api.py", line 31, in setUp
dst = os.path.join(self.lab_config.schemas_dir, '@jupyterlab')
AttributeError: 'SettingsAPITest' object has no attribute 'lab_config'
======================================================================
ERROR: test_patch_bad_data (jupyterlab_server.tests.test_settings_api.SettingsAPITest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_settings_api.py", line 31, in setUp
dst = os.path.join(self.lab_config.schemas_dir, '@jupyterlab')
AttributeError: 'SettingsAPITest' object has no attribute 'lab_config'
======================================================================
ERROR: test_patch_wrong_id (jupyterlab_server.tests.test_settings_api.SettingsAPITest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_settings_api.py", line 31, in setUp
dst = os.path.join(self.lab_config.schemas_dir, '@jupyterlab')
AttributeError: 'SettingsAPITest' object has no attribute 'lab_config'
======================================================================
ERROR: test_bad_put (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_workspaces_api.py", line 34, in setUp
dst = os.path.join(self.lab_config.workspaces_dir, item)
AttributeError: 'WorkspacesAPITest' object has no attribute 'lab_config'
======================================================================
ERROR: test_blank_put (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_workspaces_api.py", line 34, in setUp
dst = os.path.join(self.lab_config.workspaces_dir, item)
AttributeError: 'WorkspacesAPITest' object has no attribute 'lab_config'
======================================================================
ERROR: test_delete (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_workspaces_api.py", line 34, in setUp
dst = os.path.join(self.lab_config.workspaces_dir, item)
AttributeError: 'WorkspacesAPITest' object has no attribute 'lab_config'
======================================================================
ERROR: test_get (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_workspaces_api.py", line 34, in setUp
dst = os.path.join(self.lab_config.workspaces_dir, item)
AttributeError: 'WorkspacesAPITest' object has no attribute 'lab_config'
======================================================================
ERROR: test_listing (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_workspaces_api.py", line 34, in setUp
dst = os.path.join(self.lab_config.workspaces_dir, item)
AttributeError: 'WorkspacesAPITest' object has no attribute 'lab_config'
======================================================================
ERROR: test_put (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_workspaces_api.py", line 34, in setUp
dst = os.path.join(self.lab_config.workspaces_dir, item)
AttributeError: 'WorkspacesAPITest' object has no attribute 'lab_config'
----------------------------------------------------------------------
Ran 12 tests in 0.001s
FAILED (errors=12)
Test failed: <unittest.runner.TextTestResult run=12 errors=12 failures=0>
error: Test failed: <unittest.runner.TextTestResult run=12 errors=12 failures=0>
command "python" "-c" "import setuptools, tokenize;__file__='setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\\r\\n', '\\n');f.close();exec(compile(code, __file__, 'exec'))" "test" failed with status 1
~~~~~END~~~~~
I have some thoughts about this:
The Python error does not really tell me what is wrong. I don't know why
the `WorkspacesAPITest` does not have an attribute named `lab_config`.
One can see, that those are all API tests. Since there were problems in
the previous step with network, perhaps it is a network thing here as
well? (Is network, even if localhost for testing, available in the
"check phase"?)
It could also simply be, that some PyPI package has failing tests. I
don't know how one could then skip such tests.
I guess I will summarize everything in the end and put it in a
repository as a kind of "guide", so that others can use it or learn from
the process.
Regards,
Zelphir
On 10/19/20 6:54 PM, Efraim Flashner wrote:
> It looks like you need to add python-ipykernel to native-inputs.
> Unless it's needed to run the program and not just for the test suite,
> in which case it should go in propagated-inputs. There's no network
> available in the build environment so it can't retrieve ipykernel
> while building.
>
>
> On October 19, 2020 2:31:53 PM UTC, Zelphir Kaltstahl
> <zelphirkaltstahl@posteo.de> wrote:
>
> Hello Efraim!
>
> Thank you! Your idea of replacing "-" with "_" seems to partially
> help:
>
> The package is downloaded and byte compiled. However, afterwards
> there is a problem, when it tries to copy the byte-compiled files
> in the "wrap phase" (comments inserted in some places):
>
> ~~~~START~~~~
> ### ... a lot of output before this ...
>
> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/__init__.py to __init__.cpython-38.pyc
> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/_version.py to _version.cpython-38.pyc
> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/app.py to app.cpython-38.pyc
> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/handlers.py to handlers.cpython-38.pyc
> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/listings_handler.py to listings_handler.cpython-38.pyc
> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/process.py to process.cpython-38.pyc
> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/process_app.py to process_app.cpython-38.pyc
> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/server.py to server.cpython-38.pyc
> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/servertest.py to servertest.cpython-38.pyc
> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/settings_handler.py to settings_handler.cpython-38.pyc
> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/themes_handler.py to themes_handler.cpython-38.pyc
> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/workspaces_handler.py to workspaces_handler.cpython-38.pyc
> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/tests/__init__.py to __init__.cpython-38.pyc
> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/tests/test_settings_api.py to test_settings_api.cpython-38.pyc
> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/tests/test_workspaces_api.py to test_workspaces_api.cpython-38.pyc
> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/tests/utils.py to utils.cpython-38.pyc
>
> ### ... seems byte-compiling went without problems, but not comes the problem ...
>
> running install_egg_info
> Copying jupyterlab_server.egg-info to /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server-1.2.0-py3.8.egg-info
> running install_scripts
> phase `install' succeeded after 0.3 seconds
> starting phase `wrap'
> find-files: /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/bin: No such file or directory
> find-files: /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/sbin: No such file or directory
> phase `wrap' succeeded after 0.0 seconds
> starting phase `check'
> running "python setup.py" with command "test" and parameters ()
> running test
> Searching for ipykernel
> Reading https://pypi.org/simple/ipykernel/
> Download error on https://pypi.org/simple/ipykernel/: [Errno -2] Name or service not known -- Some packages may not be found!
> Couldn't find index page for 'ipykernel' (maybe misspelled?)
> Scanning index of all packages (this may take a while)
> Reading https://pypi.org/simple/
> Download error on https://pypi.org/simple/: [Errno -2] Name or service not known -- Some packages may not be found!
> No local packages or working download links found for ipykernel
> error: Could not find suitable distribution for Requirement.parse('ipykernel')
> command "python" "-c" "import setuptools, tokenize;__file__='setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\\r\\n', '\\n');f.close();exec(compile(code, __file__, 'exec'))" "test" failed with status 1
> ~~~~~END~~~~~
>
> So it seems, that while the download URL is corrected, there is
> another place, where Guix has an error now, resulting in a final
> error shown in command line:
>
> ~~~~START~~~~
> $ guix time-machine --channels=channels.scm -- environment --manifest=manifest.scm --load=jupyterlab.scm
> Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.org/git/guix.git'...
> substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0%
> The following derivations will be built:
> /gnu/store/wzmfn9m45bmsbrx094rv3lf3w0rpmw49-python-pytest-check-links-0.3.0.drv
> /gnu/store/96xf5mrg134mcsp01b0m1qs1lxkb401a-python-jupyterlab-server-1.2.0.drv
> /gnu/store/32a28hd7aainwn0hfsnf3blh8prmfz61-jupyterlab_server-1.2.0.tar.gz.drv
>
> 3,9 MB will be downloaded
> downloading from https://ci.guix.gnu.org/nar/lzip/54kpl9psx16jwic4gpnjwh44kim04wlk-python-notebook-5.7.4 ...
> python-notebook-5.7.4 3.7MiB 5.1MiB/s 00:01 [##################] 100.0%
>
> building /gnu/store/32a28hd7aainwn0hfsnf3blh8prmfz61-jupyterlab_server-1.2.0.tar.gz.drv...
> downloading from https://files.pythonhosted.org/packages/source/j/jupyterlab_server/jupyterlab_server-1.2.0.tar.gz ...
> building /gnu/store/wzmfn9m45bmsbrx094rv3lf3w0rpmw49-python-pytest-check-links-0.3.0.drv...
> building /gnu/store/96xf5mrg134mcsp01b0m1qs1lxkb401a-python-jupyterlab-server-1.2.0.drv...
> \ 'check' phasebuilder for `/gnu/store/96xf5mrg134mcsp01b0m1qs1lxkb401a-python-jupyterlab-server-1.2.0.drv' failed with exit code 1
> build of /gnu/store/96xf5mrg134mcsp01b0m1qs1lxkb401a-python-jupyterlab-server-1.2.0.drv failed
> View build log at '/var/log/guix/drvs/96/xf5mrg134mcsp01b0m1qs1lxkb401a-python-jupyterlab-server-1.2.0.drv.bz2'.
> guix environment: error: build of `/gnu/store/96xf5mrg134mcsp01b0m1qs1lxkb401a-python-jupyterlab-server-1.2.0.drv' failed
> ~~~~~END~~~~~
>
> Apparently ipykernel is not found, but when I visit
> https://pypi.org/simple/ipykernel/, I see packages there.
>
> From the logs:
>
> ~~~~START~~~~
> Download error on https://pypi.org/simple/ipykernel/: [Errno -2] Name or service not known -- Some packages may not be found!
> Couldn't find index page for 'ipykernel' (maybe misspelled?)
> ~~~~~END~~~~~
>
> Do I need to add another input in my `jupyterlab.scm`? (How?) Or
> perhaps I need to create a separate `ipykernel.scm` which contains
> the output of `guix import pypi --recursive ipykernel`?
>
> However, it somehow seems to fail for PyPI simple in general (from
> the logs again):
>
> ~~~~START~~~~
> Reading https://pypi.org/simple/
> Download error on https://pypi.org/simple/: [Errno -2] Name or service not known -- Some packages may not be found!
> No local packages or working download links found for ipykernel
> error: Could not find suitable distribution for Requirement.parse('ipykernel')
> command "python" "-c" "import setuptools, tokenize;__file__='setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\\r\\n', '\\n');f.close();exec(compile(code, __file__, 'exec'))" "test" failed with status 1
> ~~~~~END~~~~~
>
> Thanks,
> Zelphir
>
>
> On 10/18/20 6:35 PM, Efraim Flashner wrote:
>> On Sun, Oct 18, 2020 at 01:55:49PM +0200, Zelphir Kaltstahl wrote:
>>> Hello Guix Users, hello Zimoun and Tobias!
>>>
>>> Thanks for your information regarding the importer syntax thing.
>>>
>>> I continued trying to get a jupyterlab environment today.
>>>
>>> Here is what I did so far:
>>>
>>> (1) Create my manifest file:
>>>
>>> ~~~~START~~~~
>>> (specifications->manifest
>>> '("python"))
>>> ~~~~~END~~~~~
>>>
>>> (2) Create my channels file:
>>>
>>> ~~~~START~~~~
>>> $ guix describe --format=channels > channels.scm
>>> $ cat channels.scm
>>> (list (channel
>>> (name 'guix)
>>> (url "https://git.savannah.gnu.org/git/guix.git")
>>> (commit
>>> "6ca673b30dac281ba27a8dac242c0ac83e5e354b")
>>> (introduction
>>> (make-channel-introduction
>>> "9edb3f66fd807b096b48283debdcddccfea34bad"
>>> (openpgp-fingerprint
>>> "BBB0 2DDF 2CEA F6A8 0D1D E643 A2A0 6DF2 A33A 54FA")))))
>>> ~~~~~END~~~~~
>>>
>>> (3) Create my jupyterlab PyPI import file, this time around using the
>>> "/" instead of "@" for specifying the version:
>>>
>>> ~~~~START~~~~
>>> $ guix import pypi --recursive jupyterlab/2.1.5 > jupyterlab.scm
>>> ~~~~~END~~~~~
>>>
>>> (4) Add missing import expressions and add output expression at the end:
>>>
>>> ~~~~START~~~~
>>> ;; add module imports
>>> (use-modules
>>> (guix packages)
>>> (guix download)
>>> (guix build-system python)
>>> ((guix licenses) #:prefix license:)
>>> ;; use `guix environment --ad-hoc python-jinja2 -- guix package -A python-jinja2` to find the location of python-jinja2, which is gnu/packages/python-xyz.scm
>> This can be just 'guix package -A python-jinja2', no need for the
>> environment.
>>
>>> (gnu packages python-xyz)
>>> ;; for python-tornado
>>> (gnu packages python-web)
>>> ;; for python-pytest
>>> (gnu packages check))
>>>
>>> ;; QUESTION: Why are those required packages not imported by guix automatically?
>>> ;; QUESTION: Why are the manually imported packages not actually in files with their own name, but instead jinja2 -> python-xyz, tornado -> python-web, and pytest -> check?
>>> ;; QUESTION: Is my process of finding the files in which the packages are correct or just working by chance?
>>>
>>> (define-public python-jupyterlab-server
>>> (package
>>> (name "python-jupyterlab-server")
>>> (version "1.2.0")
>>> (source
>>> (origin
>>> (method url-fetch)
>>> (uri (pypi-uri "jupyterlab-server" version))
>>> (sha256
>>> (base32
>>> "132xby7531rbrjg9bqvsx86birr1blynjxy8gi5kcnb6x7fxjcal"))))
>>> (build-system python-build-system)
>>> (propagated-inputs
>>> `(("python-jinja2" ,python-jinja2)
>>> ("python-json5" ,python-json5)
>>> ("python-jsonschema" ,python-jsonschema)
>>> ("python-notebook" ,python-notebook)
>>> ("python-requests" ,python-requests)))
>>> (native-inputs
>>> `(("python-pytest" ,python-pytest)
>>> ("python-requests" ,python-requests)))
>>> (home-page "https://jupyter.org")
>>> (synopsis "JupyterLab Server")
>>> (description "JupyterLab Server")
>>> (license license:bsd-3)))
>>>
>>> (define-public python-jupyterlab
>>> (package
>>> (name "python-jupyterlab")
>>> (version "2.1.5")
>>> (source
>>> (origin
>>> (method url-fetch)
>>> (uri (pypi-uri "jupyterlab" version))
>>> (sha256
>>> (base32
>>> "162jn51cg36fsn4l2zhnb5n4nbkhm9wlv974ggcnmdij3i4r4yya"))))
>>> (build-system python-build-system)
>>> (propagated-inputs
>>> `(("python-jinja2" ,python-jinja2)
>>> ("python-jupyterlab-server"
>>> ,python-jupyterlab-server)
>>> ("python-notebook" ,python-notebook)
>>> ("python-tornado" ,python-tornado)))
>>> (native-inputs
>>> `(("python-pytest" ,python-pytest)
>>> ("python-pytest-check-links"
>>> ,python-pytest-check-links)
>>> ("python-requests" ,python-requests)
>>> ("python-virtualenv" ,python-virtualenv)
>>> ("python-wheel" ,python-wheel)))
>>> (home-page "http://jupyter.org")
>>> (synopsis
>>> "The JupyterLab notebook server extension.")
>>> (description
>>> "The JupyterLab notebook server extension.")
>>> (license license:bsd-3)))
>>>
>>> python-jupyterlab
>>> ~~~~~END~~~~~
>>>
>>> And as noted in the comments, I have 3 questions at this point:
>>>
>>> (Q1) Why are those required packages not imported by guix automatically?
>>> (My guess: This functionality simply has not yet been implemented.)
>>>
>>> (Q2) Why are the manually imported packages not actually in files with
>>> their own name, but instead jinja2 -> python-xyt, tornado -> python-web,
>>> and pytest -> check? Why not (gnu packages python pytest) for example?
>>>
>>> (Q3) Is my process of finding the files in which the packages are
>>> correct or just working by chance? Basically I am creating temporary
>>> environments, in which I then lookup "where would the package be
>>> installed" and then exit the temporary environment to use that
>>> information in my imported package file's import expressions /
>>> use-modules expression. This seems to be a bit of a convoluted process,
>>> though worth it, if it always works in the end.
>>>
>>> (4) Now I run my time-machine command:
>>>
>>> ~~~~START~~~~
>>> $ guix time-machine --channels=channels.scm -- environment --manifest=manifest.scm --load=jupyterlab.scm
>>> ~~~~~END~~~~~
>>>
>>> This take a moment and then I get an error (the full output is longer,
>>> but when running it multiple times, already successful steps are not all
>>> done repeatedly, so the output is then reduced to what fails):
>>>
>>> ~~~~START~~~~
>>> $ guix time-machine --channels=channels.scm -- environment --manifest=manifest.scm --load=jupyterlab.scm
>>> Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.org/git/guix.git'...
>>> The following derivations will be built:
>>> /gnu/store/wzmfn9m45bmsbrx094rv3lf3w0rpmw49-python-pytest-check-links-0.3.0.drv
>>> /gnu/store/n9i421lrbwrr8d0947w5vma7rhy3iyba-python-jupyterlab-server-1.2.0.drv
>>> /gnu/store/s7jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv
>>>
>>> 4,2 MB will be downloaded
>>> downloading from https://ci.guix.gnu.org/nar/lzip/2nahbs5v8q073gjmy224gk0h5lsh1kkw-python-nbconvert-5.0.0b1 ...
>>> python-nbconvert-5.0.0b1 301KiB 2.0MiB/s 00:00 [##################] 100.0%
>>>
>>> building /gnu/store/s7jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv...
>>> |builder for `/gnu/store/s7jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv' failed to produce output path `/gnu/store/92md7gh966n4fzj6al267lqq4xjx0ncf-jupyterlab-server-1.2.0.tar.gz'
>>> build of /gnu/store/s7jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv failed
>>> View build log at '/var/log/guix/drvs/s7/jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv.bz2'.
>>> cannot build derivation `/gnu/store/n9i421lrbwrr8d0947w5vma7rhy3iyba-python-jupyterlab-server-1.2.0.drv': 1 dependencies couldn't be built
>>> killing process 7384
>>> guix environment: error: build of `/gnu/store/n9i421lrbwrr8d0947w5vma7rhy3iyba-python-jupyterlab-server-1.2.0.drv' failed
>>> ~~~~~END~~~~~
>>>
>>> OK, an error, perhaps I can understand it. Lets look at that log file:
>>>
>>> ~~~~START~~~~
>>> $ cp /var/log/guix/drvs/s7/jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv.bz2 .
>>> $ bzip2 --decompress jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv.bz2
>>> $ cat jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv
>>>
>>> Starting download of /gnu/store/92md7gh966n4fzj6al267lqq4xjx0ncf-jupyterlab-server-1.2.0.tar.gz
>>> From https://files.pythonhosted.org/packages/source/j/jupyterlab-server/jupyterlab-server-1.2.0.tar.gz...
>>> download failed "https://files.pythonhosted.org/packages/source/j/jupyterlab-server/jupyterlab-server-1.2.0.tar.gz" 404 "Not Found"
>>>
>>> Starting download of /gnu/store/92md7gh966n4fzj6al267lqq4xjx0ncf-jupyterlab-server-1.2.0.tar.gz
>>> From https://ci.guix.gnu.org/file/jupyterlab-server-1.2.0.tar.gz/sha256/132xby7531rbrjg9bqvsx86birr1blynjxy8gi5kcnb6x7fxjcal...
>>> download failed "https://ci.guix.gnu.org/file/jupyterlab-server-1.2.0.tar.gz/sha256/132xby7531rbrjg9bqvsx86birr1blynjxy8gi5kcnb6x7fxjcal" 404 "Not Found"
>>>
>>> Starting download of /gnu/store/92md7gh966n4fzj6al267lqq4xjx0ncf-jupyterlab-server-1.2.0.tar.gz
>>> From https://tarballs.nixos.org/sha256/132xby7531rbrjg9bqvsx86birr1blynjxy8gi5kcnb6x7fxjcal...
>>> download failed "https://tarballs.nixos.org/sha256/132xby7531rbrjg9bqvsx86birr1blynjxy8gi5kcnb6x7fxjcal" 404 "Not Found"
>>>
>>> Starting download of /gnu/store/92md7gh966n4fzj6al267lqq4xjx0ncf-jupyterlab-server-1.2.0.tar.gz
>>> From https://archive.softwareheritage.org/api/1/content/sha256:5431d9dde96659364b7cc877693d5d21e7b80cea7ae3959ecc2b87518e5f5d8c/raw/...
>>> download failed "https://archive.softwareheritage.org/api/1/content/sha256:5431d9dde96659364b7cc877693d5d21e7b80cea7ae3959ecc2b87518e5f5d8c/raw/" 404 "Not Found"
>>> failed to download "/gnu/store/92md7gh966n4fzj6al267lqq4xjx0ncf-jupyterlab-server-1.2.0.tar.gz" from "https://files.pythonhosted.org/packages/source/j/jupyterlab-server/jupyterlab-server-1.2.0.tar.gz"
>>> ~~~~~END~~~~~
>>>
>>> So it seems, that the jupyterlab-server file is simply not downloadable
>>> any longer!
>>>
>>> Trying using wget:
>>>
>>> ~~~~START~~~~
>>> $ wget https://files.pythonhosted.org/packages/source/j/jupyterlab-server/jupyterlab-server-1.2.0.tar.gz
>>> --2020-10-18 13:49:52-- https://files.pythonhosted.org/packages/source/j/jupyterlab-server/jupyterlab-server-1.2.0.tar.gz
>>> Resolving files.pythonhosted.org (files.pythonhosted.org)... 2a04:4e42:9::319, 151.101.37.63
>>> Connecting to files.pythonhosted.org (files.pythonhosted.org)|2a04:4e42:9::319|:443... failed: Connection refused.
>>> Connecting to files.pythonhosted.org (files.pythonhosted.org)|151.101.37.63|:443... connected.
>>> HTTP request sent, awaiting response... 404 Not Found
>>> 2020-10-18 13:49:53 ERROR 404: Not Found.
>>> ~~~~~END~~~~~
>>>
>>> So now I am out of ideas. It seems the file is not available any longer
>>> and the definition of jupyterlab needs to be updated somewhere, so that
>>> it does not try to download an old or non-existent version of
>>> jupyter-labserver. But how is this usually done? Can I specify it
>>> somewhere in one of the 3 files I have, or am I dependent on someone
>>> fixing the jupyterlab-server dependency / input for juypterlab?
>>>
>>> Thanks for your help so far! Tell me, if I need to provide any more
>>> information to solve the problem.
>> Try chaning the URL line to (uri (pypi-uri "jupyterlab_server" version)),
>> with an underscore (_). I don't have any special suggestions for knowing
>> that it should be an underscore instead of a dash. The best I have is
>> the output from 'guix import pypi jupyterlab-server:
>>
>> (ins)efraim@E5400 ~$ guix import pypi jupyterlab-server
>>
>> Starting download of /tmp/guix-file.ayJ41F
>> From https://files.pythonhosted.org/packages/92/54/5f321ca4cebfb644ac59eb21601b46a2ff9831ffe1b4e5a588f2a7e98d48/jupyterlab_server-1.2.0.tar.gz...
>> …er-1.2.0.tar.gz 22KiB 57KiB/s 00:00 [##################] 100.0%
>>
>>
>>
>>> Best regards,
>>> Zelphir
>>>
>>>
>>> On 10/16/20 2:25 PM, Tobias Geerinckx-Rice wrote:
>>>> Zelphir,
>>>>
>>>> Zelphir Kaltstahl 写道:
>>>>> $ guix import pypi 'jupyterlab@2.1.5' --recursive
>>>> It will work if you substitute ‘/’ for ‘@’. Yes, this is a happy
>>>> accident specific to the PyPI importer, and I'm sure you can guess why
>>>> it happens to work.
>>>>
>>>>>> guix import hackage mtl@2.1.3.1
>>>>> But that is in the "hackage" import section. Is the same not available
>>>>> for PyPI?
>>>> [...]
>>>>
>>>>> Do the various importers work differently?
>>>> Unfortunately so. It would be great(TM) if PACKAGE[@VERSION] were
>>>> standard. Each importer could handle it properly (e.g., by turning it
>>>> into "/") or return a friendlier ‘the foo importer does not yet
>>>> support versions’ error.
>>>>
>>>> I don't have the time, but this sounds like a good intermediate-level
>>>> hack for someone who does :-)
>>>>
>>>> Kind regards,
>>>>
>>>> T G-R
>>> --
>>> repositories: https://notabug.org/ZelphirKaltstahl
>>>
> --
> repositories: https://notabug.org/ZelphirKaltstahl
>
>
> --
> Sent from my Android device with K-9 Mail. Please excuse my brevity.
--
repositories: https://notabug.org/ZelphirKaltstahl
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: guix import error + New: setting up a jupyterlab environment
2020-10-19 18:19 ` Zelphir Kaltstahl
@ 2020-10-19 21:12 ` Zelphir Kaltstahl
2020-10-21 7:18 ` Efraim Flashner
2020-10-21 7:09 ` Efraim Flashner
1 sibling, 1 reply; 15+ messages in thread
From: Zelphir Kaltstahl @ 2020-10-19 21:12 UTC (permalink / raw)
To: Efraim Flashner; +Cc: help-guix
Meanwhile I have managed to run the jupyterlab-server tests, as
described in more details here:
https://github.com/jupyterlab/jupyterlab_server/issues/128
Indeed, in version 1.2.0 the tests fail the same way they fail when I
try to create my environment. This means the next thing to fix would
probably be to use another version of jupyterlab-server. 1.2.0 is a tag
in the jupyterlab-server repository, which _seems_ to be the latest
"stable" version, before a lot of alpha, beta, and release-candidate
versions follow.
I guess I could switch the commit in my `jupyterlab.scm` file to point
to a different one?
I can change the version to `2.0.0rc1`, but I do not know how the
checksum is calculated. The checksum is shorter than what I see on
simply PyPI:
https://files.pythonhosted.org/packages/79/43/5249be5ee741a93f3fa60823caf9a276cadc3103dae16d6e36cc534fefd8/jupyterlab_server-2.0.0rc1.tar.gz#sha256=733b149c5ab8e50ea5f2897c323047257060e7bf2dc0fa88663181427bec605d
and base32 should only make it longer, not shorter.
Can you explain how to switch a version manually and calculate the
checksum to match another version?
Regards,
Zelphir
On 10/19/20 8:19 PM, Zelphir Kaltstahl wrote:
>
> Hello Efraim,
>
> Thanks for your patience! It seems with that I am getting quite far
> (at least it feels like making progress, or even being close to have a
> working environment), up to the "check phase". There some tests
> failing in the "check phase". Here is what I am getting now,
> regardless of whether I stick ("python-ipykernel" ,python-ipykernel)
> in the native inputs or propagated inputs:
>
> ~~~~START~~~~
> running install_egg_info
> Copying jupyterlab_server.egg-info to /gnu/store/2h44ldpcqqd0q7hqpbcqdavcnbjsibfb-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server-1.2.0-py3.8.egg-info
> running install_scripts
> phase `install' succeeded after 0.3 seconds
> starting phase `wrap'
> find-files: /gnu/store/2h44ldpcqqd0q7hqpbcqdavcnbjsibfb-python-jupyterlab-server-1.2.0/bin: No such file or directory
> find-files: /gnu/store/2h44ldpcqqd0q7hqpbcqdavcnbjsibfb-python-jupyterlab-server-1.2.0/sbin: No such file or directory
> phase `wrap' succeeded after 0.0 seconds
> starting phase `check'
> running "python setup.py" with command "test" and parameters ()
> running test
> running egg_info
> writing jupyterlab_server.egg-info/PKG-INFO
> writing dependency_links to jupyterlab_server.egg-info/dependency_links.txt
> writing requirements to jupyterlab_server.egg-info/requires.txt
> writing top-level names to jupyterlab_server.egg-info/top_level.txt
> reading manifest file 'jupyterlab_server.egg-info/SOURCES.txt'
> reading manifest template 'MANIFEST.in'
> warning: no previously-included files matching '*~' found anywhere in distribution
> warning: no previously-included files matching '*.pyc' found anywhere in distribution
> warning: no previously-included files matching '*.pyo' found anywhere in distribution
> warning: no previously-included files matching '.git' found anywhere in distribution
> warning: no previously-included files matching '.ipynb_checkpoints' found anywhere in distribution
> writing manifest file 'jupyterlab_server.egg-info/SOURCES.txt'
> running build_ext
> test_get (jupyterlab_server.tests.test_settings_api.SettingsAPITest) ... ERROR
> test_get_bad (jupyterlab_server.tests.test_settings_api.SettingsAPITest) ... ERROR
> test_listing (jupyterlab_server.tests.test_settings_api.SettingsAPITest) ... ERROR
> test_patch (jupyterlab_server.tests.test_settings_api.SettingsAPITest) ... ERROR
> test_patch_bad_data (jupyterlab_server.tests.test_settings_api.SettingsAPITest) ... ERROR
> test_patch_wrong_id (jupyterlab_server.tests.test_settings_api.SettingsAPITest) ... ERROR
> test_bad_put (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest) ... ERROR
> test_blank_put (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest) ... ERROR
> test_delete (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest) ... ERROR
> test_get (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest) ... ERROR
> test_listing (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest) ... ERROR
> test_put (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest) ... ERROR
>
> ======================================================================
> ERROR: test_get (jupyterlab_server.tests.test_settings_api.SettingsAPITest)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_settings_api.py", line 31, in setUp
> dst = os.path.join(self.lab_config.schemas_dir, '@jupyterlab')
> AttributeError: 'SettingsAPITest' object has no attribute 'lab_config'
>
> ======================================================================
> ERROR: test_get_bad (jupyterlab_server.tests.test_settings_api.SettingsAPITest)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_settings_api.py", line 31, in setUp
> dst = os.path.join(self.lab_config.schemas_dir, '@jupyterlab')
> AttributeError: 'SettingsAPITest' object has no attribute 'lab_config'
>
> ======================================================================
> ERROR: test_listing (jupyterlab_server.tests.test_settings_api.SettingsAPITest)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_settings_api.py", line 31, in setUp
> dst = os.path.join(self.lab_config.schemas_dir, '@jupyterlab')
> AttributeError: 'SettingsAPITest' object has no attribute 'lab_config'
>
> ======================================================================
> ERROR: test_patch (jupyterlab_server.tests.test_settings_api.SettingsAPITest)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_settings_api.py", line 31, in setUp
> dst = os.path.join(self.lab_config.schemas_dir, '@jupyterlab')
> AttributeError: 'SettingsAPITest' object has no attribute 'lab_config'
>
> ======================================================================
> ERROR: test_patch_bad_data (jupyterlab_server.tests.test_settings_api.SettingsAPITest)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_settings_api.py", line 31, in setUp
> dst = os.path.join(self.lab_config.schemas_dir, '@jupyterlab')
> AttributeError: 'SettingsAPITest' object has no attribute 'lab_config'
>
> ======================================================================
> ERROR: test_patch_wrong_id (jupyterlab_server.tests.test_settings_api.SettingsAPITest)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_settings_api.py", line 31, in setUp
> dst = os.path.join(self.lab_config.schemas_dir, '@jupyterlab')
> AttributeError: 'SettingsAPITest' object has no attribute 'lab_config'
>
> ======================================================================
> ERROR: test_bad_put (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_workspaces_api.py", line 34, in setUp
> dst = os.path.join(self.lab_config.workspaces_dir, item)
> AttributeError: 'WorkspacesAPITest' object has no attribute 'lab_config'
>
> ======================================================================
> ERROR: test_blank_put (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_workspaces_api.py", line 34, in setUp
> dst = os.path.join(self.lab_config.workspaces_dir, item)
> AttributeError: 'WorkspacesAPITest' object has no attribute 'lab_config'
>
> ======================================================================
> ERROR: test_delete (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_workspaces_api.py", line 34, in setUp
> dst = os.path.join(self.lab_config.workspaces_dir, item)
> AttributeError: 'WorkspacesAPITest' object has no attribute 'lab_config'
>
> ======================================================================
> ERROR: test_get (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_workspaces_api.py", line 34, in setUp
> dst = os.path.join(self.lab_config.workspaces_dir, item)
> AttributeError: 'WorkspacesAPITest' object has no attribute 'lab_config'
>
> ======================================================================
> ERROR: test_listing (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_workspaces_api.py", line 34, in setUp
> dst = os.path.join(self.lab_config.workspaces_dir, item)
> AttributeError: 'WorkspacesAPITest' object has no attribute 'lab_config'
>
> ======================================================================
> ERROR: test_put (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_workspaces_api.py", line 34, in setUp
> dst = os.path.join(self.lab_config.workspaces_dir, item)
> AttributeError: 'WorkspacesAPITest' object has no attribute 'lab_config'
>
> ----------------------------------------------------------------------
> Ran 12 tests in 0.001s
>
> FAILED (errors=12)
> Test failed: <unittest.runner.TextTestResult run=12 errors=12 failures=0>
> error: Test failed: <unittest.runner.TextTestResult run=12 errors=12 failures=0>
> command "python" "-c" "import setuptools, tokenize;__file__='setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\\r\\n', '\\n');f.close();exec(compile(code, __file__, 'exec'))" "test" failed with status 1
> ~~~~~END~~~~~
>
> I have some thoughts about this:
>
> The Python error does not really tell me what is wrong. I don't know
> why the `WorkspacesAPITest` does not have an attribute named `lab_config`.
>
> One can see, that those are all API tests. Since there were problems
> in the previous step with network, perhaps it is a network thing here
> as well? (Is network, even if localhost for testing, available in the
> "check phase"?)
>
> It could also simply be, that some PyPI package has failing tests. I
> don't know how one could then skip such tests.
>
> I guess I will summarize everything in the end and put it in a
> repository as a kind of "guide", so that others can use it or learn
> from the process.
>
> Regards,
> Zelphir
>
> On 10/19/20 6:54 PM, Efraim Flashner wrote:
>> It looks like you need to add python-ipykernel to native-inputs.
>> Unless it's needed to run the program and not just for the test
>> suite, in which case it should go in propagated-inputs. There's no
>> network available in the build environment so it can't retrieve
>> ipykernel while building.
>>
>>
>> On October 19, 2020 2:31:53 PM UTC, Zelphir Kaltstahl
>> <zelphirkaltstahl@posteo.de> wrote:
>>
>> Hello Efraim!
>>
>> Thank you! Your idea of replacing "-" with "_" seems to partially
>> help:
>>
>> The package is downloaded and byte compiled. However, afterwards
>> there is a problem, when it tries to copy the byte-compiled files
>> in the "wrap phase" (comments inserted in some places):
>>
>> ~~~~START~~~~
>> ### ... a lot of output before this ...
>>
>> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/__init__.py to __init__.cpython-38.pyc
>> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/_version.py to _version.cpython-38.pyc
>> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/app.py to app.cpython-38.pyc
>> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/handlers.py to handlers.cpython-38.pyc
>> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/listings_handler.py to listings_handler.cpython-38.pyc
>> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/process.py to process.cpython-38.pyc
>> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/process_app.py to process_app.cpython-38.pyc
>> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/server.py to server.cpython-38.pyc
>> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/servertest.py to servertest.cpython-38.pyc
>> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/settings_handler.py to settings_handler.cpython-38.pyc
>> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/themes_handler.py to themes_handler.cpython-38.pyc
>> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/workspaces_handler.py to workspaces_handler.cpython-38.pyc
>> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/tests/__init__.py to __init__.cpython-38.pyc
>> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/tests/test_settings_api.py to test_settings_api.cpython-38.pyc
>> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/tests/test_workspaces_api.py to test_workspaces_api.cpython-38.pyc
>> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/tests/utils.py to utils.cpython-38.pyc
>>
>> ### ... seems byte-compiling went without problems, but not comes the problem ...
>>
>> running install_egg_info
>> Copying jupyterlab_server.egg-info to /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server-1.2.0-py3.8.egg-info
>> running install_scripts
>> phase `install' succeeded after 0.3 seconds
>> starting phase `wrap'
>> find-files: /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/bin: No such file or directory
>> find-files: /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/sbin: No such file or directory
>> phase `wrap' succeeded after 0.0 seconds
>> starting phase `check'
>> running "python setup.py" with command "test" and parameters ()
>> running test
>> Searching for ipykernel
>> Reading https://pypi.org/simple/ipykernel/
>> Download error on https://pypi.org/simple/ipykernel/: [Errno -2] Name or service not known -- Some packages may not be found!
>> Couldn't find index page for 'ipykernel' (maybe misspelled?)
>> Scanning index of all packages (this may take a while)
>> Reading https://pypi.org/simple/
>> Download error on https://pypi.org/simple/: [Errno -2] Name or service not known -- Some packages may not be found!
>> No local packages or working download links found for ipykernel
>> error: Could not find suitable distribution for Requirement.parse('ipykernel')
>> command "python" "-c" "import setuptools, tokenize;__file__='setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\\r\\n', '\\n');f.close();exec(compile(code, __file__, 'exec'))" "test" failed with status 1
>> ~~~~~END~~~~~
>>
>> So it seems, that while the download URL is corrected, there is
>> another place, where Guix has an error now, resulting in a final
>> error shown in command line:
>>
>> ~~~~START~~~~
>> $ guix time-machine --channels=channels.scm -- environment --manifest=manifest.scm --load=jupyterlab.scm
>> Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.org/git/guix.git'...
>> substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0%
>> The following derivations will be built:
>> /gnu/store/wzmfn9m45bmsbrx094rv3lf3w0rpmw49-python-pytest-check-links-0.3.0.drv
>> /gnu/store/96xf5mrg134mcsp01b0m1qs1lxkb401a-python-jupyterlab-server-1.2.0.drv
>> /gnu/store/32a28hd7aainwn0hfsnf3blh8prmfz61-jupyterlab_server-1.2.0.tar.gz.drv
>>
>> 3,9 MB will be downloaded
>> downloading from https://ci.guix.gnu.org/nar/lzip/54kpl9psx16jwic4gpnjwh44kim04wlk-python-notebook-5.7.4 ...
>> python-notebook-5.7.4 3.7MiB 5.1MiB/s 00:01 [##################] 100.0%
>>
>> building /gnu/store/32a28hd7aainwn0hfsnf3blh8prmfz61-jupyterlab_server-1.2.0.tar.gz.drv...
>> downloading from https://files.pythonhosted.org/packages/source/j/jupyterlab_server/jupyterlab_server-1.2.0.tar.gz ...
>> building /gnu/store/wzmfn9m45bmsbrx094rv3lf3w0rpmw49-python-pytest-check-links-0.3.0.drv...
>> building /gnu/store/96xf5mrg134mcsp01b0m1qs1lxkb401a-python-jupyterlab-server-1.2.0.drv...
>> \ 'check' phasebuilder for `/gnu/store/96xf5mrg134mcsp01b0m1qs1lxkb401a-python-jupyterlab-server-1.2.0.drv' failed with exit code 1
>> build of /gnu/store/96xf5mrg134mcsp01b0m1qs1lxkb401a-python-jupyterlab-server-1.2.0.drv failed
>> View build log at '/var/log/guix/drvs/96/xf5mrg134mcsp01b0m1qs1lxkb401a-python-jupyterlab-server-1.2.0.drv.bz2'.
>> guix environment: error: build of `/gnu/store/96xf5mrg134mcsp01b0m1qs1lxkb401a-python-jupyterlab-server-1.2.0.drv' failed
>> ~~~~~END~~~~~
>>
>> Apparently ipykernel is not found, but when I visit
>> https://pypi.org/simple/ipykernel/, I see packages there.
>>
>> From the logs:
>>
>> ~~~~START~~~~
>> Download error on https://pypi.org/simple/ipykernel/: [Errno -2] Name or service not known -- Some packages may not be found!
>> Couldn't find index page for 'ipykernel' (maybe misspelled?)
>> ~~~~~END~~~~~
>>
>> Do I need to add another input in my `jupyterlab.scm`? (How?) Or
>> perhaps I need to create a separate `ipykernel.scm` which
>> contains the output of `guix import pypi --recursive ipykernel`?
>>
>> However, it somehow seems to fail for PyPI simple in general
>> (from the logs again):
>>
>> ~~~~START~~~~
>> Reading https://pypi.org/simple/
>> Download error on https://pypi.org/simple/: [Errno -2] Name or service not known -- Some packages may not be found!
>> No local packages or working download links found for ipykernel
>> error: Could not find suitable distribution for Requirement.parse('ipykernel')
>> command "python" "-c" "import setuptools, tokenize;__file__='setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\\r\\n', '\\n');f.close();exec(compile(code, __file__, 'exec'))" "test" failed with status 1
>> ~~~~~END~~~~~
>>
>> Thanks,
>> Zelphir
>>
>>
>> On 10/18/20 6:35 PM, Efraim Flashner wrote:
>>> On Sun, Oct 18, 2020 at 01:55:49PM +0200, Zelphir Kaltstahl wrote:
>>>> Hello Guix Users, hello Zimoun and Tobias!
>>>>
>>>> Thanks for your information regarding the importer syntax thing.
>>>>
>>>> I continued trying to get a jupyterlab environment today.
>>>>
>>>> Here is what I did so far:
>>>>
>>>> (1) Create my manifest file:
>>>>
>>>> ~~~~START~~~~
>>>> (specifications->manifest
>>>> '("python"))
>>>> ~~~~~END~~~~~
>>>>
>>>> (2) Create my channels file:
>>>>
>>>> ~~~~START~~~~
>>>> $ guix describe --format=channels > channels.scm
>>>> $ cat channels.scm
>>>> (list (channel
>>>> (name 'guix)
>>>> (url "https://git.savannah.gnu.org/git/guix.git")
>>>> (commit
>>>> "6ca673b30dac281ba27a8dac242c0ac83e5e354b")
>>>> (introduction
>>>> (make-channel-introduction
>>>> "9edb3f66fd807b096b48283debdcddccfea34bad"
>>>> (openpgp-fingerprint
>>>> "BBB0 2DDF 2CEA F6A8 0D1D E643 A2A0 6DF2 A33A 54FA")))))
>>>> ~~~~~END~~~~~
>>>>
>>>> (3) Create my jupyterlab PyPI import file, this time around using the
>>>> "/" instead of "@" for specifying the version:
>>>>
>>>> ~~~~START~~~~
>>>> $ guix import pypi --recursive jupyterlab/2.1.5 > jupyterlab.scm
>>>> ~~~~~END~~~~~
>>>>
>>>> (4) Add missing import expressions and add output expression at the end:
>>>>
>>>> ~~~~START~~~~
>>>> ;; add module imports
>>>> (use-modules
>>>> (guix packages)
>>>> (guix download)
>>>> (guix build-system python)
>>>> ((guix licenses) #:prefix license:)
>>>> ;; use `guix environment --ad-hoc python-jinja2 -- guix package -A python-jinja2` to find the location of python-jinja2, which is gnu/packages/python-xyz.scm
>>> This can be just 'guix package -A python-jinja2', no need for the
>>> environment.
>>>
>>>> (gnu packages python-xyz)
>>>> ;; for python-tornado
>>>> (gnu packages python-web)
>>>> ;; for python-pytest
>>>> (gnu packages check))
>>>>
>>>> ;; QUESTION: Why are those required packages not imported by guix automatically?
>>>> ;; QUESTION: Why are the manually imported packages not actually in files with their own name, but instead jinja2 -> python-xyz, tornado -> python-web, and pytest -> check?
>>>> ;; QUESTION: Is my process of finding the files in which the packages are correct or just working by chance?
>>>>
>>>> (define-public python-jupyterlab-server
>>>> (package
>>>> (name "python-jupyterlab-server")
>>>> (version "1.2.0")
>>>> (source
>>>> (origin
>>>> (method url-fetch)
>>>> (uri (pypi-uri "jupyterlab-server" version))
>>>> (sha256
>>>> (base32
>>>> "132xby7531rbrjg9bqvsx86birr1blynjxy8gi5kcnb6x7fxjcal"))))
>>>> (build-system python-build-system)
>>>> (propagated-inputs
>>>> `(("python-jinja2" ,python-jinja2)
>>>> ("python-json5" ,python-json5)
>>>> ("python-jsonschema" ,python-jsonschema)
>>>> ("python-notebook" ,python-notebook)
>>>> ("python-requests" ,python-requests)))
>>>> (native-inputs
>>>> `(("python-pytest" ,python-pytest)
>>>> ("python-requests" ,python-requests)))
>>>> (home-page "https://jupyter.org")
>>>> (synopsis "JupyterLab Server")
>>>> (description "JupyterLab Server")
>>>> (license license:bsd-3)))
>>>>
>>>> (define-public python-jupyterlab
>>>> (package
>>>> (name "python-jupyterlab")
>>>> (version "2.1.5")
>>>> (source
>>>> (origin
>>>> (method url-fetch)
>>>> (uri (pypi-uri "jupyterlab" version))
>>>> (sha256
>>>> (base32
>>>> "162jn51cg36fsn4l2zhnb5n4nbkhm9wlv974ggcnmdij3i4r4yya"))))
>>>> (build-system python-build-system)
>>>> (propagated-inputs
>>>> `(("python-jinja2" ,python-jinja2)
>>>> ("python-jupyterlab-server"
>>>> ,python-jupyterlab-server)
>>>> ("python-notebook" ,python-notebook)
>>>> ("python-tornado" ,python-tornado)))
>>>> (native-inputs
>>>> `(("python-pytest" ,python-pytest)
>>>> ("python-pytest-check-links"
>>>> ,python-pytest-check-links)
>>>> ("python-requests" ,python-requests)
>>>> ("python-virtualenv" ,python-virtualenv)
>>>> ("python-wheel" ,python-wheel)))
>>>> (home-page "http://jupyter.org")
>>>> (synopsis
>>>> "The JupyterLab notebook server extension.")
>>>> (description
>>>> "The JupyterLab notebook server extension.")
>>>> (license license:bsd-3)))
>>>>
>>>> python-jupyterlab
>>>> ~~~~~END~~~~~
>>>>
>>>> And as noted in the comments, I have 3 questions at this point:
>>>>
>>>> (Q1) Why are those required packages not imported by guix automatically?
>>>> (My guess: This functionality simply has not yet been implemented.)
>>>>
>>>> (Q2) Why are the manually imported packages not actually in files with
>>>> their own name, but instead jinja2 -> python-xyt, tornado -> python-web,
>>>> and pytest -> check? Why not (gnu packages python pytest) for example?
>>>>
>>>> (Q3) Is my process of finding the files in which the packages are
>>>> correct or just working by chance? Basically I am creating temporary
>>>> environments, in which I then lookup "where would the package be
>>>> installed" and then exit the temporary environment to use that
>>>> information in my imported package file's import expressions /
>>>> use-modules expression. This seems to be a bit of a convoluted process,
>>>> though worth it, if it always works in the end.
>>>>
>>>> (4) Now I run my time-machine command:
>>>>
>>>> ~~~~START~~~~
>>>> $ guix time-machine --channels=channels.scm -- environment --manifest=manifest.scm --load=jupyterlab.scm
>>>> ~~~~~END~~~~~
>>>>
>>>> This take a moment and then I get an error (the full output is longer,
>>>> but when running it multiple times, already successful steps are not all
>>>> done repeatedly, so the output is then reduced to what fails):
>>>>
>>>> ~~~~START~~~~
>>>> $ guix time-machine --channels=channels.scm -- environment --manifest=manifest.scm --load=jupyterlab.scm
>>>> Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.org/git/guix.git'...
>>>> The following derivations will be built:
>>>> /gnu/store/wzmfn9m45bmsbrx094rv3lf3w0rpmw49-python-pytest-check-links-0.3.0.drv
>>>> /gnu/store/n9i421lrbwrr8d0947w5vma7rhy3iyba-python-jupyterlab-server-1.2.0.drv
>>>> /gnu/store/s7jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv
>>>>
>>>> 4,2 MB will be downloaded
>>>> downloading from https://ci.guix.gnu.org/nar/lzip/2nahbs5v8q073gjmy224gk0h5lsh1kkw-python-nbconvert-5.0.0b1 ...
>>>> python-nbconvert-5.0.0b1 301KiB 2.0MiB/s 00:00 [##################] 100.0%
>>>>
>>>> building /gnu/store/s7jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv...
>>>> |builder for `/gnu/store/s7jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv' failed to produce output path `/gnu/store/92md7gh966n4fzj6al267lqq4xjx0ncf-jupyterlab-server-1.2.0.tar.gz'
>>>> build of /gnu/store/s7jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv failed
>>>> View build log at '/var/log/guix/drvs/s7/jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv.bz2'.
>>>> cannot build derivation `/gnu/store/n9i421lrbwrr8d0947w5vma7rhy3iyba-python-jupyterlab-server-1.2.0.drv': 1 dependencies couldn't be built
>>>> killing process 7384
>>>> guix environment: error: build of `/gnu/store/n9i421lrbwrr8d0947w5vma7rhy3iyba-python-jupyterlab-server-1.2.0.drv' failed
>>>> ~~~~~END~~~~~
>>>>
>>>> OK, an error, perhaps I can understand it. Lets look at that log file:
>>>>
>>>> ~~~~START~~~~
>>>> $ cp /var/log/guix/drvs/s7/jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv.bz2 .
>>>> $ bzip2 --decompress jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv.bz2
>>>> $ cat jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv
>>>>
>>>> Starting download of /gnu/store/92md7gh966n4fzj6al267lqq4xjx0ncf-jupyterlab-server-1.2.0.tar.gz
>>>> From https://files.pythonhosted.org/packages/source/j/jupyterlab-server/jupyterlab-server-1.2.0.tar.gz...
>>>> download failed "https://files.pythonhosted.org/packages/source/j/jupyterlab-server/jupyterlab-server-1.2.0.tar.gz" 404 "Not Found"
>>>>
>>>> Starting download of /gnu/store/92md7gh966n4fzj6al267lqq4xjx0ncf-jupyterlab-server-1.2.0.tar.gz
>>>> From https://ci.guix.gnu.org/file/jupyterlab-server-1.2.0.tar.gz/sha256/132xby7531rbrjg9bqvsx86birr1blynjxy8gi5kcnb6x7fxjcal...
>>>> download failed "https://ci.guix.gnu.org/file/jupyterlab-server-1.2.0.tar.gz/sha256/132xby7531rbrjg9bqvsx86birr1blynjxy8gi5kcnb6x7fxjcal" 404 "Not Found"
>>>>
>>>> Starting download of /gnu/store/92md7gh966n4fzj6al267lqq4xjx0ncf-jupyterlab-server-1.2.0.tar.gz
>>>> From https://tarballs.nixos.org/sha256/132xby7531rbrjg9bqvsx86birr1blynjxy8gi5kcnb6x7fxjcal...
>>>> download failed "https://tarballs.nixos.org/sha256/132xby7531rbrjg9bqvsx86birr1blynjxy8gi5kcnb6x7fxjcal" 404 "Not Found"
>>>>
>>>> Starting download of /gnu/store/92md7gh966n4fzj6al267lqq4xjx0ncf-jupyterlab-server-1.2.0.tar.gz
>>>> From https://archive.softwareheritage.org/api/1/content/sha256:5431d9dde96659364b7cc877693d5d21e7b80cea7ae3959ecc2b87518e5f5d8c/raw/...
>>>> download failed "https://archive.softwareheritage.org/api/1/content/sha256:5431d9dde96659364b7cc877693d5d21e7b80cea7ae3959ecc2b87518e5f5d8c/raw/" 404 "Not Found"
>>>> failed to download "/gnu/store/92md7gh966n4fzj6al267lqq4xjx0ncf-jupyterlab-server-1.2.0.tar.gz" from "https://files.pythonhosted.org/packages/source/j/jupyterlab-server/jupyterlab-server-1.2.0.tar.gz"
>>>> ~~~~~END~~~~~
>>>>
>>>> So it seems, that the jupyterlab-server file is simply not downloadable
>>>> any longer!
>>>>
>>>> Trying using wget:
>>>>
>>>> ~~~~START~~~~
>>>> $ wget https://files.pythonhosted.org/packages/source/j/jupyterlab-server/jupyterlab-server-1.2.0.tar.gz
>>>> --2020-10-18 13:49:52-- https://files.pythonhosted.org/packages/source/j/jupyterlab-server/jupyterlab-server-1.2.0.tar.gz
>>>> Resolving files.pythonhosted.org (files.pythonhosted.org)... 2a04:4e42:9::319, 151.101.37.63
>>>> Connecting to files.pythonhosted.org (files.pythonhosted.org)|2a04:4e42:9::319|:443... failed: Connection refused.
>>>> Connecting to files.pythonhosted.org (files.pythonhosted.org)|151.101.37.63|:443... connected.
>>>> HTTP request sent, awaiting response... 404 Not Found
>>>> 2020-10-18 13:49:53 ERROR 404: Not Found.
>>>> ~~~~~END~~~~~
>>>>
>>>> So now I am out of ideas. It seems the file is not available any longer
>>>> and the definition of jupyterlab needs to be updated somewhere, so that
>>>> it does not try to download an old or non-existent version of
>>>> jupyter-labserver. But how is this usually done? Can I specify it
>>>> somewhere in one of the 3 files I have, or am I dependent on someone
>>>> fixing the jupyterlab-server dependency / input for juypterlab?
>>>>
>>>> Thanks for your help so far! Tell me, if I need to provide any more
>>>> information to solve the problem.
>>> Try chaning the URL line to (uri (pypi-uri "jupyterlab_server" version)),
>>> with an underscore (_). I don't have any special suggestions for knowing
>>> that it should be an underscore instead of a dash. The best I have is
>>> the output from 'guix import pypi jupyterlab-server:
>>>
>>> (ins)efraim@E5400 ~$ guix import pypi jupyterlab-server
>>>
>>> Starting download of /tmp/guix-file.ayJ41F
>>> From https://files.pythonhosted.org/packages/92/54/5f321ca4cebfb644ac59eb21601b46a2ff9831ffe1b4e5a588f2a7e98d48/jupyterlab_server-1.2.0.tar.gz...
>>> …er-1.2.0.tar.gz 22KiB 57KiB/s 00:00 [##################] 100.0%
>>>
>>>
>>>
>>>> Best regards,
>>>> Zelphir
>>>>
>>>>
>>>> On 10/16/20 2:25 PM, Tobias Geerinckx-Rice wrote:
>>>>> Zelphir,
>>>>>
>>>>> Zelphir Kaltstahl 写道:
>>>>>> $ guix import pypi 'jupyterlab@2.1.5' --recursive
>>>>> It will work if you substitute ‘/’ for ‘@’. Yes, this is a happy
>>>>> accident specific to the PyPI importer, and I'm sure you can guess why
>>>>> it happens to work.
>>>>>
>>>>>>> guix import hackage mtl@2.1.3.1
>>>>>> But that is in the "hackage" import section. Is the same not available
>>>>>> for PyPI?
>>>>> [...]
>>>>>
>>>>>> Do the various importers work differently?
>>>>> Unfortunately so. It would be great(TM) if PACKAGE[@VERSION] were
>>>>> standard. Each importer could handle it properly (e.g., by turning it
>>>>> into "/") or return a friendlier ‘the foo importer does not yet
>>>>> support versions’ error.
>>>>>
>>>>> I don't have the time, but this sounds like a good intermediate-level
>>>>> hack for someone who does :-)
>>>>>
>>>>> Kind regards,
>>>>>
>>>>> T G-R
>>>> --
>>>> repositories: https://notabug.org/ZelphirKaltstahl
>>>>
>> --
>> repositories: https://notabug.org/ZelphirKaltstahl
>>
>>
>> --
>> Sent from my Android device with K-9 Mail. Please excuse my brevity.
> --
> repositories: https://notabug.org/ZelphirKaltstahl
--
repositories: https://notabug.org/ZelphirKaltstahl
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: guix import error + New: setting up a jupyterlab environment
2020-10-19 18:19 ` Zelphir Kaltstahl
2020-10-19 21:12 ` Zelphir Kaltstahl
@ 2020-10-21 7:09 ` Efraim Flashner
1 sibling, 0 replies; 15+ messages in thread
From: Efraim Flashner @ 2020-10-21 7:09 UTC (permalink / raw)
To: Zelphir Kaltstahl; +Cc: help-guix
[-- Attachment #1: Type: text/plain, Size: 36469 bytes --]
On Mon, Oct 19, 2020 at 08:19:05PM +0200, Zelphir Kaltstahl wrote:
> Hello Efraim,
>
> Thanks for your patience! It seems with that I am getting quite far (at
> least it feels like making progress, or even being close to have a
> working environment), up to the "check phase". There some tests failing
> in the "check phase". Here is what I am getting now, regardless of
> whether I stick ("python-ipykernel" ,python-ipykernel) in the native
> inputs or propagated inputs:
For python packages it doesn't matter at build time, it's more about if
it's needed at build time (native-inputs) or if it's needed to run the
python program (propagated-inputs) since we don't have a good way to
tell python to keep a reference to other python packages.
> ~~~~START~~~~
> running install_egg_info
> Copying jupyterlab_server.egg-info to /gnu/store/2h44ldpcqqd0q7hqpbcqdavcnbjsibfb-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server-1.2.0-py3.8.egg-info
> running install_scripts
> phase `install' succeeded after 0.3 seconds
> starting phase `wrap'
> find-files: /gnu/store/2h44ldpcqqd0q7hqpbcqdavcnbjsibfb-python-jupyterlab-server-1.2.0/bin: No such file or directory
> find-files: /gnu/store/2h44ldpcqqd0q7hqpbcqdavcnbjsibfb-python-jupyterlab-server-1.2.0/sbin: No such file or directory
> phase `wrap' succeeded after 0.0 seconds
> starting phase `check'
> running "python setup.py" with command "test" and parameters ()
> running test
> running egg_info
> writing jupyterlab_server.egg-info/PKG-INFO
> writing dependency_links to jupyterlab_server.egg-info/dependency_links.txt
> writing requirements to jupyterlab_server.egg-info/requires.txt
> writing top-level names to jupyterlab_server.egg-info/top_level.txt
> reading manifest file 'jupyterlab_server.egg-info/SOURCES.txt'
> reading manifest template 'MANIFEST.in'
> warning: no previously-included files matching '*~' found anywhere in distribution
> warning: no previously-included files matching '*.pyc' found anywhere in distribution
> warning: no previously-included files matching '*.pyo' found anywhere in distribution
> warning: no previously-included files matching '.git' found anywhere in distribution
> warning: no previously-included files matching '.ipynb_checkpoints' found anywhere in distribution
> writing manifest file 'jupyterlab_server.egg-info/SOURCES.txt'
> running build_ext
> test_get (jupyterlab_server.tests.test_settings_api.SettingsAPITest) ... ERROR
> test_get_bad (jupyterlab_server.tests.test_settings_api.SettingsAPITest) ... ERROR
> test_listing (jupyterlab_server.tests.test_settings_api.SettingsAPITest) ... ERROR
> test_patch (jupyterlab_server.tests.test_settings_api.SettingsAPITest) ... ERROR
> test_patch_bad_data (jupyterlab_server.tests.test_settings_api.SettingsAPITest) ... ERROR
> test_patch_wrong_id (jupyterlab_server.tests.test_settings_api.SettingsAPITest) ... ERROR
> test_bad_put (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest) ... ERROR
> test_blank_put (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest) ... ERROR
> test_delete (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest) ... ERROR
> test_get (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest) ... ERROR
> test_listing (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest) ... ERROR
> test_put (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest) ... ERROR
>
> ======================================================================
> ERROR: test_get (jupyterlab_server.tests.test_settings_api.SettingsAPITest)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_settings_api.py", line 31, in setUp
> dst = os.path.join(self.lab_config.schemas_dir, '@jupyterlab')
> AttributeError: 'SettingsAPITest' object has no attribute 'lab_config'
>
> ======================================================================
> ERROR: test_get_bad (jupyterlab_server.tests.test_settings_api.SettingsAPITest)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_settings_api.py", line 31, in setUp
> dst = os.path.join(self.lab_config.schemas_dir, '@jupyterlab')
> AttributeError: 'SettingsAPITest' object has no attribute 'lab_config'
>
> ======================================================================
> ERROR: test_listing (jupyterlab_server.tests.test_settings_api.SettingsAPITest)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_settings_api.py", line 31, in setUp
> dst = os.path.join(self.lab_config.schemas_dir, '@jupyterlab')
> AttributeError: 'SettingsAPITest' object has no attribute 'lab_config'
>
> ======================================================================
> ERROR: test_patch (jupyterlab_server.tests.test_settings_api.SettingsAPITest)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_settings_api.py", line 31, in setUp
> dst = os.path.join(self.lab_config.schemas_dir, '@jupyterlab')
> AttributeError: 'SettingsAPITest' object has no attribute 'lab_config'
>
> ======================================================================
> ERROR: test_patch_bad_data (jupyterlab_server.tests.test_settings_api.SettingsAPITest)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_settings_api.py", line 31, in setUp
> dst = os.path.join(self.lab_config.schemas_dir, '@jupyterlab')
> AttributeError: 'SettingsAPITest' object has no attribute 'lab_config'
>
> ======================================================================
> ERROR: test_patch_wrong_id (jupyterlab_server.tests.test_settings_api.SettingsAPITest)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_settings_api.py", line 31, in setUp
> dst = os.path.join(self.lab_config.schemas_dir, '@jupyterlab')
> AttributeError: 'SettingsAPITest' object has no attribute 'lab_config'
>
> ======================================================================
> ERROR: test_bad_put (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_workspaces_api.py", line 34, in setUp
> dst = os.path.join(self.lab_config.workspaces_dir, item)
> AttributeError: 'WorkspacesAPITest' object has no attribute 'lab_config'
>
> ======================================================================
> ERROR: test_blank_put (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_workspaces_api.py", line 34, in setUp
> dst = os.path.join(self.lab_config.workspaces_dir, item)
> AttributeError: 'WorkspacesAPITest' object has no attribute 'lab_config'
>
> ======================================================================
> ERROR: test_delete (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_workspaces_api.py", line 34, in setUp
> dst = os.path.join(self.lab_config.workspaces_dir, item)
> AttributeError: 'WorkspacesAPITest' object has no attribute 'lab_config'
>
> ======================================================================
> ERROR: test_get (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_workspaces_api.py", line 34, in setUp
> dst = os.path.join(self.lab_config.workspaces_dir, item)
> AttributeError: 'WorkspacesAPITest' object has no attribute 'lab_config'
>
> ======================================================================
> ERROR: test_listing (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_workspaces_api.py", line 34, in setUp
> dst = os.path.join(self.lab_config.workspaces_dir, item)
> AttributeError: 'WorkspacesAPITest' object has no attribute 'lab_config'
>
> ======================================================================
> ERROR: test_put (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_workspaces_api.py", line 34, in setUp
> dst = os.path.join(self.lab_config.workspaces_dir, item)
> AttributeError: 'WorkspacesAPITest' object has no attribute 'lab_config'
>
> ----------------------------------------------------------------------
> Ran 12 tests in 0.001s
>
> FAILED (errors=12)
> Test failed: <unittest.runner.TextTestResult run=12 errors=12 failures=0>
> error: Test failed: <unittest.runner.TextTestResult run=12 errors=12 failures=0>
> command "python" "-c" "import setuptools, tokenize;__file__='setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\\r\\n', '\\n');f.close();exec(compile(code, __file__, 'exec'))" "test" failed with status 1
> ~~~~~END~~~~~
>
> I have some thoughts about this:
>
> The Python error does not really tell me what is wrong. I don't know why
> the `WorkspacesAPITest` does not have an attribute named `lab_config`.
>
> One can see, that those are all API tests. Since there were problems in
> the previous step with network, perhaps it is a network thing here as
> well? (Is network, even if localhost for testing, available in the
> "check phase"?)
It's not likely related to networking, the error messages would mention
unavailable targets or something similar.
> It could also simply be, that some PyPI package has failing tests. I
> don't know how one could then skip such tests.
Assuming WorkspacesAPITest does actually have an attribute named
lab_config then you'll want to add the installed package to the python
path during the check phase. There are a number of packages which do
this. I can never remember the syntax so I always grep for
'add-installed-pythonpath' when it comes up.
> I guess I will summarize everything in the end and put it in a
> repository as a kind of "guide", so that others can use it or learn from
> the process.
I think people would really enjoy that. I picked up most of my packaging
know-how from looking at other packages.
> Regards,
> Zelphir
>
> On 10/19/20 6:54 PM, Efraim Flashner wrote:
> > It looks like you need to add python-ipykernel to native-inputs.
> > Unless it's needed to run the program and not just for the test suite,
> > in which case it should go in propagated-inputs. There's no network
> > available in the build environment so it can't retrieve ipykernel
> > while building.
> >
> >
> > On October 19, 2020 2:31:53 PM UTC, Zelphir Kaltstahl
> > <zelphirkaltstahl@posteo.de> wrote:
> >
> > Hello Efraim!
> >
> > Thank you! Your idea of replacing "-" with "_" seems to partially
> > help:
> >
> > The package is downloaded and byte compiled. However, afterwards
> > there is a problem, when it tries to copy the byte-compiled files
> > in the "wrap phase" (comments inserted in some places):
> >
> > ~~~~START~~~~
> > ### ... a lot of output before this ...
> >
> > byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/__init__.py to __init__.cpython-38.pyc
> > byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/_version.py to _version.cpython-38.pyc
> > byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/app.py to app.cpython-38.pyc
> > byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/handlers.py to handlers.cpython-38.pyc
> > byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/listings_handler.py to listings_handler.cpython-38.pyc
> > byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/process.py to process.cpython-38.pyc
> > byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/process_app.py to process_app.cpython-38.pyc
> > byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/server.py to server.cpython-38.pyc
> > byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/servertest.py to servertest.cpython-38.pyc
> > byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/settings_handler.py to settings_handler.cpython-38.pyc
> > byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/themes_handler.py to themes_handler.cpython-38.pyc
> > byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/workspaces_handler.py to workspaces_handler.cpython-38.pyc
> > byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/tests/__init__.py to __init__.cpython-38.pyc
> > byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/tests/test_settings_api.py to test_settings_api.cpython-38.pyc
> > byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/tests/test_workspaces_api.py to test_workspaces_api.cpython-38.pyc
> > byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/tests/utils.py to utils.cpython-38.pyc
> >
> > ### ... seems byte-compiling went without problems, but not comes the problem ...
> >
> > running install_egg_info
> > Copying jupyterlab_server.egg-info to /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server-1.2.0-py3.8.egg-info
> > running install_scripts
> > phase `install' succeeded after 0.3 seconds
> > starting phase `wrap'
> > find-files: /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/bin: No such file or directory
> > find-files: /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/sbin: No such file or directory
> > phase `wrap' succeeded after 0.0 seconds
> > starting phase `check'
> > running "python setup.py" with command "test" and parameters ()
> > running test
> > Searching for ipykernel
> > Reading https://pypi.org/simple/ipykernel/
> > Download error on https://pypi.org/simple/ipykernel/: [Errno -2] Name or service not known -- Some packages may not be found!
> > Couldn't find index page for 'ipykernel' (maybe misspelled?)
> > Scanning index of all packages (this may take a while)
> > Reading https://pypi.org/simple/
> > Download error on https://pypi.org/simple/: [Errno -2] Name or service not known -- Some packages may not be found!
> > No local packages or working download links found for ipykernel
> > error: Could not find suitable distribution for Requirement.parse('ipykernel')
> > command "python" "-c" "import setuptools, tokenize;__file__='setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\\r\\n', '\\n');f.close();exec(compile(code, __file__, 'exec'))" "test" failed with status 1
> > ~~~~~END~~~~~
> >
> > So it seems, that while the download URL is corrected, there is
> > another place, where Guix has an error now, resulting in a final
> > error shown in command line:
> >
> > ~~~~START~~~~
> > $ guix time-machine --channels=channels.scm -- environment --manifest=manifest.scm --load=jupyterlab.scm
> > Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.org/git/guix.git'...
> > substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0%
> > The following derivations will be built:
> > /gnu/store/wzmfn9m45bmsbrx094rv3lf3w0rpmw49-python-pytest-check-links-0.3.0.drv
> > /gnu/store/96xf5mrg134mcsp01b0m1qs1lxkb401a-python-jupyterlab-server-1.2.0.drv
> > /gnu/store/32a28hd7aainwn0hfsnf3blh8prmfz61-jupyterlab_server-1.2.0.tar.gz.drv
> >
> > 3,9 MB will be downloaded
> > downloading from https://ci.guix.gnu.org/nar/lzip/54kpl9psx16jwic4gpnjwh44kim04wlk-python-notebook-5.7.4 ...
> > python-notebook-5.7.4 3.7MiB 5.1MiB/s 00:01 [##################] 100.0%
> >
> > building /gnu/store/32a28hd7aainwn0hfsnf3blh8prmfz61-jupyterlab_server-1.2.0.tar.gz.drv...
> > downloading from https://files.pythonhosted.org/packages/source/j/jupyterlab_server/jupyterlab_server-1.2.0.tar.gz ...
> > building /gnu/store/wzmfn9m45bmsbrx094rv3lf3w0rpmw49-python-pytest-check-links-0.3.0.drv...
> > building /gnu/store/96xf5mrg134mcsp01b0m1qs1lxkb401a-python-jupyterlab-server-1.2.0.drv...
> > \ 'check' phasebuilder for `/gnu/store/96xf5mrg134mcsp01b0m1qs1lxkb401a-python-jupyterlab-server-1.2.0.drv' failed with exit code 1
> > build of /gnu/store/96xf5mrg134mcsp01b0m1qs1lxkb401a-python-jupyterlab-server-1.2.0.drv failed
> > View build log at '/var/log/guix/drvs/96/xf5mrg134mcsp01b0m1qs1lxkb401a-python-jupyterlab-server-1.2.0.drv.bz2'.
> > guix environment: error: build of `/gnu/store/96xf5mrg134mcsp01b0m1qs1lxkb401a-python-jupyterlab-server-1.2.0.drv' failed
> > ~~~~~END~~~~~
> >
> > Apparently ipykernel is not found, but when I visit
> > https://pypi.org/simple/ipykernel/, I see packages there.
> >
> > From the logs:
> >
> > ~~~~START~~~~
> > Download error on https://pypi.org/simple/ipykernel/: [Errno -2] Name or service not known -- Some packages may not be found!
> > Couldn't find index page for 'ipykernel' (maybe misspelled?)
> > ~~~~~END~~~~~
> >
> > Do I need to add another input in my `jupyterlab.scm`? (How?) Or
> > perhaps I need to create a separate `ipykernel.scm` which contains
> > the output of `guix import pypi --recursive ipykernel`?
> >
> > However, it somehow seems to fail for PyPI simple in general (from
> > the logs again):
> >
> > ~~~~START~~~~
> > Reading https://pypi.org/simple/
> > Download error on https://pypi.org/simple/: [Errno -2] Name or service not known -- Some packages may not be found!
> > No local packages or working download links found for ipykernel
> > error: Could not find suitable distribution for Requirement.parse('ipykernel')
> > command "python" "-c" "import setuptools, tokenize;__file__='setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\\r\\n', '\\n');f.close();exec(compile(code, __file__, 'exec'))" "test" failed with status 1
> > ~~~~~END~~~~~
> >
> > Thanks,
> > Zelphir
> >
> >
> > On 10/18/20 6:35 PM, Efraim Flashner wrote:
> >> On Sun, Oct 18, 2020 at 01:55:49PM +0200, Zelphir Kaltstahl wrote:
> >>> Hello Guix Users, hello Zimoun and Tobias!
> >>>
> >>> Thanks for your information regarding the importer syntax thing.
> >>>
> >>> I continued trying to get a jupyterlab environment today.
> >>>
> >>> Here is what I did so far:
> >>>
> >>> (1) Create my manifest file:
> >>>
> >>> ~~~~START~~~~
> >>> (specifications->manifest
> >>> '("python"))
> >>> ~~~~~END~~~~~
> >>>
> >>> (2) Create my channels file:
> >>>
> >>> ~~~~START~~~~
> >>> $ guix describe --format=channels > channels.scm
> >>> $ cat channels.scm
> >>> (list (channel
> >>> (name 'guix)
> >>> (url "https://git.savannah.gnu.org/git/guix.git")
> >>> (commit
> >>> "6ca673b30dac281ba27a8dac242c0ac83e5e354b")
> >>> (introduction
> >>> (make-channel-introduction
> >>> "9edb3f66fd807b096b48283debdcddccfea34bad"
> >>> (openpgp-fingerprint
> >>> "BBB0 2DDF 2CEA F6A8 0D1D E643 A2A0 6DF2 A33A 54FA")))))
> >>> ~~~~~END~~~~~
> >>>
> >>> (3) Create my jupyterlab PyPI import file, this time around using the
> >>> "/" instead of "@" for specifying the version:
> >>>
> >>> ~~~~START~~~~
> >>> $ guix import pypi --recursive jupyterlab/2.1.5 > jupyterlab.scm
> >>> ~~~~~END~~~~~
> >>>
> >>> (4) Add missing import expressions and add output expression at the end:
> >>>
> >>> ~~~~START~~~~
> >>> ;; add module imports
> >>> (use-modules
> >>> (guix packages)
> >>> (guix download)
> >>> (guix build-system python)
> >>> ((guix licenses) #:prefix license:)
> >>> ;; use `guix environment --ad-hoc python-jinja2 -- guix package -A python-jinja2` to find the location of python-jinja2, which is gnu/packages/python-xyz.scm
> >> This can be just 'guix package -A python-jinja2', no need for the
> >> environment.
> >>
> >>> (gnu packages python-xyz)
> >>> ;; for python-tornado
> >>> (gnu packages python-web)
> >>> ;; for python-pytest
> >>> (gnu packages check))
> >>>
> >>> ;; QUESTION: Why are those required packages not imported by guix automatically?
> >>> ;; QUESTION: Why are the manually imported packages not actually in files with their own name, but instead jinja2 -> python-xyz, tornado -> python-web, and pytest -> check?
> >>> ;; QUESTION: Is my process of finding the files in which the packages are correct or just working by chance?
> >>>
> >>> (define-public python-jupyterlab-server
> >>> (package
> >>> (name "python-jupyterlab-server")
> >>> (version "1.2.0")
> >>> (source
> >>> (origin
> >>> (method url-fetch)
> >>> (uri (pypi-uri "jupyterlab-server" version))
> >>> (sha256
> >>> (base32
> >>> "132xby7531rbrjg9bqvsx86birr1blynjxy8gi5kcnb6x7fxjcal"))))
> >>> (build-system python-build-system)
> >>> (propagated-inputs
> >>> `(("python-jinja2" ,python-jinja2)
> >>> ("python-json5" ,python-json5)
> >>> ("python-jsonschema" ,python-jsonschema)
> >>> ("python-notebook" ,python-notebook)
> >>> ("python-requests" ,python-requests)))
> >>> (native-inputs
> >>> `(("python-pytest" ,python-pytest)
> >>> ("python-requests" ,python-requests)))
> >>> (home-page "https://jupyter.org")
> >>> (synopsis "JupyterLab Server")
> >>> (description "JupyterLab Server")
> >>> (license license:bsd-3)))
> >>>
> >>> (define-public python-jupyterlab
> >>> (package
> >>> (name "python-jupyterlab")
> >>> (version "2.1.5")
> >>> (source
> >>> (origin
> >>> (method url-fetch)
> >>> (uri (pypi-uri "jupyterlab" version))
> >>> (sha256
> >>> (base32
> >>> "162jn51cg36fsn4l2zhnb5n4nbkhm9wlv974ggcnmdij3i4r4yya"))))
> >>> (build-system python-build-system)
> >>> (propagated-inputs
> >>> `(("python-jinja2" ,python-jinja2)
> >>> ("python-jupyterlab-server"
> >>> ,python-jupyterlab-server)
> >>> ("python-notebook" ,python-notebook)
> >>> ("python-tornado" ,python-tornado)))
> >>> (native-inputs
> >>> `(("python-pytest" ,python-pytest)
> >>> ("python-pytest-check-links"
> >>> ,python-pytest-check-links)
> >>> ("python-requests" ,python-requests)
> >>> ("python-virtualenv" ,python-virtualenv)
> >>> ("python-wheel" ,python-wheel)))
> >>> (home-page "http://jupyter.org")
> >>> (synopsis
> >>> "The JupyterLab notebook server extension.")
> >>> (description
> >>> "The JupyterLab notebook server extension.")
> >>> (license license:bsd-3)))
> >>>
> >>> python-jupyterlab
> >>> ~~~~~END~~~~~
> >>>
> >>> And as noted in the comments, I have 3 questions at this point:
> >>>
> >>> (Q1) Why are those required packages not imported by guix automatically?
> >>> (My guess: This functionality simply has not yet been implemented.)
> >>>
> >>> (Q2) Why are the manually imported packages not actually in files with
> >>> their own name, but instead jinja2 -> python-xyt, tornado -> python-web,
> >>> and pytest -> check? Why not (gnu packages python pytest) for example?
> >>>
> >>> (Q3) Is my process of finding the files in which the packages are
> >>> correct or just working by chance? Basically I am creating temporary
> >>> environments, in which I then lookup "where would the package be
> >>> installed" and then exit the temporary environment to use that
> >>> information in my imported package file's import expressions /
> >>> use-modules expression. This seems to be a bit of a convoluted process,
> >>> though worth it, if it always works in the end.
> >>>
> >>> (4) Now I run my time-machine command:
> >>>
> >>> ~~~~START~~~~
> >>> $ guix time-machine --channels=channels.scm -- environment --manifest=manifest.scm --load=jupyterlab.scm
> >>> ~~~~~END~~~~~
> >>>
> >>> This take a moment and then I get an error (the full output is longer,
> >>> but when running it multiple times, already successful steps are not all
> >>> done repeatedly, so the output is then reduced to what fails):
> >>>
> >>> ~~~~START~~~~
> >>> $ guix time-machine --channels=channels.scm -- environment --manifest=manifest.scm --load=jupyterlab.scm
> >>> Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.org/git/guix.git'...
> >>> The following derivations will be built:
> >>> /gnu/store/wzmfn9m45bmsbrx094rv3lf3w0rpmw49-python-pytest-check-links-0.3.0.drv
> >>> /gnu/store/n9i421lrbwrr8d0947w5vma7rhy3iyba-python-jupyterlab-server-1.2.0.drv
> >>> /gnu/store/s7jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv
> >>>
> >>> 4,2 MB will be downloaded
> >>> downloading from https://ci.guix.gnu.org/nar/lzip/2nahbs5v8q073gjmy224gk0h5lsh1kkw-python-nbconvert-5.0.0b1 ...
> >>> python-nbconvert-5.0.0b1 301KiB 2.0MiB/s 00:00 [##################] 100.0%
> >>>
> >>> building /gnu/store/s7jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv...
> >>> |builder for `/gnu/store/s7jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv' failed to produce output path `/gnu/store/92md7gh966n4fzj6al267lqq4xjx0ncf-jupyterlab-server-1.2.0.tar.gz'
> >>> build of /gnu/store/s7jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv failed
> >>> View build log at '/var/log/guix/drvs/s7/jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv.bz2'.
> >>> cannot build derivation `/gnu/store/n9i421lrbwrr8d0947w5vma7rhy3iyba-python-jupyterlab-server-1.2.0.drv': 1 dependencies couldn't be built
> >>> killing process 7384
> >>> guix environment: error: build of `/gnu/store/n9i421lrbwrr8d0947w5vma7rhy3iyba-python-jupyterlab-server-1.2.0.drv' failed
> >>> ~~~~~END~~~~~
> >>>
> >>> OK, an error, perhaps I can understand it. Lets look at that log file:
> >>>
> >>> ~~~~START~~~~
> >>> $ cp /var/log/guix/drvs/s7/jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv.bz2 .
> >>> $ bzip2 --decompress jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv.bz2
> >>> $ cat jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv
> >>>
> >>> Starting download of /gnu/store/92md7gh966n4fzj6al267lqq4xjx0ncf-jupyterlab-server-1.2.0.tar.gz
> >>> From https://files.pythonhosted.org/packages/source/j/jupyterlab-server/jupyterlab-server-1.2.0.tar.gz...
> >>> download failed "https://files.pythonhosted.org/packages/source/j/jupyterlab-server/jupyterlab-server-1.2.0.tar.gz" 404 "Not Found"
> >>>
> >>> Starting download of /gnu/store/92md7gh966n4fzj6al267lqq4xjx0ncf-jupyterlab-server-1.2.0.tar.gz
> >>> From https://ci.guix.gnu.org/file/jupyterlab-server-1.2.0.tar.gz/sha256/132xby7531rbrjg9bqvsx86birr1blynjxy8gi5kcnb6x7fxjcal...
> >>> download failed "https://ci.guix.gnu.org/file/jupyterlab-server-1.2.0.tar.gz/sha256/132xby7531rbrjg9bqvsx86birr1blynjxy8gi5kcnb6x7fxjcal" 404 "Not Found"
> >>>
> >>> Starting download of /gnu/store/92md7gh966n4fzj6al267lqq4xjx0ncf-jupyterlab-server-1.2.0.tar.gz
> >>> From https://tarballs.nixos.org/sha256/132xby7531rbrjg9bqvsx86birr1blynjxy8gi5kcnb6x7fxjcal...
> >>> download failed "https://tarballs.nixos.org/sha256/132xby7531rbrjg9bqvsx86birr1blynjxy8gi5kcnb6x7fxjcal" 404 "Not Found"
> >>>
> >>> Starting download of /gnu/store/92md7gh966n4fzj6al267lqq4xjx0ncf-jupyterlab-server-1.2.0.tar.gz
> >>> From https://archive.softwareheritage.org/api/1/content/sha256:5431d9dde96659364b7cc877693d5d21e7b80cea7ae3959ecc2b87518e5f5d8c/raw/...
> >>> download failed "https://archive.softwareheritage.org/api/1/content/sha256:5431d9dde96659364b7cc877693d5d21e7b80cea7ae3959ecc2b87518e5f5d8c/raw/" 404 "Not Found"
> >>> failed to download "/gnu/store/92md7gh966n4fzj6al267lqq4xjx0ncf-jupyterlab-server-1.2.0.tar.gz" from "https://files.pythonhosted.org/packages/source/j/jupyterlab-server/jupyterlab-server-1.2.0.tar.gz"
> >>> ~~~~~END~~~~~
> >>>
> >>> So it seems, that the jupyterlab-server file is simply not downloadable
> >>> any longer!
> >>>
> >>> Trying using wget:
> >>>
> >>> ~~~~START~~~~
> >>> $ wget https://files.pythonhosted.org/packages/source/j/jupyterlab-server/jupyterlab-server-1.2.0.tar.gz
> >>> --2020-10-18 13:49:52-- https://files.pythonhosted.org/packages/source/j/jupyterlab-server/jupyterlab-server-1.2.0.tar.gz
> >>> Resolving files.pythonhosted.org (files.pythonhosted.org)... 2a04:4e42:9::319, 151.101.37.63
> >>> Connecting to files.pythonhosted.org (files.pythonhosted.org)|2a04:4e42:9::319|:443... failed: Connection refused.
> >>> Connecting to files.pythonhosted.org (files.pythonhosted.org)|151.101.37.63|:443... connected.
> >>> HTTP request sent, awaiting response... 404 Not Found
> >>> 2020-10-18 13:49:53 ERROR 404: Not Found.
> >>> ~~~~~END~~~~~
> >>>
> >>> So now I am out of ideas. It seems the file is not available any longer
> >>> and the definition of jupyterlab needs to be updated somewhere, so that
> >>> it does not try to download an old or non-existent version of
> >>> jupyter-labserver. But how is this usually done? Can I specify it
> >>> somewhere in one of the 3 files I have, or am I dependent on someone
> >>> fixing the jupyterlab-server dependency / input for juypterlab?
> >>>
> >>> Thanks for your help so far! Tell me, if I need to provide any more
> >>> information to solve the problem.
> >> Try chaning the URL line to (uri (pypi-uri "jupyterlab_server" version)),
> >> with an underscore (_). I don't have any special suggestions for knowing
> >> that it should be an underscore instead of a dash. The best I have is
> >> the output from 'guix import pypi jupyterlab-server:
> >>
> >> (ins)efraim@E5400 ~$ guix import pypi jupyterlab-server
> >>
> >> Starting download of /tmp/guix-file.ayJ41F
> >> From https://files.pythonhosted.org/packages/92/54/5f321ca4cebfb644ac59eb21601b46a2ff9831ffe1b4e5a588f2a7e98d48/jupyterlab_server-1.2.0.tar.gz...
> >> …er-1.2.0.tar.gz 22KiB 57KiB/s 00:00 [##################] 100.0%
> >>
> >>
> >>
> >>> Best regards,
> >>> Zelphir
> >>>
> >>>
> >>> On 10/16/20 2:25 PM, Tobias Geerinckx-Rice wrote:
> >>>> Zelphir,
> >>>>
> >>>> Zelphir Kaltstahl 写道:
> >>>>> $ guix import pypi 'jupyterlab@2.1.5' --recursive
> >>>> It will work if you substitute ‘/’ for ‘@’. Yes, this is a happy
> >>>> accident specific to the PyPI importer, and I'm sure you can guess why
> >>>> it happens to work.
> >>>>
> >>>>>> guix import hackage mtl@2.1.3.1
> >>>>> But that is in the "hackage" import section. Is the same not available
> >>>>> for PyPI?
> >>>> [...]
> >>>>
> >>>>> Do the various importers work differently?
> >>>> Unfortunately so. It would be great(TM) if PACKAGE[@VERSION] were
> >>>> standard. Each importer could handle it properly (e.g., by turning it
> >>>> into "/") or return a friendlier ‘the foo importer does not yet
> >>>> support versions’ error.
> >>>>
> >>>> I don't have the time, but this sounds like a good intermediate-level
> >>>> hack for someone who does :-)
> >>>>
> >>>> Kind regards,
> >>>>
> >>>> T G-R
> >>> --
> >>> repositories: https://notabug.org/ZelphirKaltstahl
> >>>
> > --
> > repositories: https://notabug.org/ZelphirKaltstahl
> >
> >
> > --
> > Sent from my Android device with K-9 Mail. Please excuse my brevity.
>
> --
> repositories: https://notabug.org/ZelphirKaltstahl
>
--
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 --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: guix import error + New: setting up a jupyterlab environment
2020-10-19 21:12 ` Zelphir Kaltstahl
@ 2020-10-21 7:18 ` Efraim Flashner
2020-10-24 19:42 ` Zelphir Kaltstahl
0 siblings, 1 reply; 15+ messages in thread
From: Efraim Flashner @ 2020-10-21 7:18 UTC (permalink / raw)
To: Zelphir Kaltstahl; +Cc: help-guix
[-- Attachment #1: Type: text/plain, Size: 38491 bytes --]
On Mon, Oct 19, 2020 at 11:12:35PM +0200, Zelphir Kaltstahl wrote:
> Meanwhile I have managed to run the jupyterlab-server tests, as
> described in more details here:
> https://github.com/jupyterlab/jupyterlab_server/issues/128
>
> Indeed, in version 1.2.0 the tests fail the same way they fail when I
> try to create my environment. This means the next thing to fix would
> probably be to use another version of jupyterlab-server. 1.2.0 is a tag
> in the jupyterlab-server repository, which _seems_ to be the latest
> "stable" version, before a lot of alpha, beta, and release-candidate
> versions follow.
>
> I guess I could switch the commit in my `jupyterlab.scm` file to point
> to a different one?
>
> I can change the version to `2.0.0rc1`, but I do not know how the
> checksum is calculated. The checksum is shorter than what I see on
> simply PyPI:
>
> https://files.pythonhosted.org/packages/79/43/5249be5ee741a93f3fa60823caf9a276cadc3103dae16d6e36cc534fefd8/jupyterlab_server-2.0.0rc1.tar.gz#sha256=733b149c5ab8e50ea5f2897c323047257060e7bf2dc0fa88663181427bec605d
>
> and base32 should only make it longer, not shorter.
>
> Can you explain how to switch a version manually and calculate the
> checksum to match another version?
For a tarball like the one at pythonhosted you'd download the file and
then run 'guix hash the-file'. If you're using a source code repository
then from the top level of the repo you'd run 'guix hash --exclude-vcs
--recursive .', or 'guix hash -rx .' for short. The hash layout that
Guix uses is the sha256 of the tarball base32 encoded, but with a change
in the letters used.
For python packages you can specify a version number, so in this case
it'd be 'guix import pypi jupyterlab_server/2.0.0rc1'. Some other
importers us the '@' symbol to specify version number and I think some
don't support using other versions at all.
I don't know how compatible different major versions of
jupyterlab-server are with each other, so I'd stick with 1.2.0 for now.
> Regards,
> Zelphir
>
> On 10/19/20 8:19 PM, Zelphir Kaltstahl wrote:
> >
> > Hello Efraim,
> >
> > Thanks for your patience! It seems with that I am getting quite far
> > (at least it feels like making progress, or even being close to have a
> > working environment), up to the "check phase". There some tests
> > failing in the "check phase". Here is what I am getting now,
> > regardless of whether I stick ("python-ipykernel" ,python-ipykernel)
> > in the native inputs or propagated inputs:
> >
> > ~~~~START~~~~
> > running install_egg_info
> > Copying jupyterlab_server.egg-info to /gnu/store/2h44ldpcqqd0q7hqpbcqdavcnbjsibfb-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server-1.2.0-py3.8.egg-info
> > running install_scripts
> > phase `install' succeeded after 0.3 seconds
> > starting phase `wrap'
> > find-files: /gnu/store/2h44ldpcqqd0q7hqpbcqdavcnbjsibfb-python-jupyterlab-server-1.2.0/bin: No such file or directory
> > find-files: /gnu/store/2h44ldpcqqd0q7hqpbcqdavcnbjsibfb-python-jupyterlab-server-1.2.0/sbin: No such file or directory
> > phase `wrap' succeeded after 0.0 seconds
> > starting phase `check'
> > running "python setup.py" with command "test" and parameters ()
> > running test
> > running egg_info
> > writing jupyterlab_server.egg-info/PKG-INFO
> > writing dependency_links to jupyterlab_server.egg-info/dependency_links.txt
> > writing requirements to jupyterlab_server.egg-info/requires.txt
> > writing top-level names to jupyterlab_server.egg-info/top_level.txt
> > reading manifest file 'jupyterlab_server.egg-info/SOURCES.txt'
> > reading manifest template 'MANIFEST.in'
> > warning: no previously-included files matching '*~' found anywhere in distribution
> > warning: no previously-included files matching '*.pyc' found anywhere in distribution
> > warning: no previously-included files matching '*.pyo' found anywhere in distribution
> > warning: no previously-included files matching '.git' found anywhere in distribution
> > warning: no previously-included files matching '.ipynb_checkpoints' found anywhere in distribution
> > writing manifest file 'jupyterlab_server.egg-info/SOURCES.txt'
> > running build_ext
> > test_get (jupyterlab_server.tests.test_settings_api.SettingsAPITest) ... ERROR
> > test_get_bad (jupyterlab_server.tests.test_settings_api.SettingsAPITest) ... ERROR
> > test_listing (jupyterlab_server.tests.test_settings_api.SettingsAPITest) ... ERROR
> > test_patch (jupyterlab_server.tests.test_settings_api.SettingsAPITest) ... ERROR
> > test_patch_bad_data (jupyterlab_server.tests.test_settings_api.SettingsAPITest) ... ERROR
> > test_patch_wrong_id (jupyterlab_server.tests.test_settings_api.SettingsAPITest) ... ERROR
> > test_bad_put (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest) ... ERROR
> > test_blank_put (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest) ... ERROR
> > test_delete (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest) ... ERROR
> > test_get (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest) ... ERROR
> > test_listing (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest) ... ERROR
> > test_put (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest) ... ERROR
> >
> > ======================================================================
> > ERROR: test_get (jupyterlab_server.tests.test_settings_api.SettingsAPITest)
> > ----------------------------------------------------------------------
> > Traceback (most recent call last):
> > File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_settings_api.py", line 31, in setUp
> > dst = os.path.join(self.lab_config.schemas_dir, '@jupyterlab')
> > AttributeError: 'SettingsAPITest' object has no attribute 'lab_config'
> >
> > ======================================================================
> > ERROR: test_get_bad (jupyterlab_server.tests.test_settings_api.SettingsAPITest)
> > ----------------------------------------------------------------------
> > Traceback (most recent call last):
> > File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_settings_api.py", line 31, in setUp
> > dst = os.path.join(self.lab_config.schemas_dir, '@jupyterlab')
> > AttributeError: 'SettingsAPITest' object has no attribute 'lab_config'
> >
> > ======================================================================
> > ERROR: test_listing (jupyterlab_server.tests.test_settings_api.SettingsAPITest)
> > ----------------------------------------------------------------------
> > Traceback (most recent call last):
> > File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_settings_api.py", line 31, in setUp
> > dst = os.path.join(self.lab_config.schemas_dir, '@jupyterlab')
> > AttributeError: 'SettingsAPITest' object has no attribute 'lab_config'
> >
> > ======================================================================
> > ERROR: test_patch (jupyterlab_server.tests.test_settings_api.SettingsAPITest)
> > ----------------------------------------------------------------------
> > Traceback (most recent call last):
> > File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_settings_api.py", line 31, in setUp
> > dst = os.path.join(self.lab_config.schemas_dir, '@jupyterlab')
> > AttributeError: 'SettingsAPITest' object has no attribute 'lab_config'
> >
> > ======================================================================
> > ERROR: test_patch_bad_data (jupyterlab_server.tests.test_settings_api.SettingsAPITest)
> > ----------------------------------------------------------------------
> > Traceback (most recent call last):
> > File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_settings_api.py", line 31, in setUp
> > dst = os.path.join(self.lab_config.schemas_dir, '@jupyterlab')
> > AttributeError: 'SettingsAPITest' object has no attribute 'lab_config'
> >
> > ======================================================================
> > ERROR: test_patch_wrong_id (jupyterlab_server.tests.test_settings_api.SettingsAPITest)
> > ----------------------------------------------------------------------
> > Traceback (most recent call last):
> > File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_settings_api.py", line 31, in setUp
> > dst = os.path.join(self.lab_config.schemas_dir, '@jupyterlab')
> > AttributeError: 'SettingsAPITest' object has no attribute 'lab_config'
> >
> > ======================================================================
> > ERROR: test_bad_put (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest)
> > ----------------------------------------------------------------------
> > Traceback (most recent call last):
> > File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_workspaces_api.py", line 34, in setUp
> > dst = os.path.join(self.lab_config.workspaces_dir, item)
> > AttributeError: 'WorkspacesAPITest' object has no attribute 'lab_config'
> >
> > ======================================================================
> > ERROR: test_blank_put (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest)
> > ----------------------------------------------------------------------
> > Traceback (most recent call last):
> > File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_workspaces_api.py", line 34, in setUp
> > dst = os.path.join(self.lab_config.workspaces_dir, item)
> > AttributeError: 'WorkspacesAPITest' object has no attribute 'lab_config'
> >
> > ======================================================================
> > ERROR: test_delete (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest)
> > ----------------------------------------------------------------------
> > Traceback (most recent call last):
> > File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_workspaces_api.py", line 34, in setUp
> > dst = os.path.join(self.lab_config.workspaces_dir, item)
> > AttributeError: 'WorkspacesAPITest' object has no attribute 'lab_config'
> >
> > ======================================================================
> > ERROR: test_get (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest)
> > ----------------------------------------------------------------------
> > Traceback (most recent call last):
> > File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_workspaces_api.py", line 34, in setUp
> > dst = os.path.join(self.lab_config.workspaces_dir, item)
> > AttributeError: 'WorkspacesAPITest' object has no attribute 'lab_config'
> >
> > ======================================================================
> > ERROR: test_listing (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest)
> > ----------------------------------------------------------------------
> > Traceback (most recent call last):
> > File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_workspaces_api.py", line 34, in setUp
> > dst = os.path.join(self.lab_config.workspaces_dir, item)
> > AttributeError: 'WorkspacesAPITest' object has no attribute 'lab_config'
> >
> > ======================================================================
> > ERROR: test_put (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest)
> > ----------------------------------------------------------------------
> > Traceback (most recent call last):
> > File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_workspaces_api.py", line 34, in setUp
> > dst = os.path.join(self.lab_config.workspaces_dir, item)
> > AttributeError: 'WorkspacesAPITest' object has no attribute 'lab_config'
> >
> > ----------------------------------------------------------------------
> > Ran 12 tests in 0.001s
> >
> > FAILED (errors=12)
> > Test failed: <unittest.runner.TextTestResult run=12 errors=12 failures=0>
> > error: Test failed: <unittest.runner.TextTestResult run=12 errors=12 failures=0>
> > command "python" "-c" "import setuptools, tokenize;__file__='setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\\r\\n', '\\n');f.close();exec(compile(code, __file__, 'exec'))" "test" failed with status 1
> > ~~~~~END~~~~~
> >
> > I have some thoughts about this:
> >
> > The Python error does not really tell me what is wrong. I don't know
> > why the `WorkspacesAPITest` does not have an attribute named `lab_config`.
> >
> > One can see, that those are all API tests. Since there were problems
> > in the previous step with network, perhaps it is a network thing here
> > as well? (Is network, even if localhost for testing, available in the
> > "check phase"?)
> >
> > It could also simply be, that some PyPI package has failing tests. I
> > don't know how one could then skip such tests.
> >
> > I guess I will summarize everything in the end and put it in a
> > repository as a kind of "guide", so that others can use it or learn
> > from the process.
> >
> > Regards,
> > Zelphir
> >
> > On 10/19/20 6:54 PM, Efraim Flashner wrote:
> >> It looks like you need to add python-ipykernel to native-inputs.
> >> Unless it's needed to run the program and not just for the test
> >> suite, in which case it should go in propagated-inputs. There's no
> >> network available in the build environment so it can't retrieve
> >> ipykernel while building.
> >>
> >>
> >> On October 19, 2020 2:31:53 PM UTC, Zelphir Kaltstahl
> >> <zelphirkaltstahl@posteo.de> wrote:
> >>
> >> Hello Efraim!
> >>
> >> Thank you! Your idea of replacing "-" with "_" seems to partially
> >> help:
> >>
> >> The package is downloaded and byte compiled. However, afterwards
> >> there is a problem, when it tries to copy the byte-compiled files
> >> in the "wrap phase" (comments inserted in some places):
> >>
> >> ~~~~START~~~~
> >> ### ... a lot of output before this ...
> >>
> >> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/__init__.py to __init__.cpython-38.pyc
> >> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/_version.py to _version.cpython-38.pyc
> >> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/app.py to app.cpython-38.pyc
> >> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/handlers.py to handlers.cpython-38.pyc
> >> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/listings_handler.py to listings_handler.cpython-38.pyc
> >> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/process.py to process.cpython-38.pyc
> >> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/process_app.py to process_app.cpython-38.pyc
> >> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/server.py to server.cpython-38.pyc
> >> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/servertest.py to servertest.cpython-38.pyc
> >> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/settings_handler.py to settings_handler.cpython-38.pyc
> >> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/themes_handler.py to themes_handler.cpython-38.pyc
> >> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/workspaces_handler.py to workspaces_handler.cpython-38.pyc
> >> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/tests/__init__.py to __init__.cpython-38.pyc
> >> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/tests/test_settings_api.py to test_settings_api.cpython-38.pyc
> >> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/tests/test_workspaces_api.py to test_workspaces_api.cpython-38.pyc
> >> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/tests/utils.py to utils.cpython-38.pyc
> >>
> >> ### ... seems byte-compiling went without problems, but not comes the problem ...
> >>
> >> running install_egg_info
> >> Copying jupyterlab_server.egg-info to /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server-1.2.0-py3.8.egg-info
> >> running install_scripts
> >> phase `install' succeeded after 0.3 seconds
> >> starting phase `wrap'
> >> find-files: /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/bin: No such file or directory
> >> find-files: /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/sbin: No such file or directory
> >> phase `wrap' succeeded after 0.0 seconds
> >> starting phase `check'
> >> running "python setup.py" with command "test" and parameters ()
> >> running test
> >> Searching for ipykernel
> >> Reading https://pypi.org/simple/ipykernel/
> >> Download error on https://pypi.org/simple/ipykernel/: [Errno -2] Name or service not known -- Some packages may not be found!
> >> Couldn't find index page for 'ipykernel' (maybe misspelled?)
> >> Scanning index of all packages (this may take a while)
> >> Reading https://pypi.org/simple/
> >> Download error on https://pypi.org/simple/: [Errno -2] Name or service not known -- Some packages may not be found!
> >> No local packages or working download links found for ipykernel
> >> error: Could not find suitable distribution for Requirement.parse('ipykernel')
> >> command "python" "-c" "import setuptools, tokenize;__file__='setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\\r\\n', '\\n');f.close();exec(compile(code, __file__, 'exec'))" "test" failed with status 1
> >> ~~~~~END~~~~~
> >>
> >> So it seems, that while the download URL is corrected, there is
> >> another place, where Guix has an error now, resulting in a final
> >> error shown in command line:
> >>
> >> ~~~~START~~~~
> >> $ guix time-machine --channels=channels.scm -- environment --manifest=manifest.scm --load=jupyterlab.scm
> >> Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.org/git/guix.git'...
> >> substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0%
> >> The following derivations will be built:
> >> /gnu/store/wzmfn9m45bmsbrx094rv3lf3w0rpmw49-python-pytest-check-links-0.3.0.drv
> >> /gnu/store/96xf5mrg134mcsp01b0m1qs1lxkb401a-python-jupyterlab-server-1.2.0.drv
> >> /gnu/store/32a28hd7aainwn0hfsnf3blh8prmfz61-jupyterlab_server-1.2.0.tar.gz.drv
> >>
> >> 3,9 MB will be downloaded
> >> downloading from https://ci.guix.gnu.org/nar/lzip/54kpl9psx16jwic4gpnjwh44kim04wlk-python-notebook-5.7.4 ...
> >> python-notebook-5.7.4 3.7MiB 5.1MiB/s 00:01 [##################] 100.0%
> >>
> >> building /gnu/store/32a28hd7aainwn0hfsnf3blh8prmfz61-jupyterlab_server-1.2.0.tar.gz.drv...
> >> downloading from https://files.pythonhosted.org/packages/source/j/jupyterlab_server/jupyterlab_server-1.2.0.tar.gz ...
> >> building /gnu/store/wzmfn9m45bmsbrx094rv3lf3w0rpmw49-python-pytest-check-links-0.3.0.drv...
> >> building /gnu/store/96xf5mrg134mcsp01b0m1qs1lxkb401a-python-jupyterlab-server-1.2.0.drv...
> >> \ 'check' phasebuilder for `/gnu/store/96xf5mrg134mcsp01b0m1qs1lxkb401a-python-jupyterlab-server-1.2.0.drv' failed with exit code 1
> >> build of /gnu/store/96xf5mrg134mcsp01b0m1qs1lxkb401a-python-jupyterlab-server-1.2.0.drv failed
> >> View build log at '/var/log/guix/drvs/96/xf5mrg134mcsp01b0m1qs1lxkb401a-python-jupyterlab-server-1.2.0.drv.bz2'.
> >> guix environment: error: build of `/gnu/store/96xf5mrg134mcsp01b0m1qs1lxkb401a-python-jupyterlab-server-1.2.0.drv' failed
> >> ~~~~~END~~~~~
> >>
> >> Apparently ipykernel is not found, but when I visit
> >> https://pypi.org/simple/ipykernel/, I see packages there.
> >>
> >> From the logs:
> >>
> >> ~~~~START~~~~
> >> Download error on https://pypi.org/simple/ipykernel/: [Errno -2] Name or service not known -- Some packages may not be found!
> >> Couldn't find index page for 'ipykernel' (maybe misspelled?)
> >> ~~~~~END~~~~~
> >>
> >> Do I need to add another input in my `jupyterlab.scm`? (How?) Or
> >> perhaps I need to create a separate `ipykernel.scm` which
> >> contains the output of `guix import pypi --recursive ipykernel`?
> >>
> >> However, it somehow seems to fail for PyPI simple in general
> >> (from the logs again):
> >>
> >> ~~~~START~~~~
> >> Reading https://pypi.org/simple/
> >> Download error on https://pypi.org/simple/: [Errno -2] Name or service not known -- Some packages may not be found!
> >> No local packages or working download links found for ipykernel
> >> error: Could not find suitable distribution for Requirement.parse('ipykernel')
> >> command "python" "-c" "import setuptools, tokenize;__file__='setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\\r\\n', '\\n');f.close();exec(compile(code, __file__, 'exec'))" "test" failed with status 1
> >> ~~~~~END~~~~~
> >>
> >> Thanks,
> >> Zelphir
> >>
> >>
> >> On 10/18/20 6:35 PM, Efraim Flashner wrote:
> >>> On Sun, Oct 18, 2020 at 01:55:49PM +0200, Zelphir Kaltstahl wrote:
> >>>> Hello Guix Users, hello Zimoun and Tobias!
> >>>>
> >>>> Thanks for your information regarding the importer syntax thing.
> >>>>
> >>>> I continued trying to get a jupyterlab environment today.
> >>>>
> >>>> Here is what I did so far:
> >>>>
> >>>> (1) Create my manifest file:
> >>>>
> >>>> ~~~~START~~~~
> >>>> (specifications->manifest
> >>>> '("python"))
> >>>> ~~~~~END~~~~~
> >>>>
> >>>> (2) Create my channels file:
> >>>>
> >>>> ~~~~START~~~~
> >>>> $ guix describe --format=channels > channels.scm
> >>>> $ cat channels.scm
> >>>> (list (channel
> >>>> (name 'guix)
> >>>> (url "https://git.savannah.gnu.org/git/guix.git")
> >>>> (commit
> >>>> "6ca673b30dac281ba27a8dac242c0ac83e5e354b")
> >>>> (introduction
> >>>> (make-channel-introduction
> >>>> "9edb3f66fd807b096b48283debdcddccfea34bad"
> >>>> (openpgp-fingerprint
> >>>> "BBB0 2DDF 2CEA F6A8 0D1D E643 A2A0 6DF2 A33A 54FA")))))
> >>>> ~~~~~END~~~~~
> >>>>
> >>>> (3) Create my jupyterlab PyPI import file, this time around using the
> >>>> "/" instead of "@" for specifying the version:
> >>>>
> >>>> ~~~~START~~~~
> >>>> $ guix import pypi --recursive jupyterlab/2.1.5 > jupyterlab.scm
> >>>> ~~~~~END~~~~~
> >>>>
> >>>> (4) Add missing import expressions and add output expression at the end:
> >>>>
> >>>> ~~~~START~~~~
> >>>> ;; add module imports
> >>>> (use-modules
> >>>> (guix packages)
> >>>> (guix download)
> >>>> (guix build-system python)
> >>>> ((guix licenses) #:prefix license:)
> >>>> ;; use `guix environment --ad-hoc python-jinja2 -- guix package -A python-jinja2` to find the location of python-jinja2, which is gnu/packages/python-xyz.scm
> >>> This can be just 'guix package -A python-jinja2', no need for the
> >>> environment.
> >>>
> >>>> (gnu packages python-xyz)
> >>>> ;; for python-tornado
> >>>> (gnu packages python-web)
> >>>> ;; for python-pytest
> >>>> (gnu packages check))
> >>>>
> >>>> ;; QUESTION: Why are those required packages not imported by guix automatically?
> >>>> ;; QUESTION: Why are the manually imported packages not actually in files with their own name, but instead jinja2 -> python-xyz, tornado -> python-web, and pytest -> check?
> >>>> ;; QUESTION: Is my process of finding the files in which the packages are correct or just working by chance?
> >>>>
> >>>> (define-public python-jupyterlab-server
> >>>> (package
> >>>> (name "python-jupyterlab-server")
> >>>> (version "1.2.0")
> >>>> (source
> >>>> (origin
> >>>> (method url-fetch)
> >>>> (uri (pypi-uri "jupyterlab-server" version))
> >>>> (sha256
> >>>> (base32
> >>>> "132xby7531rbrjg9bqvsx86birr1blynjxy8gi5kcnb6x7fxjcal"))))
> >>>> (build-system python-build-system)
> >>>> (propagated-inputs
> >>>> `(("python-jinja2" ,python-jinja2)
> >>>> ("python-json5" ,python-json5)
> >>>> ("python-jsonschema" ,python-jsonschema)
> >>>> ("python-notebook" ,python-notebook)
> >>>> ("python-requests" ,python-requests)))
> >>>> (native-inputs
> >>>> `(("python-pytest" ,python-pytest)
> >>>> ("python-requests" ,python-requests)))
> >>>> (home-page "https://jupyter.org")
> >>>> (synopsis "JupyterLab Server")
> >>>> (description "JupyterLab Server")
> >>>> (license license:bsd-3)))
> >>>>
> >>>> (define-public python-jupyterlab
> >>>> (package
> >>>> (name "python-jupyterlab")
> >>>> (version "2.1.5")
> >>>> (source
> >>>> (origin
> >>>> (method url-fetch)
> >>>> (uri (pypi-uri "jupyterlab" version))
> >>>> (sha256
> >>>> (base32
> >>>> "162jn51cg36fsn4l2zhnb5n4nbkhm9wlv974ggcnmdij3i4r4yya"))))
> >>>> (build-system python-build-system)
> >>>> (propagated-inputs
> >>>> `(("python-jinja2" ,python-jinja2)
> >>>> ("python-jupyterlab-server"
> >>>> ,python-jupyterlab-server)
> >>>> ("python-notebook" ,python-notebook)
> >>>> ("python-tornado" ,python-tornado)))
> >>>> (native-inputs
> >>>> `(("python-pytest" ,python-pytest)
> >>>> ("python-pytest-check-links"
> >>>> ,python-pytest-check-links)
> >>>> ("python-requests" ,python-requests)
> >>>> ("python-virtualenv" ,python-virtualenv)
> >>>> ("python-wheel" ,python-wheel)))
> >>>> (home-page "http://jupyter.org")
> >>>> (synopsis
> >>>> "The JupyterLab notebook server extension.")
> >>>> (description
> >>>> "The JupyterLab notebook server extension.")
> >>>> (license license:bsd-3)))
> >>>>
> >>>> python-jupyterlab
> >>>> ~~~~~END~~~~~
> >>>>
> >>>> And as noted in the comments, I have 3 questions at this point:
> >>>>
> >>>> (Q1) Why are those required packages not imported by guix automatically?
> >>>> (My guess: This functionality simply has not yet been implemented.)
> >>>>
> >>>> (Q2) Why are the manually imported packages not actually in files with
> >>>> their own name, but instead jinja2 -> python-xyt, tornado -> python-web,
> >>>> and pytest -> check? Why not (gnu packages python pytest) for example?
> >>>>
> >>>> (Q3) Is my process of finding the files in which the packages are
> >>>> correct or just working by chance? Basically I am creating temporary
> >>>> environments, in which I then lookup "where would the package be
> >>>> installed" and then exit the temporary environment to use that
> >>>> information in my imported package file's import expressions /
> >>>> use-modules expression. This seems to be a bit of a convoluted process,
> >>>> though worth it, if it always works in the end.
> >>>>
> >>>> (4) Now I run my time-machine command:
> >>>>
> >>>> ~~~~START~~~~
> >>>> $ guix time-machine --channels=channels.scm -- environment --manifest=manifest.scm --load=jupyterlab.scm
> >>>> ~~~~~END~~~~~
> >>>>
> >>>> This take a moment and then I get an error (the full output is longer,
> >>>> but when running it multiple times, already successful steps are not all
> >>>> done repeatedly, so the output is then reduced to what fails):
> >>>>
> >>>> ~~~~START~~~~
> >>>> $ guix time-machine --channels=channels.scm -- environment --manifest=manifest.scm --load=jupyterlab.scm
> >>>> Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.org/git/guix.git'...
> >>>> The following derivations will be built:
> >>>> /gnu/store/wzmfn9m45bmsbrx094rv3lf3w0rpmw49-python-pytest-check-links-0.3.0.drv
> >>>> /gnu/store/n9i421lrbwrr8d0947w5vma7rhy3iyba-python-jupyterlab-server-1.2.0.drv
> >>>> /gnu/store/s7jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv
> >>>>
> >>>> 4,2 MB will be downloaded
> >>>> downloading from https://ci.guix.gnu.org/nar/lzip/2nahbs5v8q073gjmy224gk0h5lsh1kkw-python-nbconvert-5.0.0b1 ...
> >>>> python-nbconvert-5.0.0b1 301KiB 2.0MiB/s 00:00 [##################] 100.0%
> >>>>
> >>>> building /gnu/store/s7jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv...
> >>>> |builder for `/gnu/store/s7jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv' failed to produce output path `/gnu/store/92md7gh966n4fzj6al267lqq4xjx0ncf-jupyterlab-server-1.2.0.tar.gz'
> >>>> build of /gnu/store/s7jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv failed
> >>>> View build log at '/var/log/guix/drvs/s7/jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv.bz2'.
> >>>> cannot build derivation `/gnu/store/n9i421lrbwrr8d0947w5vma7rhy3iyba-python-jupyterlab-server-1.2.0.drv': 1 dependencies couldn't be built
> >>>> killing process 7384
> >>>> guix environment: error: build of `/gnu/store/n9i421lrbwrr8d0947w5vma7rhy3iyba-python-jupyterlab-server-1.2.0.drv' failed
> >>>> ~~~~~END~~~~~
> >>>>
> >>>> OK, an error, perhaps I can understand it. Lets look at that log file:
> >>>>
> >>>> ~~~~START~~~~
> >>>> $ cp /var/log/guix/drvs/s7/jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv.bz2 .
> >>>> $ bzip2 --decompress jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv.bz2
> >>>> $ cat jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv
> >>>>
> >>>> Starting download of /gnu/store/92md7gh966n4fzj6al267lqq4xjx0ncf-jupyterlab-server-1.2.0.tar.gz
> >>>> From https://files.pythonhosted.org/packages/source/j/jupyterlab-server/jupyterlab-server-1.2.0.tar.gz...
> >>>> download failed "https://files.pythonhosted.org/packages/source/j/jupyterlab-server/jupyterlab-server-1.2.0.tar.gz" 404 "Not Found"
> >>>>
> >>>> Starting download of /gnu/store/92md7gh966n4fzj6al267lqq4xjx0ncf-jupyterlab-server-1.2.0.tar.gz
> >>>> From https://ci.guix.gnu.org/file/jupyterlab-server-1.2.0.tar.gz/sha256/132xby7531rbrjg9bqvsx86birr1blynjxy8gi5kcnb6x7fxjcal...
> >>>> download failed "https://ci.guix.gnu.org/file/jupyterlab-server-1.2.0.tar.gz/sha256/132xby7531rbrjg9bqvsx86birr1blynjxy8gi5kcnb6x7fxjcal" 404 "Not Found"
> >>>>
> >>>> Starting download of /gnu/store/92md7gh966n4fzj6al267lqq4xjx0ncf-jupyterlab-server-1.2.0.tar.gz
> >>>> From https://tarballs.nixos.org/sha256/132xby7531rbrjg9bqvsx86birr1blynjxy8gi5kcnb6x7fxjcal...
> >>>> download failed "https://tarballs.nixos.org/sha256/132xby7531rbrjg9bqvsx86birr1blynjxy8gi5kcnb6x7fxjcal" 404 "Not Found"
> >>>>
> >>>> Starting download of /gnu/store/92md7gh966n4fzj6al267lqq4xjx0ncf-jupyterlab-server-1.2.0.tar.gz
> >>>> From https://archive.softwareheritage.org/api/1/content/sha256:5431d9dde96659364b7cc877693d5d21e7b80cea7ae3959ecc2b87518e5f5d8c/raw/...
> >>>> download failed "https://archive.softwareheritage.org/api/1/content/sha256:5431d9dde96659364b7cc877693d5d21e7b80cea7ae3959ecc2b87518e5f5d8c/raw/" 404 "Not Found"
> >>>> failed to download "/gnu/store/92md7gh966n4fzj6al267lqq4xjx0ncf-jupyterlab-server-1.2.0.tar.gz" from "https://files.pythonhosted.org/packages/source/j/jupyterlab-server/jupyterlab-server-1.2.0.tar.gz"
> >>>> ~~~~~END~~~~~
> >>>>
> >>>> So it seems, that the jupyterlab-server file is simply not downloadable
> >>>> any longer!
> >>>>
> >>>> Trying using wget:
> >>>>
> >>>> ~~~~START~~~~
> >>>> $ wget https://files.pythonhosted.org/packages/source/j/jupyterlab-server/jupyterlab-server-1.2.0.tar.gz
> >>>> --2020-10-18 13:49:52-- https://files.pythonhosted.org/packages/source/j/jupyterlab-server/jupyterlab-server-1.2.0.tar.gz
> >>>> Resolving files.pythonhosted.org (files.pythonhosted.org)... 2a04:4e42:9::319, 151.101.37.63
> >>>> Connecting to files.pythonhosted.org (files.pythonhosted.org)|2a04:4e42:9::319|:443... failed: Connection refused.
> >>>> Connecting to files.pythonhosted.org (files.pythonhosted.org)|151.101.37.63|:443... connected.
> >>>> HTTP request sent, awaiting response... 404 Not Found
> >>>> 2020-10-18 13:49:53 ERROR 404: Not Found.
> >>>> ~~~~~END~~~~~
> >>>>
> >>>> So now I am out of ideas. It seems the file is not available any longer
> >>>> and the definition of jupyterlab needs to be updated somewhere, so that
> >>>> it does not try to download an old or non-existent version of
> >>>> jupyter-labserver. But how is this usually done? Can I specify it
> >>>> somewhere in one of the 3 files I have, or am I dependent on someone
> >>>> fixing the jupyterlab-server dependency / input for juypterlab?
> >>>>
> >>>> Thanks for your help so far! Tell me, if I need to provide any more
> >>>> information to solve the problem.
> >>> Try chaning the URL line to (uri (pypi-uri "jupyterlab_server" version)),
> >>> with an underscore (_). I don't have any special suggestions for knowing
> >>> that it should be an underscore instead of a dash. The best I have is
> >>> the output from 'guix import pypi jupyterlab-server:
> >>>
> >>> (ins)efraim@E5400 ~$ guix import pypi jupyterlab-server
> >>>
> >>> Starting download of /tmp/guix-file.ayJ41F
> >>> From https://files.pythonhosted.org/packages/92/54/5f321ca4cebfb644ac59eb21601b46a2ff9831ffe1b4e5a588f2a7e98d48/jupyterlab_server-1.2.0.tar.gz...
> >>> …er-1.2.0.tar.gz 22KiB 57KiB/s 00:00 [##################] 100.0%
> >>>
> >>>
> >>>
> >>>> Best regards,
> >>>> Zelphir
> >>>>
> >>>>
> >>>> On 10/16/20 2:25 PM, Tobias Geerinckx-Rice wrote:
> >>>>> Zelphir,
> >>>>>
> >>>>> Zelphir Kaltstahl 写道:
> >>>>>> $ guix import pypi 'jupyterlab@2.1.5' --recursive
> >>>>> It will work if you substitute ‘/’ for ‘@’. Yes, this is a happy
> >>>>> accident specific to the PyPI importer, and I'm sure you can guess why
> >>>>> it happens to work.
> >>>>>
> >>>>>>> guix import hackage mtl@2.1.3.1
> >>>>>> But that is in the "hackage" import section. Is the same not available
> >>>>>> for PyPI?
> >>>>> [...]
> >>>>>
> >>>>>> Do the various importers work differently?
> >>>>> Unfortunately so. It would be great(TM) if PACKAGE[@VERSION] were
> >>>>> standard. Each importer could handle it properly (e.g., by turning it
> >>>>> into "/") or return a friendlier ‘the foo importer does not yet
> >>>>> support versions’ error.
> >>>>>
> >>>>> I don't have the time, but this sounds like a good intermediate-level
> >>>>> hack for someone who does :-)
> >>>>>
> >>>>> Kind regards,
> >>>>>
> >>>>> T G-R
> >>>> --
> >>>> repositories: https://notabug.org/ZelphirKaltstahl
> >>>>
> >> --
> >> repositories: https://notabug.org/ZelphirKaltstahl
> >>
> >>
> >> --
> >> Sent from my Android device with K-9 Mail. Please excuse my brevity.
> > --
> > repositories: https://notabug.org/ZelphirKaltstahl
>
> --
> repositories: https://notabug.org/ZelphirKaltstahl
>
--
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 --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: guix import error + New: setting up a jupyterlab environment
2020-10-21 7:18 ` Efraim Flashner
@ 2020-10-24 19:42 ` Zelphir Kaltstahl
2020-10-25 8:52 ` Efraim Flashner
0 siblings, 1 reply; 15+ messages in thread
From: Zelphir Kaltstahl @ 2020-10-24 19:42 UTC (permalink / raw)
To: Efraim Flashner; +Cc: help-guix
Hello Efraim!
On 10/21/20 9:18 AM, Efraim Flashner wrote:
> On Mon, Oct 19, 2020 at 11:12:35PM +0200, Zelphir Kaltstahl wrote:
>> Meanwhile I have managed to run the jupyterlab-server tests, as
>> described in more details here:
>> https://github.com/jupyterlab/jupyterlab_server/issues/128
>>
>> Indeed, in version 1.2.0 the tests fail the same way they fail when I
>> try to create my environment. This means the next thing to fix would
>> probably be to use another version of jupyterlab-server. 1.2.0 is a tag
>> in the jupyterlab-server repository, which _seems_ to be the latest
>> "stable" version, before a lot of alpha, beta, and release-candidate
>> versions follow.
>>
>> I guess I could switch the commit in my `jupyterlab.scm` file to point
>> to a different one?
>>
>> I can change the version to `2.0.0rc1`, but I do not know how the
>> checksum is calculated. The checksum is shorter than what I see on
>> simply PyPI:
>>
>> https://files.pythonhosted.org/packages/79/43/5249be5ee741a93f3fa60823caf9a276cadc3103dae16d6e36cc534fefd8/jupyterlab_server-2.0.0rc1.tar.gz#sha256=733b149c5ab8e50ea5f2897c323047257060e7bf2dc0fa88663181427bec605d
>>
>> and base32 should only make it longer, not shorter.
>>
>> Can you explain how to switch a version manually and calculate the
>> checksum to match another version?
> For a tarball like the one at pythonhosted you'd download the file and
> then run 'guix hash the-file'. If you're using a source code repository
> then from the top level of the repo you'd run 'guix hash --exclude-vcs
> --recursive .', or 'guix hash -rx .' for short. The hash layout that
> Guix uses is the sha256 of the tarball base32 encoded, but with a change
> in the letters used.
>
> For python packages you can specify a version number, so in this case
> it'd be 'guix import pypi jupyterlab_server/2.0.0rc1'. Some other
> importers us the '@' symbol to specify version number and I think some
> don't support using other versions at all.
>
> I don't know how compatible different major versions of
> jupyterlab-server are with each other, so I'd stick with 1.2.0 for now.
This means however, that the check phase will fail, because of the
failing tests in the jupyterlab_server repository on version 1.2.0.
Unless there is a way to disable running those specific tests, I guess
this means, that only getting the tests to pass in the jupyterlab_server
repository will solve the problem?
>> Regards,
>> Zelphir
>>
>> On 10/19/20 8:19 PM, Zelphir Kaltstahl wrote:
>>> Hello Efraim,
>>>
>>> Thanks for your patience! It seems with that I am getting quite far
>>> (at least it feels like making progress, or even being close to have a
>>> working environment), up to the "check phase". There some tests
>>> failing in the "check phase". Here is what I am getting now,
>>> regardless of whether I stick ("python-ipykernel" ,python-ipykernel)
>>> in the native inputs or propagated inputs:
>>>
>>> ~~~~START~~~~
>>> running install_egg_info
>>> Copying jupyterlab_server.egg-info to /gnu/store/2h44ldpcqqd0q7hqpbcqdavcnbjsibfb-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server-1.2.0-py3.8.egg-info
>>> running install_scripts
>>> phase `install' succeeded after 0.3 seconds
>>> starting phase `wrap'
>>> find-files: /gnu/store/2h44ldpcqqd0q7hqpbcqdavcnbjsibfb-python-jupyterlab-server-1.2.0/bin: No such file or directory
>>> find-files: /gnu/store/2h44ldpcqqd0q7hqpbcqdavcnbjsibfb-python-jupyterlab-server-1.2.0/sbin: No such file or directory
>>> phase `wrap' succeeded after 0.0 seconds
>>> starting phase `check'
>>> running "python setup.py" with command "test" and parameters ()
>>> running test
>>> running egg_info
>>> writing jupyterlab_server.egg-info/PKG-INFO
>>> writing dependency_links to jupyterlab_server.egg-info/dependency_links.txt
>>> writing requirements to jupyterlab_server.egg-info/requires.txt
>>> writing top-level names to jupyterlab_server.egg-info/top_level.txt
>>> reading manifest file 'jupyterlab_server.egg-info/SOURCES.txt'
>>> reading manifest template 'MANIFEST.in'
>>> warning: no previously-included files matching '*~' found anywhere in distribution
>>> warning: no previously-included files matching '*.pyc' found anywhere in distribution
>>> warning: no previously-included files matching '*.pyo' found anywhere in distribution
>>> warning: no previously-included files matching '.git' found anywhere in distribution
>>> warning: no previously-included files matching '.ipynb_checkpoints' found anywhere in distribution
>>> writing manifest file 'jupyterlab_server.egg-info/SOURCES.txt'
>>> running build_ext
>>> test_get (jupyterlab_server.tests.test_settings_api.SettingsAPITest) ... ERROR
>>> test_get_bad (jupyterlab_server.tests.test_settings_api.SettingsAPITest) ... ERROR
>>> test_listing (jupyterlab_server.tests.test_settings_api.SettingsAPITest) ... ERROR
>>> test_patch (jupyterlab_server.tests.test_settings_api.SettingsAPITest) ... ERROR
>>> test_patch_bad_data (jupyterlab_server.tests.test_settings_api.SettingsAPITest) ... ERROR
>>> test_patch_wrong_id (jupyterlab_server.tests.test_settings_api.SettingsAPITest) ... ERROR
>>> test_bad_put (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest) ... ERROR
>>> test_blank_put (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest) ... ERROR
>>> test_delete (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest) ... ERROR
>>> test_get (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest) ... ERROR
>>> test_listing (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest) ... ERROR
>>> test_put (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest) ... ERROR
>>>
>>> ======================================================================
>>> ERROR: test_get (jupyterlab_server.tests.test_settings_api.SettingsAPITest)
>>> ----------------------------------------------------------------------
>>> Traceback (most recent call last):
>>> File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_settings_api.py", line 31, in setUp
>>> dst = os.path.join(self.lab_config.schemas_dir, '@jupyterlab')
>>> AttributeError: 'SettingsAPITest' object has no attribute 'lab_config'
>>>
>>> ======================================================================
>>> ERROR: test_get_bad (jupyterlab_server.tests.test_settings_api.SettingsAPITest)
>>> ----------------------------------------------------------------------
>>> Traceback (most recent call last):
>>> File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_settings_api.py", line 31, in setUp
>>> dst = os.path.join(self.lab_config.schemas_dir, '@jupyterlab')
>>> AttributeError: 'SettingsAPITest' object has no attribute 'lab_config'
>>>
>>> ======================================================================
>>> ERROR: test_listing (jupyterlab_server.tests.test_settings_api.SettingsAPITest)
>>> ----------------------------------------------------------------------
>>> Traceback (most recent call last):
>>> File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_settings_api.py", line 31, in setUp
>>> dst = os.path.join(self.lab_config.schemas_dir, '@jupyterlab')
>>> AttributeError: 'SettingsAPITest' object has no attribute 'lab_config'
>>>
>>> ======================================================================
>>> ERROR: test_patch (jupyterlab_server.tests.test_settings_api.SettingsAPITest)
>>> ----------------------------------------------------------------------
>>> Traceback (most recent call last):
>>> File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_settings_api.py", line 31, in setUp
>>> dst = os.path.join(self.lab_config.schemas_dir, '@jupyterlab')
>>> AttributeError: 'SettingsAPITest' object has no attribute 'lab_config'
>>>
>>> ======================================================================
>>> ERROR: test_patch_bad_data (jupyterlab_server.tests.test_settings_api.SettingsAPITest)
>>> ----------------------------------------------------------------------
>>> Traceback (most recent call last):
>>> File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_settings_api.py", line 31, in setUp
>>> dst = os.path.join(self.lab_config.schemas_dir, '@jupyterlab')
>>> AttributeError: 'SettingsAPITest' object has no attribute 'lab_config'
>>>
>>> ======================================================================
>>> ERROR: test_patch_wrong_id (jupyterlab_server.tests.test_settings_api.SettingsAPITest)
>>> ----------------------------------------------------------------------
>>> Traceback (most recent call last):
>>> File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_settings_api.py", line 31, in setUp
>>> dst = os.path.join(self.lab_config.schemas_dir, '@jupyterlab')
>>> AttributeError: 'SettingsAPITest' object has no attribute 'lab_config'
>>>
>>> ======================================================================
>>> ERROR: test_bad_put (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest)
>>> ----------------------------------------------------------------------
>>> Traceback (most recent call last):
>>> File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_workspaces_api.py", line 34, in setUp
>>> dst = os.path.join(self.lab_config.workspaces_dir, item)
>>> AttributeError: 'WorkspacesAPITest' object has no attribute 'lab_config'
>>>
>>> ======================================================================
>>> ERROR: test_blank_put (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest)
>>> ----------------------------------------------------------------------
>>> Traceback (most recent call last):
>>> File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_workspaces_api.py", line 34, in setUp
>>> dst = os.path.join(self.lab_config.workspaces_dir, item)
>>> AttributeError: 'WorkspacesAPITest' object has no attribute 'lab_config'
>>>
>>> ======================================================================
>>> ERROR: test_delete (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest)
>>> ----------------------------------------------------------------------
>>> Traceback (most recent call last):
>>> File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_workspaces_api.py", line 34, in setUp
>>> dst = os.path.join(self.lab_config.workspaces_dir, item)
>>> AttributeError: 'WorkspacesAPITest' object has no attribute 'lab_config'
>>>
>>> ======================================================================
>>> ERROR: test_get (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest)
>>> ----------------------------------------------------------------------
>>> Traceback (most recent call last):
>>> File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_workspaces_api.py", line 34, in setUp
>>> dst = os.path.join(self.lab_config.workspaces_dir, item)
>>> AttributeError: 'WorkspacesAPITest' object has no attribute 'lab_config'
>>>
>>> ======================================================================
>>> ERROR: test_listing (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest)
>>> ----------------------------------------------------------------------
>>> Traceback (most recent call last):
>>> File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_workspaces_api.py", line 34, in setUp
>>> dst = os.path.join(self.lab_config.workspaces_dir, item)
>>> AttributeError: 'WorkspacesAPITest' object has no attribute 'lab_config'
>>>
>>> ======================================================================
>>> ERROR: test_put (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest)
>>> ----------------------------------------------------------------------
>>> Traceback (most recent call last):
>>> File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_workspaces_api.py", line 34, in setUp
>>> dst = os.path.join(self.lab_config.workspaces_dir, item)
>>> AttributeError: 'WorkspacesAPITest' object has no attribute 'lab_config'
>>>
>>> ----------------------------------------------------------------------
>>> Ran 12 tests in 0.001s
>>>
>>> FAILED (errors=12)
>>> Test failed: <unittest.runner.TextTestResult run=12 errors=12 failures=0>
>>> error: Test failed: <unittest.runner.TextTestResult run=12 errors=12 failures=0>
>>> command "python" "-c" "import setuptools, tokenize;__file__='setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\\r\\n', '\\n');f.close();exec(compile(code, __file__, 'exec'))" "test" failed with status 1
>>> ~~~~~END~~~~~
>>>
>>> I have some thoughts about this:
>>>
>>> The Python error does not really tell me what is wrong. I don't know
>>> why the `WorkspacesAPITest` does not have an attribute named `lab_config`.
>>>
>>> One can see, that those are all API tests. Since there were problems
>>> in the previous step with network, perhaps it is a network thing here
>>> as well? (Is network, even if localhost for testing, available in the
>>> "check phase"?)
>>>
>>> It could also simply be, that some PyPI package has failing tests. I
>>> don't know how one could then skip such tests.
>>>
>>> I guess I will summarize everything in the end and put it in a
>>> repository as a kind of "guide", so that others can use it or learn
>>> from the process.
>>>
>>> Regards,
>>> Zelphir
>>>
>>> On 10/19/20 6:54 PM, Efraim Flashner wrote:
>>>> It looks like you need to add python-ipykernel to native-inputs.
>>>> Unless it's needed to run the program and not just for the test
>>>> suite, in which case it should go in propagated-inputs. There's no
>>>> network available in the build environment so it can't retrieve
>>>> ipykernel while building.
>>>>
>>>>
>>>> On October 19, 2020 2:31:53 PM UTC, Zelphir Kaltstahl
>>>> <zelphirkaltstahl@posteo.de> wrote:
>>>>
>>>> Hello Efraim!
>>>>
>>>> Thank you! Your idea of replacing "-" with "_" seems to partially
>>>> help:
>>>>
>>>> The package is downloaded and byte compiled. However, afterwards
>>>> there is a problem, when it tries to copy the byte-compiled files
>>>> in the "wrap phase" (comments inserted in some places):
>>>>
>>>> ~~~~START~~~~
>>>> ### ... a lot of output before this ...
>>>>
>>>> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/__init__.py to __init__.cpython-38.pyc
>>>> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/_version.py to _version.cpython-38.pyc
>>>> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/app.py to app.cpython-38.pyc
>>>> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/handlers.py to handlers.cpython-38.pyc
>>>> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/listings_handler.py to listings_handler.cpython-38.pyc
>>>> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/process.py to process.cpython-38.pyc
>>>> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/process_app.py to process_app.cpython-38.pyc
>>>> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/server.py to server.cpython-38.pyc
>>>> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/servertest.py to servertest.cpython-38.pyc
>>>> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/settings_handler.py to settings_handler.cpython-38.pyc
>>>> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/themes_handler.py to themes_handler.cpython-38.pyc
>>>> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/workspaces_handler.py to workspaces_handler.cpython-38.pyc
>>>> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/tests/__init__.py to __init__.cpython-38.pyc
>>>> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/tests/test_settings_api.py to test_settings_api.cpython-38.pyc
>>>> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/tests/test_workspaces_api.py to test_workspaces_api.cpython-38.pyc
>>>> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/tests/utils.py to utils.cpython-38.pyc
>>>>
>>>> ### ... seems byte-compiling went without problems, but not comes the problem ...
>>>>
>>>> running install_egg_info
>>>> Copying jupyterlab_server.egg-info to /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server-1.2.0-py3.8.egg-info
>>>> running install_scripts
>>>> phase `install' succeeded after 0.3 seconds
>>>> starting phase `wrap'
>>>> find-files: /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/bin: No such file or directory
>>>> find-files: /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/sbin: No such file or directory
>>>> phase `wrap' succeeded after 0.0 seconds
>>>> starting phase `check'
>>>> running "python setup.py" with command "test" and parameters ()
>>>> running test
>>>> Searching for ipykernel
>>>> Reading https://pypi.org/simple/ipykernel/
>>>> Download error on https://pypi.org/simple/ipykernel/: [Errno -2] Name or service not known -- Some packages may not be found!
>>>> Couldn't find index page for 'ipykernel' (maybe misspelled?)
>>>> Scanning index of all packages (this may take a while)
>>>> Reading https://pypi.org/simple/
>>>> Download error on https://pypi.org/simple/: [Errno -2] Name or service not known -- Some packages may not be found!
>>>> No local packages or working download links found for ipykernel
>>>> error: Could not find suitable distribution for Requirement.parse('ipykernel')
>>>> command "python" "-c" "import setuptools, tokenize;__file__='setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\\r\\n', '\\n');f.close();exec(compile(code, __file__, 'exec'))" "test" failed with status 1
>>>> ~~~~~END~~~~~
>>>>
>>>> So it seems, that while the download URL is corrected, there is
>>>> another place, where Guix has an error now, resulting in a final
>>>> error shown in command line:
>>>>
>>>> ~~~~START~~~~
>>>> $ guix time-machine --channels=channels.scm -- environment --manifest=manifest.scm --load=jupyterlab.scm
>>>> Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.org/git/guix.git'...
>>>> substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0%
>>>> The following derivations will be built:
>>>> /gnu/store/wzmfn9m45bmsbrx094rv3lf3w0rpmw49-python-pytest-check-links-0.3.0.drv
>>>> /gnu/store/96xf5mrg134mcsp01b0m1qs1lxkb401a-python-jupyterlab-server-1.2.0.drv
>>>> /gnu/store/32a28hd7aainwn0hfsnf3blh8prmfz61-jupyterlab_server-1.2.0.tar.gz.drv
>>>>
>>>> 3,9 MB will be downloaded
>>>> downloading from https://ci.guix.gnu.org/nar/lzip/54kpl9psx16jwic4gpnjwh44kim04wlk-python-notebook-5.7.4 ...
>>>> python-notebook-5.7.4 3.7MiB 5.1MiB/s 00:01 [##################] 100.0%
>>>>
>>>> building /gnu/store/32a28hd7aainwn0hfsnf3blh8prmfz61-jupyterlab_server-1.2.0.tar.gz.drv...
>>>> downloading from https://files.pythonhosted.org/packages/source/j/jupyterlab_server/jupyterlab_server-1.2.0.tar.gz ...
>>>> building /gnu/store/wzmfn9m45bmsbrx094rv3lf3w0rpmw49-python-pytest-check-links-0.3.0.drv...
>>>> building /gnu/store/96xf5mrg134mcsp01b0m1qs1lxkb401a-python-jupyterlab-server-1.2.0.drv...
>>>> \ 'check' phasebuilder for `/gnu/store/96xf5mrg134mcsp01b0m1qs1lxkb401a-python-jupyterlab-server-1.2.0.drv' failed with exit code 1
>>>> build of /gnu/store/96xf5mrg134mcsp01b0m1qs1lxkb401a-python-jupyterlab-server-1.2.0.drv failed
>>>> View build log at '/var/log/guix/drvs/96/xf5mrg134mcsp01b0m1qs1lxkb401a-python-jupyterlab-server-1.2.0.drv.bz2'.
>>>> guix environment: error: build of `/gnu/store/96xf5mrg134mcsp01b0m1qs1lxkb401a-python-jupyterlab-server-1.2.0.drv' failed
>>>> ~~~~~END~~~~~
>>>>
>>>> Apparently ipykernel is not found, but when I visit
>>>> https://pypi.org/simple/ipykernel/, I see packages there.
>>>>
>>>> From the logs:
>>>>
>>>> ~~~~START~~~~
>>>> Download error on https://pypi.org/simple/ipykernel/: [Errno -2] Name or service not known -- Some packages may not be found!
>>>> Couldn't find index page for 'ipykernel' (maybe misspelled?)
>>>> ~~~~~END~~~~~
>>>>
>>>> Do I need to add another input in my `jupyterlab.scm`? (How?) Or
>>>> perhaps I need to create a separate `ipykernel.scm` which
>>>> contains the output of `guix import pypi --recursive ipykernel`?
>>>>
>>>> However, it somehow seems to fail for PyPI simple in general
>>>> (from the logs again):
>>>>
>>>> ~~~~START~~~~
>>>> Reading https://pypi.org/simple/
>>>> Download error on https://pypi.org/simple/: [Errno -2] Name or service not known -- Some packages may not be found!
>>>> No local packages or working download links found for ipykernel
>>>> error: Could not find suitable distribution for Requirement.parse('ipykernel')
>>>> command "python" "-c" "import setuptools, tokenize;__file__='setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\\r\\n', '\\n');f.close();exec(compile(code, __file__, 'exec'))" "test" failed with status 1
>>>> ~~~~~END~~~~~
>>>>
>>>> Thanks,
>>>> Zelphir
>>>>
>>>>
>>>> On 10/18/20 6:35 PM, Efraim Flashner wrote:
>>>>> On Sun, Oct 18, 2020 at 01:55:49PM +0200, Zelphir Kaltstahl wrote:
>>>>>> Hello Guix Users, hello Zimoun and Tobias!
>>>>>>
>>>>>> Thanks for your information regarding the importer syntax thing.
>>>>>>
>>>>>> I continued trying to get a jupyterlab environment today.
>>>>>>
>>>>>> Here is what I did so far:
>>>>>>
>>>>>> (1) Create my manifest file:
>>>>>>
>>>>>> ~~~~START~~~~
>>>>>> (specifications->manifest
>>>>>> '("python"))
>>>>>> ~~~~~END~~~~~
>>>>>>
>>>>>> (2) Create my channels file:
>>>>>>
>>>>>> ~~~~START~~~~
>>>>>> $ guix describe --format=channels > channels.scm
>>>>>> $ cat channels.scm
>>>>>> (list (channel
>>>>>> (name 'guix)
>>>>>> (url "https://git.savannah.gnu.org/git/guix.git")
>>>>>> (commit
>>>>>> "6ca673b30dac281ba27a8dac242c0ac83e5e354b")
>>>>>> (introduction
>>>>>> (make-channel-introduction
>>>>>> "9edb3f66fd807b096b48283debdcddccfea34bad"
>>>>>> (openpgp-fingerprint
>>>>>> "BBB0 2DDF 2CEA F6A8 0D1D E643 A2A0 6DF2 A33A 54FA")))))
>>>>>> ~~~~~END~~~~~
>>>>>>
>>>>>> (3) Create my jupyterlab PyPI import file, this time around using the
>>>>>> "/" instead of "@" for specifying the version:
>>>>>>
>>>>>> ~~~~START~~~~
>>>>>> $ guix import pypi --recursive jupyterlab/2.1.5 > jupyterlab.scm
>>>>>> ~~~~~END~~~~~
>>>>>>
>>>>>> (4) Add missing import expressions and add output expression at the end:
>>>>>>
>>>>>> ~~~~START~~~~
>>>>>> ;; add module imports
>>>>>> (use-modules
>>>>>> (guix packages)
>>>>>> (guix download)
>>>>>> (guix build-system python)
>>>>>> ((guix licenses) #:prefix license:)
>>>>>> ;; use `guix environment --ad-hoc python-jinja2 -- guix package -A python-jinja2` to find the location of python-jinja2, which is gnu/packages/python-xyz.scm
>>>>> This can be just 'guix package -A python-jinja2', no need for the
>>>>> environment.
>>>>>
>>>>>> (gnu packages python-xyz)
>>>>>> ;; for python-tornado
>>>>>> (gnu packages python-web)
>>>>>> ;; for python-pytest
>>>>>> (gnu packages check))
>>>>>>
>>>>>> ;; QUESTION: Why are those required packages not imported by guix automatically?
>>>>>> ;; QUESTION: Why are the manually imported packages not actually in files with their own name, but instead jinja2 -> python-xyz, tornado -> python-web, and pytest -> check?
>>>>>> ;; QUESTION: Is my process of finding the files in which the packages are correct or just working by chance?
>>>>>>
>>>>>> (define-public python-jupyterlab-server
>>>>>> (package
>>>>>> (name "python-jupyterlab-server")
>>>>>> (version "1.2.0")
>>>>>> (source
>>>>>> (origin
>>>>>> (method url-fetch)
>>>>>> (uri (pypi-uri "jupyterlab-server" version))
>>>>>> (sha256
>>>>>> (base32
>>>>>> "132xby7531rbrjg9bqvsx86birr1blynjxy8gi5kcnb6x7fxjcal"))))
>>>>>> (build-system python-build-system)
>>>>>> (propagated-inputs
>>>>>> `(("python-jinja2" ,python-jinja2)
>>>>>> ("python-json5" ,python-json5)
>>>>>> ("python-jsonschema" ,python-jsonschema)
>>>>>> ("python-notebook" ,python-notebook)
>>>>>> ("python-requests" ,python-requests)))
>>>>>> (native-inputs
>>>>>> `(("python-pytest" ,python-pytest)
>>>>>> ("python-requests" ,python-requests)))
>>>>>> (home-page "https://jupyter.org")
>>>>>> (synopsis "JupyterLab Server")
>>>>>> (description "JupyterLab Server")
>>>>>> (license license:bsd-3)))
>>>>>>
>>>>>> (define-public python-jupyterlab
>>>>>> (package
>>>>>> (name "python-jupyterlab")
>>>>>> (version "2.1.5")
>>>>>> (source
>>>>>> (origin
>>>>>> (method url-fetch)
>>>>>> (uri (pypi-uri "jupyterlab" version))
>>>>>> (sha256
>>>>>> (base32
>>>>>> "162jn51cg36fsn4l2zhnb5n4nbkhm9wlv974ggcnmdij3i4r4yya"))))
>>>>>> (build-system python-build-system)
>>>>>> (propagated-inputs
>>>>>> `(("python-jinja2" ,python-jinja2)
>>>>>> ("python-jupyterlab-server"
>>>>>> ,python-jupyterlab-server)
>>>>>> ("python-notebook" ,python-notebook)
>>>>>> ("python-tornado" ,python-tornado)))
>>>>>> (native-inputs
>>>>>> `(("python-pytest" ,python-pytest)
>>>>>> ("python-pytest-check-links"
>>>>>> ,python-pytest-check-links)
>>>>>> ("python-requests" ,python-requests)
>>>>>> ("python-virtualenv" ,python-virtualenv)
>>>>>> ("python-wheel" ,python-wheel)))
>>>>>> (home-page "http://jupyter.org")
>>>>>> (synopsis
>>>>>> "The JupyterLab notebook server extension.")
>>>>>> (description
>>>>>> "The JupyterLab notebook server extension.")
>>>>>> (license license:bsd-3)))
>>>>>>
>>>>>> python-jupyterlab
>>>>>> ~~~~~END~~~~~
>>>>>>
>>>>>> And as noted in the comments, I have 3 questions at this point:
>>>>>>
>>>>>> (Q1) Why are those required packages not imported by guix automatically?
>>>>>> (My guess: This functionality simply has not yet been implemented.)
>>>>>>
>>>>>> (Q2) Why are the manually imported packages not actually in files with
>>>>>> their own name, but instead jinja2 -> python-xyt, tornado -> python-web,
>>>>>> and pytest -> check? Why not (gnu packages python pytest) for example?
>>>>>>
>>>>>> (Q3) Is my process of finding the files in which the packages are
>>>>>> correct or just working by chance? Basically I am creating temporary
>>>>>> environments, in which I then lookup "where would the package be
>>>>>> installed" and then exit the temporary environment to use that
>>>>>> information in my imported package file's import expressions /
>>>>>> use-modules expression. This seems to be a bit of a convoluted process,
>>>>>> though worth it, if it always works in the end.
>>>>>>
>>>>>> (4) Now I run my time-machine command:
>>>>>>
>>>>>> ~~~~START~~~~
>>>>>> $ guix time-machine --channels=channels.scm -- environment --manifest=manifest.scm --load=jupyterlab.scm
>>>>>> ~~~~~END~~~~~
>>>>>>
>>>>>> This take a moment and then I get an error (the full output is longer,
>>>>>> but when running it multiple times, already successful steps are not all
>>>>>> done repeatedly, so the output is then reduced to what fails):
>>>>>>
>>>>>> ~~~~START~~~~
>>>>>> $ guix time-machine --channels=channels.scm -- environment --manifest=manifest.scm --load=jupyterlab.scm
>>>>>> Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.org/git/guix.git'...
>>>>>> The following derivations will be built:
>>>>>> /gnu/store/wzmfn9m45bmsbrx094rv3lf3w0rpmw49-python-pytest-check-links-0.3.0.drv
>>>>>> /gnu/store/n9i421lrbwrr8d0947w5vma7rhy3iyba-python-jupyterlab-server-1.2.0.drv
>>>>>> /gnu/store/s7jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv
>>>>>>
>>>>>> 4,2 MB will be downloaded
>>>>>> downloading from https://ci.guix.gnu.org/nar/lzip/2nahbs5v8q073gjmy224gk0h5lsh1kkw-python-nbconvert-5.0.0b1 ...
>>>>>> python-nbconvert-5.0.0b1 301KiB 2.0MiB/s 00:00 [##################] 100.0%
>>>>>>
>>>>>> building /gnu/store/s7jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv...
>>>>>> |builder for `/gnu/store/s7jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv' failed to produce output path `/gnu/store/92md7gh966n4fzj6al267lqq4xjx0ncf-jupyterlab-server-1.2.0.tar.gz'
>>>>>> build of /gnu/store/s7jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv failed
>>>>>> View build log at '/var/log/guix/drvs/s7/jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv.bz2'.
>>>>>> cannot build derivation `/gnu/store/n9i421lrbwrr8d0947w5vma7rhy3iyba-python-jupyterlab-server-1.2.0.drv': 1 dependencies couldn't be built
>>>>>> killing process 7384
>>>>>> guix environment: error: build of `/gnu/store/n9i421lrbwrr8d0947w5vma7rhy3iyba-python-jupyterlab-server-1.2.0.drv' failed
>>>>>> ~~~~~END~~~~~
>>>>>>
>>>>>> OK, an error, perhaps I can understand it. Lets look at that log file:
>>>>>>
>>>>>> ~~~~START~~~~
>>>>>> $ cp /var/log/guix/drvs/s7/jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv.bz2 .
>>>>>> $ bzip2 --decompress jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv.bz2
>>>>>> $ cat jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv
>>>>>>
>>>>>> Starting download of /gnu/store/92md7gh966n4fzj6al267lqq4xjx0ncf-jupyterlab-server-1.2.0.tar.gz
>>>>>> From https://files.pythonhosted.org/packages/source/j/jupyterlab-server/jupyterlab-server-1.2.0.tar.gz...
>>>>>> download failed "https://files.pythonhosted.org/packages/source/j/jupyterlab-server/jupyterlab-server-1.2.0.tar.gz" 404 "Not Found"
>>>>>>
>>>>>> Starting download of /gnu/store/92md7gh966n4fzj6al267lqq4xjx0ncf-jupyterlab-server-1.2.0.tar.gz
>>>>>> From https://ci.guix.gnu.org/file/jupyterlab-server-1.2.0.tar.gz/sha256/132xby7531rbrjg9bqvsx86birr1blynjxy8gi5kcnb6x7fxjcal...
>>>>>> download failed "https://ci.guix.gnu.org/file/jupyterlab-server-1.2.0.tar.gz/sha256/132xby7531rbrjg9bqvsx86birr1blynjxy8gi5kcnb6x7fxjcal" 404 "Not Found"
>>>>>>
>>>>>> Starting download of /gnu/store/92md7gh966n4fzj6al267lqq4xjx0ncf-jupyterlab-server-1.2.0.tar.gz
>>>>>> From https://tarballs.nixos.org/sha256/132xby7531rbrjg9bqvsx86birr1blynjxy8gi5kcnb6x7fxjcal...
>>>>>> download failed "https://tarballs.nixos.org/sha256/132xby7531rbrjg9bqvsx86birr1blynjxy8gi5kcnb6x7fxjcal" 404 "Not Found"
>>>>>>
>>>>>> Starting download of /gnu/store/92md7gh966n4fzj6al267lqq4xjx0ncf-jupyterlab-server-1.2.0.tar.gz
>>>>>> From https://archive.softwareheritage.org/api/1/content/sha256:5431d9dde96659364b7cc877693d5d21e7b80cea7ae3959ecc2b87518e5f5d8c/raw/...
>>>>>> download failed "https://archive.softwareheritage.org/api/1/content/sha256:5431d9dde96659364b7cc877693d5d21e7b80cea7ae3959ecc2b87518e5f5d8c/raw/" 404 "Not Found"
>>>>>> failed to download "/gnu/store/92md7gh966n4fzj6al267lqq4xjx0ncf-jupyterlab-server-1.2.0.tar.gz" from "https://files.pythonhosted.org/packages/source/j/jupyterlab-server/jupyterlab-server-1.2.0.tar.gz"
>>>>>> ~~~~~END~~~~~
>>>>>>
>>>>>> So it seems, that the jupyterlab-server file is simply not downloadable
>>>>>> any longer!
>>>>>>
>>>>>> Trying using wget:
>>>>>>
>>>>>> ~~~~START~~~~
>>>>>> $ wget https://files.pythonhosted.org/packages/source/j/jupyterlab-server/jupyterlab-server-1.2.0.tar.gz
>>>>>> --2020-10-18 13:49:52-- https://files.pythonhosted.org/packages/source/j/jupyterlab-server/jupyterlab-server-1.2.0.tar.gz
>>>>>> Resolving files.pythonhosted.org (files.pythonhosted.org)... 2a04:4e42:9::319, 151.101.37.63
>>>>>> Connecting to files.pythonhosted.org (files.pythonhosted.org)|2a04:4e42:9::319|:443... failed: Connection refused.
>>>>>> Connecting to files.pythonhosted.org (files.pythonhosted.org)|151.101.37.63|:443... connected.
>>>>>> HTTP request sent, awaiting response... 404 Not Found
>>>>>> 2020-10-18 13:49:53 ERROR 404: Not Found.
>>>>>> ~~~~~END~~~~~
>>>>>>
>>>>>> So now I am out of ideas. It seems the file is not available any longer
>>>>>> and the definition of jupyterlab needs to be updated somewhere, so that
>>>>>> it does not try to download an old or non-existent version of
>>>>>> jupyter-labserver. But how is this usually done? Can I specify it
>>>>>> somewhere in one of the 3 files I have, or am I dependent on someone
>>>>>> fixing the jupyterlab-server dependency / input for juypterlab?
>>>>>>
>>>>>> Thanks for your help so far! Tell me, if I need to provide any more
>>>>>> information to solve the problem.
>>>>> Try chaning the URL line to (uri (pypi-uri "jupyterlab_server" version)),
>>>>> with an underscore (_). I don't have any special suggestions for knowing
>>>>> that it should be an underscore instead of a dash. The best I have is
>>>>> the output from 'guix import pypi jupyterlab-server:
>>>>>
>>>>> (ins)efraim@E5400 ~$ guix import pypi jupyterlab-server
>>>>>
>>>>> Starting download of /tmp/guix-file.ayJ41F
>>>>> From https://files.pythonhosted.org/packages/92/54/5f321ca4cebfb644ac59eb21601b46a2ff9831ffe1b4e5a588f2a7e98d48/jupyterlab_server-1.2.0.tar.gz...
>>>>> …er-1.2.0.tar.gz 22KiB 57KiB/s 00:00 [##################] 100.0%
>>>>>
>>>>>
>>>>>
>>>>>> Best regards,
>>>>>> Zelphir
>>>>>>
>>>>>>
>>>>>> On 10/16/20 2:25 PM, Tobias Geerinckx-Rice wrote:
>>>>>>> Zelphir,
>>>>>>>
>>>>>>> Zelphir Kaltstahl 写道:
>>>>>>>> $ guix import pypi 'jupyterlab@2.1.5' --recursive
>>>>>>> It will work if you substitute ‘/’ for ‘@’. Yes, this is a happy
>>>>>>> accident specific to the PyPI importer, and I'm sure you can guess why
>>>>>>> it happens to work.
>>>>>>>
>>>>>>>>> guix import hackage mtl@2.1.3.1
>>>>>>>> But that is in the "hackage" import section. Is the same not available
>>>>>>>> for PyPI?
>>>>>>> [...]
>>>>>>>
>>>>>>>> Do the various importers work differently?
>>>>>>> Unfortunately so. It would be great(TM) if PACKAGE[@VERSION] were
>>>>>>> standard. Each importer could handle it properly (e.g., by turning it
>>>>>>> into "/") or return a friendlier ‘the foo importer does not yet
>>>>>>> support versions’ error.
>>>>>>>
>>>>>>> I don't have the time, but this sounds like a good intermediate-level
>>>>>>> hack for someone who does :-)
>>>>>>>
>>>>>>> Kind regards,
>>>>>>>
>>>>>>> T G-R
>>>>>> --
>>>>>> repositories: https://notabug.org/ZelphirKaltstahl
>>>> --
>>>> repositories: https://notabug.org/ZelphirKaltstahl
>>>> --
>>>> Sent from my Android device with K-9 Mail. Please excuse my brevity.
>>> --
>>> repositories: https://notabug.org/ZelphirKaltstahl
>> --
>> repositories: https://notabug.org/ZelphirKaltstahl
Regards,
Zelphir
--
repositories: https://notabug.org/ZelphirKaltstahl
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: guix import error + New: setting up a jupyterlab environment
2020-10-24 19:42 ` Zelphir Kaltstahl
@ 2020-10-25 8:52 ` Efraim Flashner
2020-10-25 11:49 ` Zelphir Kaltstahl
0 siblings, 1 reply; 15+ messages in thread
From: Efraim Flashner @ 2020-10-25 8:52 UTC (permalink / raw)
To: Zelphir Kaltstahl; +Cc: help-guix
[-- Attachment #1: Type: text/plain, Size: 40501 bytes --]
On Sat, Oct 24, 2020 at 09:42:13PM +0200, Zelphir Kaltstahl wrote:
> Hello Efraim!
>
> On 10/21/20 9:18 AM, Efraim Flashner wrote:
> > On Mon, Oct 19, 2020 at 11:12:35PM +0200, Zelphir Kaltstahl wrote:
> >> Meanwhile I have managed to run the jupyterlab-server tests, as
> >> described in more details here:
> >> https://github.com/jupyterlab/jupyterlab_server/issues/128
> >>
> >> Indeed, in version 1.2.0 the tests fail the same way they fail when I
> >> try to create my environment. This means the next thing to fix would
> >> probably be to use another version of jupyterlab-server. 1.2.0 is a tag
> >> in the jupyterlab-server repository, which _seems_ to be the latest
> >> "stable" version, before a lot of alpha, beta, and release-candidate
> >> versions follow.
> >>
> >> I guess I could switch the commit in my `jupyterlab.scm` file to point
> >> to a different one?
> >>
> >> I can change the version to `2.0.0rc1`, but I do not know how the
> >> checksum is calculated. The checksum is shorter than what I see on
> >> simply PyPI:
> >>
> >> https://files.pythonhosted.org/packages/79/43/5249be5ee741a93f3fa60823caf9a276cadc3103dae16d6e36cc534fefd8/jupyterlab_server-2.0.0rc1.tar.gz#sha256=733b149c5ab8e50ea5f2897c323047257060e7bf2dc0fa88663181427bec605d
> >>
> >> and base32 should only make it longer, not shorter.
> >>
> >> Can you explain how to switch a version manually and calculate the
> >> checksum to match another version?
> > For a tarball like the one at pythonhosted you'd download the file and
> > then run 'guix hash the-file'. If you're using a source code repository
> > then from the top level of the repo you'd run 'guix hash --exclude-vcs
> > --recursive .', or 'guix hash -rx .' for short. The hash layout that
> > Guix uses is the sha256 of the tarball base32 encoded, but with a change
> > in the letters used.
> >
> > For python packages you can specify a version number, so in this case
> > it'd be 'guix import pypi jupyterlab_server/2.0.0rc1'. Some other
> > importers us the '@' symbol to specify version number and I think some
> > don't support using other versions at all.
> >
> > I don't know how compatible different major versions of
> > jupyterlab-server are with each other, so I'd stick with 1.2.0 for now.
>
>
> This means however, that the check phase will fail, because of the
> failing tests in the jupyterlab_server repository on version 1.2.0.
>
> Unless there is a way to disable running those specific tests, I guess
> this means, that only getting the tests to pass in the jupyterlab_server
> repository will solve the problem?
>
I'd suggest starting with my suggestion from the other email, to try
using 'add-installed-pythonpath' to make sure the library is in the
PYTHONPATH. Perhaps that will help the tests pass.
> >> Regards,
> >> Zelphir
> >>
> >> On 10/19/20 8:19 PM, Zelphir Kaltstahl wrote:
> >>> Hello Efraim,
> >>>
> >>> Thanks for your patience! It seems with that I am getting quite far
> >>> (at least it feels like making progress, or even being close to have a
> >>> working environment), up to the "check phase". There some tests
> >>> failing in the "check phase". Here is what I am getting now,
> >>> regardless of whether I stick ("python-ipykernel" ,python-ipykernel)
> >>> in the native inputs or propagated inputs:
> >>>
> >>> ~~~~START~~~~
> >>> running install_egg_info
> >>> Copying jupyterlab_server.egg-info to /gnu/store/2h44ldpcqqd0q7hqpbcqdavcnbjsibfb-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server-1.2.0-py3.8.egg-info
> >>> running install_scripts
> >>> phase `install' succeeded after 0.3 seconds
> >>> starting phase `wrap'
> >>> find-files: /gnu/store/2h44ldpcqqd0q7hqpbcqdavcnbjsibfb-python-jupyterlab-server-1.2.0/bin: No such file or directory
> >>> find-files: /gnu/store/2h44ldpcqqd0q7hqpbcqdavcnbjsibfb-python-jupyterlab-server-1.2.0/sbin: No such file or directory
> >>> phase `wrap' succeeded after 0.0 seconds
> >>> starting phase `check'
> >>> running "python setup.py" with command "test" and parameters ()
> >>> running test
> >>> running egg_info
> >>> writing jupyterlab_server.egg-info/PKG-INFO
> >>> writing dependency_links to jupyterlab_server.egg-info/dependency_links.txt
> >>> writing requirements to jupyterlab_server.egg-info/requires.txt
> >>> writing top-level names to jupyterlab_server.egg-info/top_level.txt
> >>> reading manifest file 'jupyterlab_server.egg-info/SOURCES.txt'
> >>> reading manifest template 'MANIFEST.in'
> >>> warning: no previously-included files matching '*~' found anywhere in distribution
> >>> warning: no previously-included files matching '*.pyc' found anywhere in distribution
> >>> warning: no previously-included files matching '*.pyo' found anywhere in distribution
> >>> warning: no previously-included files matching '.git' found anywhere in distribution
> >>> warning: no previously-included files matching '.ipynb_checkpoints' found anywhere in distribution
> >>> writing manifest file 'jupyterlab_server.egg-info/SOURCES.txt'
> >>> running build_ext
> >>> test_get (jupyterlab_server.tests.test_settings_api.SettingsAPITest) ... ERROR
> >>> test_get_bad (jupyterlab_server.tests.test_settings_api.SettingsAPITest) ... ERROR
> >>> test_listing (jupyterlab_server.tests.test_settings_api.SettingsAPITest) ... ERROR
> >>> test_patch (jupyterlab_server.tests.test_settings_api.SettingsAPITest) ... ERROR
> >>> test_patch_bad_data (jupyterlab_server.tests.test_settings_api.SettingsAPITest) ... ERROR
> >>> test_patch_wrong_id (jupyterlab_server.tests.test_settings_api.SettingsAPITest) ... ERROR
> >>> test_bad_put (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest) ... ERROR
> >>> test_blank_put (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest) ... ERROR
> >>> test_delete (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest) ... ERROR
> >>> test_get (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest) ... ERROR
> >>> test_listing (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest) ... ERROR
> >>> test_put (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest) ... ERROR
> >>>
> >>> ======================================================================
> >>> ERROR: test_get (jupyterlab_server.tests.test_settings_api.SettingsAPITest)
> >>> ----------------------------------------------------------------------
> >>> Traceback (most recent call last):
> >>> File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_settings_api.py", line 31, in setUp
> >>> dst = os.path.join(self.lab_config.schemas_dir, '@jupyterlab')
> >>> AttributeError: 'SettingsAPITest' object has no attribute 'lab_config'
> >>>
> >>> ======================================================================
> >>> ERROR: test_get_bad (jupyterlab_server.tests.test_settings_api.SettingsAPITest)
> >>> ----------------------------------------------------------------------
> >>> Traceback (most recent call last):
> >>> File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_settings_api.py", line 31, in setUp
> >>> dst = os.path.join(self.lab_config.schemas_dir, '@jupyterlab')
> >>> AttributeError: 'SettingsAPITest' object has no attribute 'lab_config'
> >>>
> >>> ======================================================================
> >>> ERROR: test_listing (jupyterlab_server.tests.test_settings_api.SettingsAPITest)
> >>> ----------------------------------------------------------------------
> >>> Traceback (most recent call last):
> >>> File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_settings_api.py", line 31, in setUp
> >>> dst = os.path.join(self.lab_config.schemas_dir, '@jupyterlab')
> >>> AttributeError: 'SettingsAPITest' object has no attribute 'lab_config'
> >>>
> >>> ======================================================================
> >>> ERROR: test_patch (jupyterlab_server.tests.test_settings_api.SettingsAPITest)
> >>> ----------------------------------------------------------------------
> >>> Traceback (most recent call last):
> >>> File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_settings_api.py", line 31, in setUp
> >>> dst = os.path.join(self.lab_config.schemas_dir, '@jupyterlab')
> >>> AttributeError: 'SettingsAPITest' object has no attribute 'lab_config'
> >>>
> >>> ======================================================================
> >>> ERROR: test_patch_bad_data (jupyterlab_server.tests.test_settings_api.SettingsAPITest)
> >>> ----------------------------------------------------------------------
> >>> Traceback (most recent call last):
> >>> File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_settings_api.py", line 31, in setUp
> >>> dst = os.path.join(self.lab_config.schemas_dir, '@jupyterlab')
> >>> AttributeError: 'SettingsAPITest' object has no attribute 'lab_config'
> >>>
> >>> ======================================================================
> >>> ERROR: test_patch_wrong_id (jupyterlab_server.tests.test_settings_api.SettingsAPITest)
> >>> ----------------------------------------------------------------------
> >>> Traceback (most recent call last):
> >>> File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_settings_api.py", line 31, in setUp
> >>> dst = os.path.join(self.lab_config.schemas_dir, '@jupyterlab')
> >>> AttributeError: 'SettingsAPITest' object has no attribute 'lab_config'
> >>>
> >>> ======================================================================
> >>> ERROR: test_bad_put (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest)
> >>> ----------------------------------------------------------------------
> >>> Traceback (most recent call last):
> >>> File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_workspaces_api.py", line 34, in setUp
> >>> dst = os.path.join(self.lab_config.workspaces_dir, item)
> >>> AttributeError: 'WorkspacesAPITest' object has no attribute 'lab_config'
> >>>
> >>> ======================================================================
> >>> ERROR: test_blank_put (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest)
> >>> ----------------------------------------------------------------------
> >>> Traceback (most recent call last):
> >>> File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_workspaces_api.py", line 34, in setUp
> >>> dst = os.path.join(self.lab_config.workspaces_dir, item)
> >>> AttributeError: 'WorkspacesAPITest' object has no attribute 'lab_config'
> >>>
> >>> ======================================================================
> >>> ERROR: test_delete (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest)
> >>> ----------------------------------------------------------------------
> >>> Traceback (most recent call last):
> >>> File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_workspaces_api.py", line 34, in setUp
> >>> dst = os.path.join(self.lab_config.workspaces_dir, item)
> >>> AttributeError: 'WorkspacesAPITest' object has no attribute 'lab_config'
> >>>
> >>> ======================================================================
> >>> ERROR: test_get (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest)
> >>> ----------------------------------------------------------------------
> >>> Traceback (most recent call last):
> >>> File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_workspaces_api.py", line 34, in setUp
> >>> dst = os.path.join(self.lab_config.workspaces_dir, item)
> >>> AttributeError: 'WorkspacesAPITest' object has no attribute 'lab_config'
> >>>
> >>> ======================================================================
> >>> ERROR: test_listing (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest)
> >>> ----------------------------------------------------------------------
> >>> Traceback (most recent call last):
> >>> File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_workspaces_api.py", line 34, in setUp
> >>> dst = os.path.join(self.lab_config.workspaces_dir, item)
> >>> AttributeError: 'WorkspacesAPITest' object has no attribute 'lab_config'
> >>>
> >>> ======================================================================
> >>> ERROR: test_put (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest)
> >>> ----------------------------------------------------------------------
> >>> Traceback (most recent call last):
> >>> File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_workspaces_api.py", line 34, in setUp
> >>> dst = os.path.join(self.lab_config.workspaces_dir, item)
> >>> AttributeError: 'WorkspacesAPITest' object has no attribute 'lab_config'
> >>>
> >>> ----------------------------------------------------------------------
> >>> Ran 12 tests in 0.001s
> >>>
> >>> FAILED (errors=12)
> >>> Test failed: <unittest.runner.TextTestResult run=12 errors=12 failures=0>
> >>> error: Test failed: <unittest.runner.TextTestResult run=12 errors=12 failures=0>
> >>> command "python" "-c" "import setuptools, tokenize;__file__='setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\\r\\n', '\\n');f.close();exec(compile(code, __file__, 'exec'))" "test" failed with status 1
> >>> ~~~~~END~~~~~
> >>>
> >>> I have some thoughts about this:
> >>>
> >>> The Python error does not really tell me what is wrong. I don't know
> >>> why the `WorkspacesAPITest` does not have an attribute named `lab_config`.
> >>>
> >>> One can see, that those are all API tests. Since there were problems
> >>> in the previous step with network, perhaps it is a network thing here
> >>> as well? (Is network, even if localhost for testing, available in the
> >>> "check phase"?)
> >>>
> >>> It could also simply be, that some PyPI package has failing tests. I
> >>> don't know how one could then skip such tests.
> >>>
> >>> I guess I will summarize everything in the end and put it in a
> >>> repository as a kind of "guide", so that others can use it or learn
> >>> from the process.
> >>>
> >>> Regards,
> >>> Zelphir
> >>>
> >>> On 10/19/20 6:54 PM, Efraim Flashner wrote:
> >>>> It looks like you need to add python-ipykernel to native-inputs.
> >>>> Unless it's needed to run the program and not just for the test
> >>>> suite, in which case it should go in propagated-inputs. There's no
> >>>> network available in the build environment so it can't retrieve
> >>>> ipykernel while building.
> >>>>
> >>>>
> >>>> On October 19, 2020 2:31:53 PM UTC, Zelphir Kaltstahl
> >>>> <zelphirkaltstahl@posteo.de> wrote:
> >>>>
> >>>> Hello Efraim!
> >>>>
> >>>> Thank you! Your idea of replacing "-" with "_" seems to partially
> >>>> help:
> >>>>
> >>>> The package is downloaded and byte compiled. However, afterwards
> >>>> there is a problem, when it tries to copy the byte-compiled files
> >>>> in the "wrap phase" (comments inserted in some places):
> >>>>
> >>>> ~~~~START~~~~
> >>>> ### ... a lot of output before this ...
> >>>>
> >>>> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/__init__.py to __init__.cpython-38.pyc
> >>>> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/_version.py to _version.cpython-38.pyc
> >>>> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/app.py to app.cpython-38.pyc
> >>>> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/handlers.py to handlers.cpython-38.pyc
> >>>> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/listings_handler.py to listings_handler.cpython-38.pyc
> >>>> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/process.py to process.cpython-38.pyc
> >>>> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/process_app.py to process_app.cpython-38.pyc
> >>>> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/server.py to server.cpython-38.pyc
> >>>> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/servertest.py to servertest.cpython-38.pyc
> >>>> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/settings_handler.py to settings_handler.cpython-38.pyc
> >>>> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/themes_handler.py to themes_handler.cpython-38.pyc
> >>>> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/workspaces_handler.py to workspaces_handler.cpython-38.pyc
> >>>> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/tests/__init__.py to __init__.cpython-38.pyc
> >>>> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/tests/test_settings_api.py to test_settings_api.cpython-38.pyc
> >>>> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/tests/test_workspaces_api.py to test_workspaces_api.cpython-38.pyc
> >>>> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/tests/utils.py to utils.cpython-38.pyc
> >>>>
> >>>> ### ... seems byte-compiling went without problems, but not comes the problem ...
> >>>>
> >>>> running install_egg_info
> >>>> Copying jupyterlab_server.egg-info to /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server-1.2.0-py3.8.egg-info
> >>>> running install_scripts
> >>>> phase `install' succeeded after 0.3 seconds
> >>>> starting phase `wrap'
> >>>> find-files: /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/bin: No such file or directory
> >>>> find-files: /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/sbin: No such file or directory
> >>>> phase `wrap' succeeded after 0.0 seconds
> >>>> starting phase `check'
> >>>> running "python setup.py" with command "test" and parameters ()
> >>>> running test
> >>>> Searching for ipykernel
> >>>> Reading https://pypi.org/simple/ipykernel/
> >>>> Download error on https://pypi.org/simple/ipykernel/: [Errno -2] Name or service not known -- Some packages may not be found!
> >>>> Couldn't find index page for 'ipykernel' (maybe misspelled?)
> >>>> Scanning index of all packages (this may take a while)
> >>>> Reading https://pypi.org/simple/
> >>>> Download error on https://pypi.org/simple/: [Errno -2] Name or service not known -- Some packages may not be found!
> >>>> No local packages or working download links found for ipykernel
> >>>> error: Could not find suitable distribution for Requirement.parse('ipykernel')
> >>>> command "python" "-c" "import setuptools, tokenize;__file__='setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\\r\\n', '\\n');f.close();exec(compile(code, __file__, 'exec'))" "test" failed with status 1
> >>>> ~~~~~END~~~~~
> >>>>
> >>>> So it seems, that while the download URL is corrected, there is
> >>>> another place, where Guix has an error now, resulting in a final
> >>>> error shown in command line:
> >>>>
> >>>> ~~~~START~~~~
> >>>> $ guix time-machine --channels=channels.scm -- environment --manifest=manifest.scm --load=jupyterlab.scm
> >>>> Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.org/git/guix.git'...
> >>>> substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0%
> >>>> The following derivations will be built:
> >>>> /gnu/store/wzmfn9m45bmsbrx094rv3lf3w0rpmw49-python-pytest-check-links-0.3.0.drv
> >>>> /gnu/store/96xf5mrg134mcsp01b0m1qs1lxkb401a-python-jupyterlab-server-1.2.0.drv
> >>>> /gnu/store/32a28hd7aainwn0hfsnf3blh8prmfz61-jupyterlab_server-1.2.0.tar.gz.drv
> >>>>
> >>>> 3,9 MB will be downloaded
> >>>> downloading from https://ci.guix.gnu.org/nar/lzip/54kpl9psx16jwic4gpnjwh44kim04wlk-python-notebook-5.7.4 ...
> >>>> python-notebook-5.7.4 3.7MiB 5.1MiB/s 00:01 [##################] 100.0%
> >>>>
> >>>> building /gnu/store/32a28hd7aainwn0hfsnf3blh8prmfz61-jupyterlab_server-1.2.0.tar.gz.drv...
> >>>> downloading from https://files.pythonhosted.org/packages/source/j/jupyterlab_server/jupyterlab_server-1.2.0.tar.gz ...
> >>>> building /gnu/store/wzmfn9m45bmsbrx094rv3lf3w0rpmw49-python-pytest-check-links-0.3.0.drv...
> >>>> building /gnu/store/96xf5mrg134mcsp01b0m1qs1lxkb401a-python-jupyterlab-server-1.2.0.drv...
> >>>> \ 'check' phasebuilder for `/gnu/store/96xf5mrg134mcsp01b0m1qs1lxkb401a-python-jupyterlab-server-1.2.0.drv' failed with exit code 1
> >>>> build of /gnu/store/96xf5mrg134mcsp01b0m1qs1lxkb401a-python-jupyterlab-server-1.2.0.drv failed
> >>>> View build log at '/var/log/guix/drvs/96/xf5mrg134mcsp01b0m1qs1lxkb401a-python-jupyterlab-server-1.2.0.drv.bz2'.
> >>>> guix environment: error: build of `/gnu/store/96xf5mrg134mcsp01b0m1qs1lxkb401a-python-jupyterlab-server-1.2.0.drv' failed
> >>>> ~~~~~END~~~~~
> >>>>
> >>>> Apparently ipykernel is not found, but when I visit
> >>>> https://pypi.org/simple/ipykernel/, I see packages there.
> >>>>
> >>>> From the logs:
> >>>>
> >>>> ~~~~START~~~~
> >>>> Download error on https://pypi.org/simple/ipykernel/: [Errno -2] Name or service not known -- Some packages may not be found!
> >>>> Couldn't find index page for 'ipykernel' (maybe misspelled?)
> >>>> ~~~~~END~~~~~
> >>>>
> >>>> Do I need to add another input in my `jupyterlab.scm`? (How?) Or
> >>>> perhaps I need to create a separate `ipykernel.scm` which
> >>>> contains the output of `guix import pypi --recursive ipykernel`?
> >>>>
> >>>> However, it somehow seems to fail for PyPI simple in general
> >>>> (from the logs again):
> >>>>
> >>>> ~~~~START~~~~
> >>>> Reading https://pypi.org/simple/
> >>>> Download error on https://pypi.org/simple/: [Errno -2] Name or service not known -- Some packages may not be found!
> >>>> No local packages or working download links found for ipykernel
> >>>> error: Could not find suitable distribution for Requirement.parse('ipykernel')
> >>>> command "python" "-c" "import setuptools, tokenize;__file__='setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\\r\\n', '\\n');f.close();exec(compile(code, __file__, 'exec'))" "test" failed with status 1
> >>>> ~~~~~END~~~~~
> >>>>
> >>>> Thanks,
> >>>> Zelphir
> >>>>
> >>>>
> >>>> On 10/18/20 6:35 PM, Efraim Flashner wrote:
> >>>>> On Sun, Oct 18, 2020 at 01:55:49PM +0200, Zelphir Kaltstahl wrote:
> >>>>>> Hello Guix Users, hello Zimoun and Tobias!
> >>>>>>
> >>>>>> Thanks for your information regarding the importer syntax thing.
> >>>>>>
> >>>>>> I continued trying to get a jupyterlab environment today.
> >>>>>>
> >>>>>> Here is what I did so far:
> >>>>>>
> >>>>>> (1) Create my manifest file:
> >>>>>>
> >>>>>> ~~~~START~~~~
> >>>>>> (specifications->manifest
> >>>>>> '("python"))
> >>>>>> ~~~~~END~~~~~
> >>>>>>
> >>>>>> (2) Create my channels file:
> >>>>>>
> >>>>>> ~~~~START~~~~
> >>>>>> $ guix describe --format=channels > channels.scm
> >>>>>> $ cat channels.scm
> >>>>>> (list (channel
> >>>>>> (name 'guix)
> >>>>>> (url "https://git.savannah.gnu.org/git/guix.git")
> >>>>>> (commit
> >>>>>> "6ca673b30dac281ba27a8dac242c0ac83e5e354b")
> >>>>>> (introduction
> >>>>>> (make-channel-introduction
> >>>>>> "9edb3f66fd807b096b48283debdcddccfea34bad"
> >>>>>> (openpgp-fingerprint
> >>>>>> "BBB0 2DDF 2CEA F6A8 0D1D E643 A2A0 6DF2 A33A 54FA")))))
> >>>>>> ~~~~~END~~~~~
> >>>>>>
> >>>>>> (3) Create my jupyterlab PyPI import file, this time around using the
> >>>>>> "/" instead of "@" for specifying the version:
> >>>>>>
> >>>>>> ~~~~START~~~~
> >>>>>> $ guix import pypi --recursive jupyterlab/2.1.5 > jupyterlab.scm
> >>>>>> ~~~~~END~~~~~
> >>>>>>
> >>>>>> (4) Add missing import expressions and add output expression at the end:
> >>>>>>
> >>>>>> ~~~~START~~~~
> >>>>>> ;; add module imports
> >>>>>> (use-modules
> >>>>>> (guix packages)
> >>>>>> (guix download)
> >>>>>> (guix build-system python)
> >>>>>> ((guix licenses) #:prefix license:)
> >>>>>> ;; use `guix environment --ad-hoc python-jinja2 -- guix package -A python-jinja2` to find the location of python-jinja2, which is gnu/packages/python-xyz.scm
> >>>>> This can be just 'guix package -A python-jinja2', no need for the
> >>>>> environment.
> >>>>>
> >>>>>> (gnu packages python-xyz)
> >>>>>> ;; for python-tornado
> >>>>>> (gnu packages python-web)
> >>>>>> ;; for python-pytest
> >>>>>> (gnu packages check))
> >>>>>>
> >>>>>> ;; QUESTION: Why are those required packages not imported by guix automatically?
> >>>>>> ;; QUESTION: Why are the manually imported packages not actually in files with their own name, but instead jinja2 -> python-xyz, tornado -> python-web, and pytest -> check?
> >>>>>> ;; QUESTION: Is my process of finding the files in which the packages are correct or just working by chance?
> >>>>>>
> >>>>>> (define-public python-jupyterlab-server
> >>>>>> (package
> >>>>>> (name "python-jupyterlab-server")
> >>>>>> (version "1.2.0")
> >>>>>> (source
> >>>>>> (origin
> >>>>>> (method url-fetch)
> >>>>>> (uri (pypi-uri "jupyterlab-server" version))
> >>>>>> (sha256
> >>>>>> (base32
> >>>>>> "132xby7531rbrjg9bqvsx86birr1blynjxy8gi5kcnb6x7fxjcal"))))
> >>>>>> (build-system python-build-system)
> >>>>>> (propagated-inputs
> >>>>>> `(("python-jinja2" ,python-jinja2)
> >>>>>> ("python-json5" ,python-json5)
> >>>>>> ("python-jsonschema" ,python-jsonschema)
> >>>>>> ("python-notebook" ,python-notebook)
> >>>>>> ("python-requests" ,python-requests)))
> >>>>>> (native-inputs
> >>>>>> `(("python-pytest" ,python-pytest)
> >>>>>> ("python-requests" ,python-requests)))
> >>>>>> (home-page "https://jupyter.org")
> >>>>>> (synopsis "JupyterLab Server")
> >>>>>> (description "JupyterLab Server")
> >>>>>> (license license:bsd-3)))
> >>>>>>
> >>>>>> (define-public python-jupyterlab
> >>>>>> (package
> >>>>>> (name "python-jupyterlab")
> >>>>>> (version "2.1.5")
> >>>>>> (source
> >>>>>> (origin
> >>>>>> (method url-fetch)
> >>>>>> (uri (pypi-uri "jupyterlab" version))
> >>>>>> (sha256
> >>>>>> (base32
> >>>>>> "162jn51cg36fsn4l2zhnb5n4nbkhm9wlv974ggcnmdij3i4r4yya"))))
> >>>>>> (build-system python-build-system)
> >>>>>> (propagated-inputs
> >>>>>> `(("python-jinja2" ,python-jinja2)
> >>>>>> ("python-jupyterlab-server"
> >>>>>> ,python-jupyterlab-server)
> >>>>>> ("python-notebook" ,python-notebook)
> >>>>>> ("python-tornado" ,python-tornado)))
> >>>>>> (native-inputs
> >>>>>> `(("python-pytest" ,python-pytest)
> >>>>>> ("python-pytest-check-links"
> >>>>>> ,python-pytest-check-links)
> >>>>>> ("python-requests" ,python-requests)
> >>>>>> ("python-virtualenv" ,python-virtualenv)
> >>>>>> ("python-wheel" ,python-wheel)))
> >>>>>> (home-page "http://jupyter.org")
> >>>>>> (synopsis
> >>>>>> "The JupyterLab notebook server extension.")
> >>>>>> (description
> >>>>>> "The JupyterLab notebook server extension.")
> >>>>>> (license license:bsd-3)))
> >>>>>>
> >>>>>> python-jupyterlab
> >>>>>> ~~~~~END~~~~~
> >>>>>>
> >>>>>> And as noted in the comments, I have 3 questions at this point:
> >>>>>>
> >>>>>> (Q1) Why are those required packages not imported by guix automatically?
> >>>>>> (My guess: This functionality simply has not yet been implemented.)
> >>>>>>
> >>>>>> (Q2) Why are the manually imported packages not actually in files with
> >>>>>> their own name, but instead jinja2 -> python-xyt, tornado -> python-web,
> >>>>>> and pytest -> check? Why not (gnu packages python pytest) for example?
> >>>>>>
> >>>>>> (Q3) Is my process of finding the files in which the packages are
> >>>>>> correct or just working by chance? Basically I am creating temporary
> >>>>>> environments, in which I then lookup "where would the package be
> >>>>>> installed" and then exit the temporary environment to use that
> >>>>>> information in my imported package file's import expressions /
> >>>>>> use-modules expression. This seems to be a bit of a convoluted process,
> >>>>>> though worth it, if it always works in the end.
> >>>>>>
> >>>>>> (4) Now I run my time-machine command:
> >>>>>>
> >>>>>> ~~~~START~~~~
> >>>>>> $ guix time-machine --channels=channels.scm -- environment --manifest=manifest.scm --load=jupyterlab.scm
> >>>>>> ~~~~~END~~~~~
> >>>>>>
> >>>>>> This take a moment and then I get an error (the full output is longer,
> >>>>>> but when running it multiple times, already successful steps are not all
> >>>>>> done repeatedly, so the output is then reduced to what fails):
> >>>>>>
> >>>>>> ~~~~START~~~~
> >>>>>> $ guix time-machine --channels=channels.scm -- environment --manifest=manifest.scm --load=jupyterlab.scm
> >>>>>> Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.org/git/guix.git'...
> >>>>>> The following derivations will be built:
> >>>>>> /gnu/store/wzmfn9m45bmsbrx094rv3lf3w0rpmw49-python-pytest-check-links-0.3.0.drv
> >>>>>> /gnu/store/n9i421lrbwrr8d0947w5vma7rhy3iyba-python-jupyterlab-server-1.2.0.drv
> >>>>>> /gnu/store/s7jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv
> >>>>>>
> >>>>>> 4,2 MB will be downloaded
> >>>>>> downloading from https://ci.guix.gnu.org/nar/lzip/2nahbs5v8q073gjmy224gk0h5lsh1kkw-python-nbconvert-5.0.0b1 ...
> >>>>>> python-nbconvert-5.0.0b1 301KiB 2.0MiB/s 00:00 [##################] 100.0%
> >>>>>>
> >>>>>> building /gnu/store/s7jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv...
> >>>>>> |builder for `/gnu/store/s7jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv' failed to produce output path `/gnu/store/92md7gh966n4fzj6al267lqq4xjx0ncf-jupyterlab-server-1.2.0.tar.gz'
> >>>>>> build of /gnu/store/s7jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv failed
> >>>>>> View build log at '/var/log/guix/drvs/s7/jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv.bz2'.
> >>>>>> cannot build derivation `/gnu/store/n9i421lrbwrr8d0947w5vma7rhy3iyba-python-jupyterlab-server-1.2.0.drv': 1 dependencies couldn't be built
> >>>>>> killing process 7384
> >>>>>> guix environment: error: build of `/gnu/store/n9i421lrbwrr8d0947w5vma7rhy3iyba-python-jupyterlab-server-1.2.0.drv' failed
> >>>>>> ~~~~~END~~~~~
> >>>>>>
> >>>>>> OK, an error, perhaps I can understand it. Lets look at that log file:
> >>>>>>
> >>>>>> ~~~~START~~~~
> >>>>>> $ cp /var/log/guix/drvs/s7/jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv.bz2 .
> >>>>>> $ bzip2 --decompress jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv.bz2
> >>>>>> $ cat jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv
> >>>>>>
> >>>>>> Starting download of /gnu/store/92md7gh966n4fzj6al267lqq4xjx0ncf-jupyterlab-server-1.2.0.tar.gz
> >>>>>> From https://files.pythonhosted.org/packages/source/j/jupyterlab-server/jupyterlab-server-1.2.0.tar.gz...
> >>>>>> download failed "https://files.pythonhosted.org/packages/source/j/jupyterlab-server/jupyterlab-server-1.2.0.tar.gz" 404 "Not Found"
> >>>>>>
> >>>>>> Starting download of /gnu/store/92md7gh966n4fzj6al267lqq4xjx0ncf-jupyterlab-server-1.2.0.tar.gz
> >>>>>> From https://ci.guix.gnu.org/file/jupyterlab-server-1.2.0.tar.gz/sha256/132xby7531rbrjg9bqvsx86birr1blynjxy8gi5kcnb6x7fxjcal...
> >>>>>> download failed "https://ci.guix.gnu.org/file/jupyterlab-server-1.2.0.tar.gz/sha256/132xby7531rbrjg9bqvsx86birr1blynjxy8gi5kcnb6x7fxjcal" 404 "Not Found"
> >>>>>>
> >>>>>> Starting download of /gnu/store/92md7gh966n4fzj6al267lqq4xjx0ncf-jupyterlab-server-1.2.0.tar.gz
> >>>>>> From https://tarballs.nixos.org/sha256/132xby7531rbrjg9bqvsx86birr1blynjxy8gi5kcnb6x7fxjcal...
> >>>>>> download failed "https://tarballs.nixos.org/sha256/132xby7531rbrjg9bqvsx86birr1blynjxy8gi5kcnb6x7fxjcal" 404 "Not Found"
> >>>>>>
> >>>>>> Starting download of /gnu/store/92md7gh966n4fzj6al267lqq4xjx0ncf-jupyterlab-server-1.2.0.tar.gz
> >>>>>> From https://archive.softwareheritage.org/api/1/content/sha256:5431d9dde96659364b7cc877693d5d21e7b80cea7ae3959ecc2b87518e5f5d8c/raw/...
> >>>>>> download failed "https://archive.softwareheritage.org/api/1/content/sha256:5431d9dde96659364b7cc877693d5d21e7b80cea7ae3959ecc2b87518e5f5d8c/raw/" 404 "Not Found"
> >>>>>> failed to download "/gnu/store/92md7gh966n4fzj6al267lqq4xjx0ncf-jupyterlab-server-1.2.0.tar.gz" from "https://files.pythonhosted.org/packages/source/j/jupyterlab-server/jupyterlab-server-1.2.0.tar.gz"
> >>>>>> ~~~~~END~~~~~
> >>>>>>
> >>>>>> So it seems, that the jupyterlab-server file is simply not downloadable
> >>>>>> any longer!
> >>>>>>
> >>>>>> Trying using wget:
> >>>>>>
> >>>>>> ~~~~START~~~~
> >>>>>> $ wget https://files.pythonhosted.org/packages/source/j/jupyterlab-server/jupyterlab-server-1.2.0.tar.gz
> >>>>>> --2020-10-18 13:49:52-- https://files.pythonhosted.org/packages/source/j/jupyterlab-server/jupyterlab-server-1.2.0.tar.gz
> >>>>>> Resolving files.pythonhosted.org (files.pythonhosted.org)... 2a04:4e42:9::319, 151.101.37.63
> >>>>>> Connecting to files.pythonhosted.org (files.pythonhosted.org)|2a04:4e42:9::319|:443... failed: Connection refused.
> >>>>>> Connecting to files.pythonhosted.org (files.pythonhosted.org)|151.101.37.63|:443... connected.
> >>>>>> HTTP request sent, awaiting response... 404 Not Found
> >>>>>> 2020-10-18 13:49:53 ERROR 404: Not Found.
> >>>>>> ~~~~~END~~~~~
> >>>>>>
> >>>>>> So now I am out of ideas. It seems the file is not available any longer
> >>>>>> and the definition of jupyterlab needs to be updated somewhere, so that
> >>>>>> it does not try to download an old or non-existent version of
> >>>>>> jupyter-labserver. But how is this usually done? Can I specify it
> >>>>>> somewhere in one of the 3 files I have, or am I dependent on someone
> >>>>>> fixing the jupyterlab-server dependency / input for juypterlab?
> >>>>>>
> >>>>>> Thanks for your help so far! Tell me, if I need to provide any more
> >>>>>> information to solve the problem.
> >>>>> Try chaning the URL line to (uri (pypi-uri "jupyterlab_server" version)),
> >>>>> with an underscore (_). I don't have any special suggestions for knowing
> >>>>> that it should be an underscore instead of a dash. The best I have is
> >>>>> the output from 'guix import pypi jupyterlab-server:
> >>>>>
> >>>>> (ins)efraim@E5400 ~$ guix import pypi jupyterlab-server
> >>>>>
> >>>>> Starting download of /tmp/guix-file.ayJ41F
> >>>>> From https://files.pythonhosted.org/packages/92/54/5f321ca4cebfb644ac59eb21601b46a2ff9831ffe1b4e5a588f2a7e98d48/jupyterlab_server-1.2.0.tar.gz...
> >>>>> …er-1.2.0.tar.gz 22KiB 57KiB/s 00:00 [##################] 100.0%
> >>>>>
> >>>>>
> >>>>>
> >>>>>> Best regards,
> >>>>>> Zelphir
> >>>>>>
> >>>>>>
> >>>>>> On 10/16/20 2:25 PM, Tobias Geerinckx-Rice wrote:
> >>>>>>> Zelphir,
> >>>>>>>
> >>>>>>> Zelphir Kaltstahl 写道:
> >>>>>>>> $ guix import pypi 'jupyterlab@2.1.5' --recursive
> >>>>>>> It will work if you substitute ‘/’ for ‘@’. Yes, this is a happy
> >>>>>>> accident specific to the PyPI importer, and I'm sure you can guess why
> >>>>>>> it happens to work.
> >>>>>>>
> >>>>>>>>> guix import hackage mtl@2.1.3.1
> >>>>>>>> But that is in the "hackage" import section. Is the same not available
> >>>>>>>> for PyPI?
> >>>>>>> [...]
> >>>>>>>
> >>>>>>>> Do the various importers work differently?
> >>>>>>> Unfortunately so. It would be great(TM) if PACKAGE[@VERSION] were
> >>>>>>> standard. Each importer could handle it properly (e.g., by turning it
> >>>>>>> into "/") or return a friendlier ‘the foo importer does not yet
> >>>>>>> support versions’ error.
> >>>>>>>
> >>>>>>> I don't have the time, but this sounds like a good intermediate-level
> >>>>>>> hack for someone who does :-)
> >>>>>>>
> >>>>>>> Kind regards,
> >>>>>>>
> >>>>>>> T G-R
> >>>>>> --
> >>>>>> repositories: https://notabug.org/ZelphirKaltstahl
> >>>> --
> >>>> repositories: https://notabug.org/ZelphirKaltstahl
> >>>> --
> >>>> Sent from my Android device with K-9 Mail. Please excuse my brevity.
> >>> --
> >>> repositories: https://notabug.org/ZelphirKaltstahl
> >> --
> >> repositories: https://notabug.org/ZelphirKaltstahl
> Regards,
> Zelphir
>
> --
> repositories: https://notabug.org/ZelphirKaltstahl
>
>
--
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 --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: guix import error + New: setting up a jupyterlab environment
2020-10-25 8:52 ` Efraim Flashner
@ 2020-10-25 11:49 ` Zelphir Kaltstahl
0 siblings, 0 replies; 15+ messages in thread
From: Zelphir Kaltstahl @ 2020-10-25 11:49 UTC (permalink / raw)
To: Efraim Flashner; +Cc: help-guix
Hi Efraim!
On 10/25/20 9:52 AM, Efraim Flashner wrote:
> On Sat, Oct 24, 2020 at 09:42:13PM +0200, Zelphir Kaltstahl wrote:
>> Hello Efraim!
>>
>> On 10/21/20 9:18 AM, Efraim Flashner wrote:
>>> On Mon, Oct 19, 2020 at 11:12:35PM +0200, Zelphir Kaltstahl wrote:
>>>> Meanwhile I have managed to run the jupyterlab-server tests, as
>>>> described in more details here:
>>>> https://github.com/jupyterlab/jupyterlab_server/issues/128
>>>>
>>>> Indeed, in version 1.2.0 the tests fail the same way they fail when I
>>>> try to create my environment. This means the next thing to fix would
>>>> probably be to use another version of jupyterlab-server. 1.2.0 is a tag
>>>> in the jupyterlab-server repository, which _seems_ to be the latest
>>>> "stable" version, before a lot of alpha, beta, and release-candidate
>>>> versions follow.
>>>>
>>>> I guess I could switch the commit in my `jupyterlab.scm` file to point
>>>> to a different one?
>>>>
>>>> I can change the version to `2.0.0rc1`, but I do not know how the
>>>> checksum is calculated. The checksum is shorter than what I see on
>>>> simply PyPI:
>>>>
>>>> https://files.pythonhosted.org/packages/79/43/5249be5ee741a93f3fa60823caf9a276cadc3103dae16d6e36cc534fefd8/jupyterlab_server-2.0.0rc1.tar.gz#sha256=733b149c5ab8e50ea5f2897c323047257060e7bf2dc0fa88663181427bec605d
>>>>
>>>> and base32 should only make it longer, not shorter.
>>>>
>>>> Can you explain how to switch a version manually and calculate the
>>>> checksum to match another version?
>>> For a tarball like the one at pythonhosted you'd download the file and
>>> then run 'guix hash the-file'. If you're using a source code repository
>>> then from the top level of the repo you'd run 'guix hash --exclude-vcs
>>> --recursive .', or 'guix hash -rx .' for short. The hash layout that
>>> Guix uses is the sha256 of the tarball base32 encoded, but with a change
>>> in the letters used.
>>>
>>> For python packages you can specify a version number, so in this case
>>> it'd be 'guix import pypi jupyterlab_server/2.0.0rc1'. Some other
>>> importers us the '@' symbol to specify version number and I think some
>>> don't support using other versions at all.
>>>
>>> I don't know how compatible different major versions of
>>> jupyterlab-server are with each other, so I'd stick with 1.2.0 for now.
>>
>> This means however, that the check phase will fail, because of the
>> failing tests in the jupyterlab_server repository on version 1.2.0.
>>
>> Unless there is a way to disable running those specific tests, I guess
>> this means, that only getting the tests to pass in the jupyterlab_server
>> repository will solve the problem?
>>
> I'd suggest starting with my suggestion from the other email, to try
> using 'add-installed-pythonpath' to make sure the library is in the
> PYTHONPATH. Perhaps that will help the tests pass.
The thing is, that I already tried to run the tests within the
jupyterlab_server repository and they do not pass there either. They are
simply failing currently / jupyterlab_server stable is not in a clean
state. At first I had to figure out how to get a test environment set
up, but I solved that one:
https://github.com/jupyterlab/jupyterlab_server/pull/129. I think there
is nothing on the Guix side to make them magically pass, when they even
fail in the original repository / code.
Where do you grep for add-installed-pythonpath in other packages? I have
looked here
https://git.savannah.gnu.org/cgit/guix.git/tree/guix/packages.scm, but
that seems to be the package implementation of Guix itself, not the
packages it offers. Ah, I think I found it:
https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages. Thanks!^^
It was clear from the `guix package -A <package>` command.
>>>> Regards,
>>>> Zelphir
>>>>
>>>> On 10/19/20 8:19 PM, Zelphir Kaltstahl wrote:
>>>>> Hello Efraim,
>>>>>
>>>>> Thanks for your patience! It seems with that I am getting quite far
>>>>> (at least it feels like making progress, or even being close to have a
>>>>> working environment), up to the "check phase". There some tests
>>>>> failing in the "check phase". Here is what I am getting now,
>>>>> regardless of whether I stick ("python-ipykernel" ,python-ipykernel)
>>>>> in the native inputs or propagated inputs:
>>>>>
>>>>> ~~~~START~~~~
>>>>> running install_egg_info
>>>>> Copying jupyterlab_server.egg-info to /gnu/store/2h44ldpcqqd0q7hqpbcqdavcnbjsibfb-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server-1.2.0-py3.8.egg-info
>>>>> running install_scripts
>>>>> phase `install' succeeded after 0.3 seconds
>>>>> starting phase `wrap'
>>>>> find-files: /gnu/store/2h44ldpcqqd0q7hqpbcqdavcnbjsibfb-python-jupyterlab-server-1.2.0/bin: No such file or directory
>>>>> find-files: /gnu/store/2h44ldpcqqd0q7hqpbcqdavcnbjsibfb-python-jupyterlab-server-1.2.0/sbin: No such file or directory
>>>>> phase `wrap' succeeded after 0.0 seconds
>>>>> starting phase `check'
>>>>> running "python setup.py" with command "test" and parameters ()
>>>>> running test
>>>>> running egg_info
>>>>> writing jupyterlab_server.egg-info/PKG-INFO
>>>>> writing dependency_links to jupyterlab_server.egg-info/dependency_links.txt
>>>>> writing requirements to jupyterlab_server.egg-info/requires.txt
>>>>> writing top-level names to jupyterlab_server.egg-info/top_level.txt
>>>>> reading manifest file 'jupyterlab_server.egg-info/SOURCES.txt'
>>>>> reading manifest template 'MANIFEST.in'
>>>>> warning: no previously-included files matching '*~' found anywhere in distribution
>>>>> warning: no previously-included files matching '*.pyc' found anywhere in distribution
>>>>> warning: no previously-included files matching '*.pyo' found anywhere in distribution
>>>>> warning: no previously-included files matching '.git' found anywhere in distribution
>>>>> warning: no previously-included files matching '.ipynb_checkpoints' found anywhere in distribution
>>>>> writing manifest file 'jupyterlab_server.egg-info/SOURCES.txt'
>>>>> running build_ext
>>>>> test_get (jupyterlab_server.tests.test_settings_api.SettingsAPITest) ... ERROR
>>>>> test_get_bad (jupyterlab_server.tests.test_settings_api.SettingsAPITest) ... ERROR
>>>>> test_listing (jupyterlab_server.tests.test_settings_api.SettingsAPITest) ... ERROR
>>>>> test_patch (jupyterlab_server.tests.test_settings_api.SettingsAPITest) ... ERROR
>>>>> test_patch_bad_data (jupyterlab_server.tests.test_settings_api.SettingsAPITest) ... ERROR
>>>>> test_patch_wrong_id (jupyterlab_server.tests.test_settings_api.SettingsAPITest) ... ERROR
>>>>> test_bad_put (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest) ... ERROR
>>>>> test_blank_put (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest) ... ERROR
>>>>> test_delete (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest) ... ERROR
>>>>> test_get (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest) ... ERROR
>>>>> test_listing (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest) ... ERROR
>>>>> test_put (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest) ... ERROR
>>>>>
>>>>> ======================================================================
>>>>> ERROR: test_get (jupyterlab_server.tests.test_settings_api.SettingsAPITest)
>>>>> ----------------------------------------------------------------------
>>>>> Traceback (most recent call last):
>>>>> File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_settings_api.py", line 31, in setUp
>>>>> dst = os.path.join(self.lab_config.schemas_dir, '@jupyterlab')
>>>>> AttributeError: 'SettingsAPITest' object has no attribute 'lab_config'
>>>>>
>>>>> ======================================================================
>>>>> ERROR: test_get_bad (jupyterlab_server.tests.test_settings_api.SettingsAPITest)
>>>>> ----------------------------------------------------------------------
>>>>> Traceback (most recent call last):
>>>>> File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_settings_api.py", line 31, in setUp
>>>>> dst = os.path.join(self.lab_config.schemas_dir, '@jupyterlab')
>>>>> AttributeError: 'SettingsAPITest' object has no attribute 'lab_config'
>>>>>
>>>>> ======================================================================
>>>>> ERROR: test_listing (jupyterlab_server.tests.test_settings_api.SettingsAPITest)
>>>>> ----------------------------------------------------------------------
>>>>> Traceback (most recent call last):
>>>>> File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_settings_api.py", line 31, in setUp
>>>>> dst = os.path.join(self.lab_config.schemas_dir, '@jupyterlab')
>>>>> AttributeError: 'SettingsAPITest' object has no attribute 'lab_config'
>>>>>
>>>>> ======================================================================
>>>>> ERROR: test_patch (jupyterlab_server.tests.test_settings_api.SettingsAPITest)
>>>>> ----------------------------------------------------------------------
>>>>> Traceback (most recent call last):
>>>>> File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_settings_api.py", line 31, in setUp
>>>>> dst = os.path.join(self.lab_config.schemas_dir, '@jupyterlab')
>>>>> AttributeError: 'SettingsAPITest' object has no attribute 'lab_config'
>>>>>
>>>>> ======================================================================
>>>>> ERROR: test_patch_bad_data (jupyterlab_server.tests.test_settings_api.SettingsAPITest)
>>>>> ----------------------------------------------------------------------
>>>>> Traceback (most recent call last):
>>>>> File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_settings_api.py", line 31, in setUp
>>>>> dst = os.path.join(self.lab_config.schemas_dir, '@jupyterlab')
>>>>> AttributeError: 'SettingsAPITest' object has no attribute 'lab_config'
>>>>>
>>>>> ======================================================================
>>>>> ERROR: test_patch_wrong_id (jupyterlab_server.tests.test_settings_api.SettingsAPITest)
>>>>> ----------------------------------------------------------------------
>>>>> Traceback (most recent call last):
>>>>> File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_settings_api.py", line 31, in setUp
>>>>> dst = os.path.join(self.lab_config.schemas_dir, '@jupyterlab')
>>>>> AttributeError: 'SettingsAPITest' object has no attribute 'lab_config'
>>>>>
>>>>> ======================================================================
>>>>> ERROR: test_bad_put (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest)
>>>>> ----------------------------------------------------------------------
>>>>> Traceback (most recent call last):
>>>>> File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_workspaces_api.py", line 34, in setUp
>>>>> dst = os.path.join(self.lab_config.workspaces_dir, item)
>>>>> AttributeError: 'WorkspacesAPITest' object has no attribute 'lab_config'
>>>>>
>>>>> ======================================================================
>>>>> ERROR: test_blank_put (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest)
>>>>> ----------------------------------------------------------------------
>>>>> Traceback (most recent call last):
>>>>> File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_workspaces_api.py", line 34, in setUp
>>>>> dst = os.path.join(self.lab_config.workspaces_dir, item)
>>>>> AttributeError: 'WorkspacesAPITest' object has no attribute 'lab_config'
>>>>>
>>>>> ======================================================================
>>>>> ERROR: test_delete (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest)
>>>>> ----------------------------------------------------------------------
>>>>> Traceback (most recent call last):
>>>>> File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_workspaces_api.py", line 34, in setUp
>>>>> dst = os.path.join(self.lab_config.workspaces_dir, item)
>>>>> AttributeError: 'WorkspacesAPITest' object has no attribute 'lab_config'
>>>>>
>>>>> ======================================================================
>>>>> ERROR: test_get (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest)
>>>>> ----------------------------------------------------------------------
>>>>> Traceback (most recent call last):
>>>>> File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_workspaces_api.py", line 34, in setUp
>>>>> dst = os.path.join(self.lab_config.workspaces_dir, item)
>>>>> AttributeError: 'WorkspacesAPITest' object has no attribute 'lab_config'
>>>>>
>>>>> ======================================================================
>>>>> ERROR: test_listing (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest)
>>>>> ----------------------------------------------------------------------
>>>>> Traceback (most recent call last):
>>>>> File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_workspaces_api.py", line 34, in setUp
>>>>> dst = os.path.join(self.lab_config.workspaces_dir, item)
>>>>> AttributeError: 'WorkspacesAPITest' object has no attribute 'lab_config'
>>>>>
>>>>> ======================================================================
>>>>> ERROR: test_put (jupyterlab_server.tests.test_workspaces_api.WorkspacesAPITest)
>>>>> ----------------------------------------------------------------------
>>>>> Traceback (most recent call last):
>>>>> File "/tmp/guix-build-python-jupyterlab-server-1.2.0.drv-0/jupyterlab_server-1.2.0/jupyterlab_server/tests/test_workspaces_api.py", line 34, in setUp
>>>>> dst = os.path.join(self.lab_config.workspaces_dir, item)
>>>>> AttributeError: 'WorkspacesAPITest' object has no attribute 'lab_config'
>>>>>
>>>>> ----------------------------------------------------------------------
>>>>> Ran 12 tests in 0.001s
>>>>>
>>>>> FAILED (errors=12)
>>>>> Test failed: <unittest.runner.TextTestResult run=12 errors=12 failures=0>
>>>>> error: Test failed: <unittest.runner.TextTestResult run=12 errors=12 failures=0>
>>>>> command "python" "-c" "import setuptools, tokenize;__file__='setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\\r\\n', '\\n');f.close();exec(compile(code, __file__, 'exec'))" "test" failed with status 1
>>>>> ~~~~~END~~~~~
>>>>>
>>>>> I have some thoughts about this:
>>>>>
>>>>> The Python error does not really tell me what is wrong. I don't know
>>>>> why the `WorkspacesAPITest` does not have an attribute named `lab_config`.
>>>>>
>>>>> One can see, that those are all API tests. Since there were problems
>>>>> in the previous step with network, perhaps it is a network thing here
>>>>> as well? (Is network, even if localhost for testing, available in the
>>>>> "check phase"?)
>>>>>
>>>>> It could also simply be, that some PyPI package has failing tests. I
>>>>> don't know how one could then skip such tests.
>>>>>
>>>>> I guess I will summarize everything in the end and put it in a
>>>>> repository as a kind of "guide", so that others can use it or learn
>>>>> from the process.
>>>>>
>>>>> Regards,
>>>>> Zelphir
>>>>>
>>>>> On 10/19/20 6:54 PM, Efraim Flashner wrote:
>>>>>> It looks like you need to add python-ipykernel to native-inputs.
>>>>>> Unless it's needed to run the program and not just for the test
>>>>>> suite, in which case it should go in propagated-inputs. There's no
>>>>>> network available in the build environment so it can't retrieve
>>>>>> ipykernel while building.
>>>>>>
>>>>>>
>>>>>> On October 19, 2020 2:31:53 PM UTC, Zelphir Kaltstahl
>>>>>> <zelphirkaltstahl@posteo.de> wrote:
>>>>>>
>>>>>> Hello Efraim!
>>>>>>
>>>>>> Thank you! Your idea of replacing "-" with "_" seems to partially
>>>>>> help:
>>>>>>
>>>>>> The package is downloaded and byte compiled. However, afterwards
>>>>>> there is a problem, when it tries to copy the byte-compiled files
>>>>>> in the "wrap phase" (comments inserted in some places):
>>>>>>
>>>>>> ~~~~START~~~~
>>>>>> ### ... a lot of output before this ...
>>>>>>
>>>>>> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/__init__.py to __init__.cpython-38.pyc
>>>>>> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/_version.py to _version.cpython-38.pyc
>>>>>> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/app.py to app.cpython-38.pyc
>>>>>> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/handlers.py to handlers.cpython-38.pyc
>>>>>> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/listings_handler.py to listings_handler.cpython-38.pyc
>>>>>> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/process.py to process.cpython-38.pyc
>>>>>> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/process_app.py to process_app.cpython-38.pyc
>>>>>> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/server.py to server.cpython-38.pyc
>>>>>> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/servertest.py to servertest.cpython-38.pyc
>>>>>> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/settings_handler.py to settings_handler.cpython-38.pyc
>>>>>> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/themes_handler.py to themes_handler.cpython-38.pyc
>>>>>> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/workspaces_handler.py to workspaces_handler.cpython-38.pyc
>>>>>> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/tests/__init__.py to __init__.cpython-38.pyc
>>>>>> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/tests/test_settings_api.py to test_settings_api.cpython-38.pyc
>>>>>> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/tests/test_workspaces_api.py to test_workspaces_api.cpython-38.pyc
>>>>>> byte-compiling /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server/tests/utils.py to utils.cpython-38.pyc
>>>>>>
>>>>>> ### ... seems byte-compiling went without problems, but not comes the problem ...
>>>>>>
>>>>>> running install_egg_info
>>>>>> Copying jupyterlab_server.egg-info to /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/lib/python3.8/site-packages/jupyterlab_server-1.2.0-py3.8.egg-info
>>>>>> running install_scripts
>>>>>> phase `install' succeeded after 0.3 seconds
>>>>>> starting phase `wrap'
>>>>>> find-files: /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/bin: No such file or directory
>>>>>> find-files: /gnu/store/yr7q21bws1xgx3p2dy9cfdiknjpsajm6-python-jupyterlab-server-1.2.0/sbin: No such file or directory
>>>>>> phase `wrap' succeeded after 0.0 seconds
>>>>>> starting phase `check'
>>>>>> running "python setup.py" with command "test" and parameters ()
>>>>>> running test
>>>>>> Searching for ipykernel
>>>>>> Reading https://pypi.org/simple/ipykernel/
>>>>>> Download error on https://pypi.org/simple/ipykernel/: [Errno -2] Name or service not known -- Some packages may not be found!
>>>>>> Couldn't find index page for 'ipykernel' (maybe misspelled?)
>>>>>> Scanning index of all packages (this may take a while)
>>>>>> Reading https://pypi.org/simple/
>>>>>> Download error on https://pypi.org/simple/: [Errno -2] Name or service not known -- Some packages may not be found!
>>>>>> No local packages or working download links found for ipykernel
>>>>>> error: Could not find suitable distribution for Requirement.parse('ipykernel')
>>>>>> command "python" "-c" "import setuptools, tokenize;__file__='setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\\r\\n', '\\n');f.close();exec(compile(code, __file__, 'exec'))" "test" failed with status 1
>>>>>> ~~~~~END~~~~~
>>>>>>
>>>>>> So it seems, that while the download URL is corrected, there is
>>>>>> another place, where Guix has an error now, resulting in a final
>>>>>> error shown in command line:
>>>>>>
>>>>>> ~~~~START~~~~
>>>>>> $ guix time-machine --channels=channels.scm -- environment --manifest=manifest.scm --load=jupyterlab.scm
>>>>>> Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.org/git/guix.git'...
>>>>>> substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0%
>>>>>> The following derivations will be built:
>>>>>> /gnu/store/wzmfn9m45bmsbrx094rv3lf3w0rpmw49-python-pytest-check-links-0.3.0.drv
>>>>>> /gnu/store/96xf5mrg134mcsp01b0m1qs1lxkb401a-python-jupyterlab-server-1.2.0.drv
>>>>>> /gnu/store/32a28hd7aainwn0hfsnf3blh8prmfz61-jupyterlab_server-1.2.0.tar.gz.drv
>>>>>>
>>>>>> 3,9 MB will be downloaded
>>>>>> downloading from https://ci.guix.gnu.org/nar/lzip/54kpl9psx16jwic4gpnjwh44kim04wlk-python-notebook-5.7.4 ...
>>>>>> python-notebook-5.7.4 3.7MiB 5.1MiB/s 00:01 [##################] 100.0%
>>>>>>
>>>>>> building /gnu/store/32a28hd7aainwn0hfsnf3blh8prmfz61-jupyterlab_server-1.2.0.tar.gz.drv...
>>>>>> downloading from https://files.pythonhosted.org/packages/source/j/jupyterlab_server/jupyterlab_server-1.2.0.tar.gz ...
>>>>>> building /gnu/store/wzmfn9m45bmsbrx094rv3lf3w0rpmw49-python-pytest-check-links-0.3.0.drv...
>>>>>> building /gnu/store/96xf5mrg134mcsp01b0m1qs1lxkb401a-python-jupyterlab-server-1.2.0.drv...
>>>>>> \ 'check' phasebuilder for `/gnu/store/96xf5mrg134mcsp01b0m1qs1lxkb401a-python-jupyterlab-server-1.2.0.drv' failed with exit code 1
>>>>>> build of /gnu/store/96xf5mrg134mcsp01b0m1qs1lxkb401a-python-jupyterlab-server-1.2.0.drv failed
>>>>>> View build log at '/var/log/guix/drvs/96/xf5mrg134mcsp01b0m1qs1lxkb401a-python-jupyterlab-server-1.2.0.drv.bz2'.
>>>>>> guix environment: error: build of `/gnu/store/96xf5mrg134mcsp01b0m1qs1lxkb401a-python-jupyterlab-server-1.2.0.drv' failed
>>>>>> ~~~~~END~~~~~
>>>>>>
>>>>>> Apparently ipykernel is not found, but when I visit
>>>>>> https://pypi.org/simple/ipykernel/, I see packages there.
>>>>>>
>>>>>> From the logs:
>>>>>>
>>>>>> ~~~~START~~~~
>>>>>> Download error on https://pypi.org/simple/ipykernel/: [Errno -2] Name or service not known -- Some packages may not be found!
>>>>>> Couldn't find index page for 'ipykernel' (maybe misspelled?)
>>>>>> ~~~~~END~~~~~
>>>>>>
>>>>>> Do I need to add another input in my `jupyterlab.scm`? (How?) Or
>>>>>> perhaps I need to create a separate `ipykernel.scm` which
>>>>>> contains the output of `guix import pypi --recursive ipykernel`?
>>>>>>
>>>>>> However, it somehow seems to fail for PyPI simple in general
>>>>>> (from the logs again):
>>>>>>
>>>>>> ~~~~START~~~~
>>>>>> Reading https://pypi.org/simple/
>>>>>> Download error on https://pypi.org/simple/: [Errno -2] Name or service not known -- Some packages may not be found!
>>>>>> No local packages or working download links found for ipykernel
>>>>>> error: Could not find suitable distribution for Requirement.parse('ipykernel')
>>>>>> command "python" "-c" "import setuptools, tokenize;__file__='setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\\r\\n', '\\n');f.close();exec(compile(code, __file__, 'exec'))" "test" failed with status 1
>>>>>> ~~~~~END~~~~~
>>>>>>
>>>>>> Thanks,
>>>>>> Zelphir
>>>>>>
>>>>>>
>>>>>> On 10/18/20 6:35 PM, Efraim Flashner wrote:
>>>>>>> On Sun, Oct 18, 2020 at 01:55:49PM +0200, Zelphir Kaltstahl wrote:
>>>>>>>> Hello Guix Users, hello Zimoun and Tobias!
>>>>>>>>
>>>>>>>> Thanks for your information regarding the importer syntax thing.
>>>>>>>>
>>>>>>>> I continued trying to get a jupyterlab environment today.
>>>>>>>>
>>>>>>>> Here is what I did so far:
>>>>>>>>
>>>>>>>> (1) Create my manifest file:
>>>>>>>>
>>>>>>>> ~~~~START~~~~
>>>>>>>> (specifications->manifest
>>>>>>>> '("python"))
>>>>>>>> ~~~~~END~~~~~
>>>>>>>>
>>>>>>>> (2) Create my channels file:
>>>>>>>>
>>>>>>>> ~~~~START~~~~
>>>>>>>> $ guix describe --format=channels > channels.scm
>>>>>>>> $ cat channels.scm
>>>>>>>> (list (channel
>>>>>>>> (name 'guix)
>>>>>>>> (url "https://git.savannah.gnu.org/git/guix.git")
>>>>>>>> (commit
>>>>>>>> "6ca673b30dac281ba27a8dac242c0ac83e5e354b")
>>>>>>>> (introduction
>>>>>>>> (make-channel-introduction
>>>>>>>> "9edb3f66fd807b096b48283debdcddccfea34bad"
>>>>>>>> (openpgp-fingerprint
>>>>>>>> "BBB0 2DDF 2CEA F6A8 0D1D E643 A2A0 6DF2 A33A 54FA")))))
>>>>>>>> ~~~~~END~~~~~
>>>>>>>>
>>>>>>>> (3) Create my jupyterlab PyPI import file, this time around using the
>>>>>>>> "/" instead of "@" for specifying the version:
>>>>>>>>
>>>>>>>> ~~~~START~~~~
>>>>>>>> $ guix import pypi --recursive jupyterlab/2.1.5 > jupyterlab.scm
>>>>>>>> ~~~~~END~~~~~
>>>>>>>>
>>>>>>>> (4) Add missing import expressions and add output expression at the end:
>>>>>>>>
>>>>>>>> ~~~~START~~~~
>>>>>>>> ;; add module imports
>>>>>>>> (use-modules
>>>>>>>> (guix packages)
>>>>>>>> (guix download)
>>>>>>>> (guix build-system python)
>>>>>>>> ((guix licenses) #:prefix license:)
>>>>>>>> ;; use `guix environment --ad-hoc python-jinja2 -- guix package -A python-jinja2` to find the location of python-jinja2, which is gnu/packages/python-xyz.scm
>>>>>>> This can be just 'guix package -A python-jinja2', no need for the
>>>>>>> environment.
>>>>>>>
>>>>>>>> (gnu packages python-xyz)
>>>>>>>> ;; for python-tornado
>>>>>>>> (gnu packages python-web)
>>>>>>>> ;; for python-pytest
>>>>>>>> (gnu packages check))
>>>>>>>>
>>>>>>>> ;; QUESTION: Why are those required packages not imported by guix automatically?
>>>>>>>> ;; QUESTION: Why are the manually imported packages not actually in files with their own name, but instead jinja2 -> python-xyz, tornado -> python-web, and pytest -> check?
>>>>>>>> ;; QUESTION: Is my process of finding the files in which the packages are correct or just working by chance?
>>>>>>>>
>>>>>>>> (define-public python-jupyterlab-server
>>>>>>>> (package
>>>>>>>> (name "python-jupyterlab-server")
>>>>>>>> (version "1.2.0")
>>>>>>>> (source
>>>>>>>> (origin
>>>>>>>> (method url-fetch)
>>>>>>>> (uri (pypi-uri "jupyterlab-server" version))
>>>>>>>> (sha256
>>>>>>>> (base32
>>>>>>>> "132xby7531rbrjg9bqvsx86birr1blynjxy8gi5kcnb6x7fxjcal"))))
>>>>>>>> (build-system python-build-system)
>>>>>>>> (propagated-inputs
>>>>>>>> `(("python-jinja2" ,python-jinja2)
>>>>>>>> ("python-json5" ,python-json5)
>>>>>>>> ("python-jsonschema" ,python-jsonschema)
>>>>>>>> ("python-notebook" ,python-notebook)
>>>>>>>> ("python-requests" ,python-requests)))
>>>>>>>> (native-inputs
>>>>>>>> `(("python-pytest" ,python-pytest)
>>>>>>>> ("python-requests" ,python-requests)))
>>>>>>>> (home-page "https://jupyter.org")
>>>>>>>> (synopsis "JupyterLab Server")
>>>>>>>> (description "JupyterLab Server")
>>>>>>>> (license license:bsd-3)))
>>>>>>>>
>>>>>>>> (define-public python-jupyterlab
>>>>>>>> (package
>>>>>>>> (name "python-jupyterlab")
>>>>>>>> (version "2.1.5")
>>>>>>>> (source
>>>>>>>> (origin
>>>>>>>> (method url-fetch)
>>>>>>>> (uri (pypi-uri "jupyterlab" version))
>>>>>>>> (sha256
>>>>>>>> (base32
>>>>>>>> "162jn51cg36fsn4l2zhnb5n4nbkhm9wlv974ggcnmdij3i4r4yya"))))
>>>>>>>> (build-system python-build-system)
>>>>>>>> (propagated-inputs
>>>>>>>> `(("python-jinja2" ,python-jinja2)
>>>>>>>> ("python-jupyterlab-server"
>>>>>>>> ,python-jupyterlab-server)
>>>>>>>> ("python-notebook" ,python-notebook)
>>>>>>>> ("python-tornado" ,python-tornado)))
>>>>>>>> (native-inputs
>>>>>>>> `(("python-pytest" ,python-pytest)
>>>>>>>> ("python-pytest-check-links"
>>>>>>>> ,python-pytest-check-links)
>>>>>>>> ("python-requests" ,python-requests)
>>>>>>>> ("python-virtualenv" ,python-virtualenv)
>>>>>>>> ("python-wheel" ,python-wheel)))
>>>>>>>> (home-page "http://jupyter.org")
>>>>>>>> (synopsis
>>>>>>>> "The JupyterLab notebook server extension.")
>>>>>>>> (description
>>>>>>>> "The JupyterLab notebook server extension.")
>>>>>>>> (license license:bsd-3)))
>>>>>>>>
>>>>>>>> python-jupyterlab
>>>>>>>> ~~~~~END~~~~~
>>>>>>>>
>>>>>>>> And as noted in the comments, I have 3 questions at this point:
>>>>>>>>
>>>>>>>> (Q1) Why are those required packages not imported by guix automatically?
>>>>>>>> (My guess: This functionality simply has not yet been implemented.)
>>>>>>>>
>>>>>>>> (Q2) Why are the manually imported packages not actually in files with
>>>>>>>> their own name, but instead jinja2 -> python-xyt, tornado -> python-web,
>>>>>>>> and pytest -> check? Why not (gnu packages python pytest) for example?
>>>>>>>>
>>>>>>>> (Q3) Is my process of finding the files in which the packages are
>>>>>>>> correct or just working by chance? Basically I am creating temporary
>>>>>>>> environments, in which I then lookup "where would the package be
>>>>>>>> installed" and then exit the temporary environment to use that
>>>>>>>> information in my imported package file's import expressions /
>>>>>>>> use-modules expression. This seems to be a bit of a convoluted process,
>>>>>>>> though worth it, if it always works in the end.
>>>>>>>>
>>>>>>>> (4) Now I run my time-machine command:
>>>>>>>>
>>>>>>>> ~~~~START~~~~
>>>>>>>> $ guix time-machine --channels=channels.scm -- environment --manifest=manifest.scm --load=jupyterlab.scm
>>>>>>>> ~~~~~END~~~~~
>>>>>>>>
>>>>>>>> This take a moment and then I get an error (the full output is longer,
>>>>>>>> but when running it multiple times, already successful steps are not all
>>>>>>>> done repeatedly, so the output is then reduced to what fails):
>>>>>>>>
>>>>>>>> ~~~~START~~~~
>>>>>>>> $ guix time-machine --channels=channels.scm -- environment --manifest=manifest.scm --load=jupyterlab.scm
>>>>>>>> Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.org/git/guix.git'...
>>>>>>>> The following derivations will be built:
>>>>>>>> /gnu/store/wzmfn9m45bmsbrx094rv3lf3w0rpmw49-python-pytest-check-links-0.3.0.drv
>>>>>>>> /gnu/store/n9i421lrbwrr8d0947w5vma7rhy3iyba-python-jupyterlab-server-1.2.0.drv
>>>>>>>> /gnu/store/s7jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv
>>>>>>>>
>>>>>>>> 4,2 MB will be downloaded
>>>>>>>> downloading from https://ci.guix.gnu.org/nar/lzip/2nahbs5v8q073gjmy224gk0h5lsh1kkw-python-nbconvert-5.0.0b1 ...
>>>>>>>> python-nbconvert-5.0.0b1 301KiB 2.0MiB/s 00:00 [##################] 100.0%
>>>>>>>>
>>>>>>>> building /gnu/store/s7jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv...
>>>>>>>> |builder for `/gnu/store/s7jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv' failed to produce output path `/gnu/store/92md7gh966n4fzj6al267lqq4xjx0ncf-jupyterlab-server-1.2.0.tar.gz'
>>>>>>>> build of /gnu/store/s7jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv failed
>>>>>>>> View build log at '/var/log/guix/drvs/s7/jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv.bz2'.
>>>>>>>> cannot build derivation `/gnu/store/n9i421lrbwrr8d0947w5vma7rhy3iyba-python-jupyterlab-server-1.2.0.drv': 1 dependencies couldn't be built
>>>>>>>> killing process 7384
>>>>>>>> guix environment: error: build of `/gnu/store/n9i421lrbwrr8d0947w5vma7rhy3iyba-python-jupyterlab-server-1.2.0.drv' failed
>>>>>>>> ~~~~~END~~~~~
>>>>>>>>
>>>>>>>> OK, an error, perhaps I can understand it. Lets look at that log file:
>>>>>>>>
>>>>>>>> ~~~~START~~~~
>>>>>>>> $ cp /var/log/guix/drvs/s7/jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv.bz2 .
>>>>>>>> $ bzip2 --decompress jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv.bz2
>>>>>>>> $ cat jc2dbb0bnrahxklmszmpfv8klgw3sd-jupyterlab-server-1.2.0.tar.gz.drv
>>>>>>>>
>>>>>>>> Starting download of /gnu/store/92md7gh966n4fzj6al267lqq4xjx0ncf-jupyterlab-server-1.2.0.tar.gz
>>>>>>>> From https://files.pythonhosted.org/packages/source/j/jupyterlab-server/jupyterlab-server-1.2.0.tar.gz...
>>>>>>>> download failed "https://files.pythonhosted.org/packages/source/j/jupyterlab-server/jupyterlab-server-1.2.0.tar.gz" 404 "Not Found"
>>>>>>>>
>>>>>>>> Starting download of /gnu/store/92md7gh966n4fzj6al267lqq4xjx0ncf-jupyterlab-server-1.2.0.tar.gz
>>>>>>>> From https://ci.guix.gnu.org/file/jupyterlab-server-1.2.0.tar.gz/sha256/132xby7531rbrjg9bqvsx86birr1blynjxy8gi5kcnb6x7fxjcal...
>>>>>>>> download failed "https://ci.guix.gnu.org/file/jupyterlab-server-1.2.0.tar.gz/sha256/132xby7531rbrjg9bqvsx86birr1blynjxy8gi5kcnb6x7fxjcal" 404 "Not Found"
>>>>>>>>
>>>>>>>> Starting download of /gnu/store/92md7gh966n4fzj6al267lqq4xjx0ncf-jupyterlab-server-1.2.0.tar.gz
>>>>>>>> From https://tarballs.nixos.org/sha256/132xby7531rbrjg9bqvsx86birr1blynjxy8gi5kcnb6x7fxjcal...
>>>>>>>> download failed "https://tarballs.nixos.org/sha256/132xby7531rbrjg9bqvsx86birr1blynjxy8gi5kcnb6x7fxjcal" 404 "Not Found"
>>>>>>>>
>>>>>>>> Starting download of /gnu/store/92md7gh966n4fzj6al267lqq4xjx0ncf-jupyterlab-server-1.2.0.tar.gz
>>>>>>>> From https://archive.softwareheritage.org/api/1/content/sha256:5431d9dde96659364b7cc877693d5d21e7b80cea7ae3959ecc2b87518e5f5d8c/raw/...
>>>>>>>> download failed "https://archive.softwareheritage.org/api/1/content/sha256:5431d9dde96659364b7cc877693d5d21e7b80cea7ae3959ecc2b87518e5f5d8c/raw/" 404 "Not Found"
>>>>>>>> failed to download "/gnu/store/92md7gh966n4fzj6al267lqq4xjx0ncf-jupyterlab-server-1.2.0.tar.gz" from "https://files.pythonhosted.org/packages/source/j/jupyterlab-server/jupyterlab-server-1.2.0.tar.gz"
>>>>>>>> ~~~~~END~~~~~
>>>>>>>>
>>>>>>>> So it seems, that the jupyterlab-server file is simply not downloadable
>>>>>>>> any longer!
>>>>>>>>
>>>>>>>> Trying using wget:
>>>>>>>>
>>>>>>>> ~~~~START~~~~
>>>>>>>> $ wget https://files.pythonhosted.org/packages/source/j/jupyterlab-server/jupyterlab-server-1.2.0.tar.gz
>>>>>>>> --2020-10-18 13:49:52-- https://files.pythonhosted.org/packages/source/j/jupyterlab-server/jupyterlab-server-1.2.0.tar.gz
>>>>>>>> Resolving files.pythonhosted.org (files.pythonhosted.org)... 2a04:4e42:9::319, 151.101.37.63
>>>>>>>> Connecting to files.pythonhosted.org (files.pythonhosted.org)|2a04:4e42:9::319|:443... failed: Connection refused.
>>>>>>>> Connecting to files.pythonhosted.org (files.pythonhosted.org)|151.101.37.63|:443... connected.
>>>>>>>> HTTP request sent, awaiting response... 404 Not Found
>>>>>>>> 2020-10-18 13:49:53 ERROR 404: Not Found.
>>>>>>>> ~~~~~END~~~~~
>>>>>>>>
>>>>>>>> So now I am out of ideas. It seems the file is not available any longer
>>>>>>>> and the definition of jupyterlab needs to be updated somewhere, so that
>>>>>>>> it does not try to download an old or non-existent version of
>>>>>>>> jupyter-labserver. But how is this usually done? Can I specify it
>>>>>>>> somewhere in one of the 3 files I have, or am I dependent on someone
>>>>>>>> fixing the jupyterlab-server dependency / input for juypterlab?
>>>>>>>>
>>>>>>>> Thanks for your help so far! Tell me, if I need to provide any more
>>>>>>>> information to solve the problem.
>>>>>>> Try chaning the URL line to (uri (pypi-uri "jupyterlab_server" version)),
>>>>>>> with an underscore (_). I don't have any special suggestions for knowing
>>>>>>> that it should be an underscore instead of a dash. The best I have is
>>>>>>> the output from 'guix import pypi jupyterlab-server:
>>>>>>>
>>>>>>> (ins)efraim@E5400 ~$ guix import pypi jupyterlab-server
>>>>>>>
>>>>>>> Starting download of /tmp/guix-file.ayJ41F
>>>>>>> From https://files.pythonhosted.org/packages/92/54/5f321ca4cebfb644ac59eb21601b46a2ff9831ffe1b4e5a588f2a7e98d48/jupyterlab_server-1.2.0.tar.gz...
>>>>>>> …er-1.2.0.tar.gz 22KiB 57KiB/s 00:00 [##################] 100.0%
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>> Best regards,
>>>>>>>> Zelphir
>>>>>>>>
>>>>>>>>
>>>>>>>> On 10/16/20 2:25 PM, Tobias Geerinckx-Rice wrote:
>>>>>>>>> Zelphir,
>>>>>>>>>
>>>>>>>>> Zelphir Kaltstahl 写道:
>>>>>>>>>> $ guix import pypi 'jupyterlab@2.1.5' --recursive
>>>>>>>>> It will work if you substitute ‘/’ for ‘@’. Yes, this is a happy
>>>>>>>>> accident specific to the PyPI importer, and I'm sure you can guess why
>>>>>>>>> it happens to work.
>>>>>>>>>
>>>>>>>>>>> guix import hackage mtl@2.1.3.1
>>>>>>>>>> But that is in the "hackage" import section. Is the same not available
>>>>>>>>>> for PyPI?
>>>>>>>>> [...]
>>>>>>>>>
>>>>>>>>>> Do the various importers work differently?
>>>>>>>>> Unfortunately so. It would be great(TM) if PACKAGE[@VERSION] were
>>>>>>>>> standard. Each importer could handle it properly (e.g., by turning it
>>>>>>>>> into "/") or return a friendlier ‘the foo importer does not yet
>>>>>>>>> support versions’ error.
>>>>>>>>>
>>>>>>>>> I don't have the time, but this sounds like a good intermediate-level
>>>>>>>>> hack for someone who does :-)
>>>>>>>>>
>>>>>>>>> Kind regards,
>>>>>>>>>
>>>>>>>>> T G-R
>>>>>>>> --
>>>>>>>> repositories: https://notabug.org/ZelphirKaltstahl
>>>>>> --
>>>>>> repositories: https://notabug.org/ZelphirKaltstahl
>>>>>> --
>>>>>> Sent from my Android device with K-9 Mail. Please excuse my brevity.
>>>>> --
>>>>> repositories: https://notabug.org/ZelphirKaltstahl
>>>> --
>>>> repositories: https://notabug.org/ZelphirKaltstahl
>> Regards,
>> Zelphir
>>
>> --
>> repositories: https://notabug.org/ZelphirKaltstahl
Thanks for all your help!
Zelphir
--
repositories: https://notabug.org/ZelphirKaltstahl
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2020-10-25 11:58 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-16 11:50 guix import error Zelphir Kaltstahl
2020-10-16 12:19 ` zimoun
2020-10-16 12:25 ` Tobias Geerinckx-Rice
2020-10-16 13:51 ` zimoun
2020-10-18 11:55 ` guix import error + New: setting up a jupyterlab environment Zelphir Kaltstahl
2020-10-18 16:35 ` Efraim Flashner
2020-10-19 14:31 ` Zelphir Kaltstahl
2020-10-19 16:54 ` Efraim Flashner
2020-10-19 18:19 ` Zelphir Kaltstahl
2020-10-19 21:12 ` Zelphir Kaltstahl
2020-10-21 7:18 ` Efraim Flashner
2020-10-24 19:42 ` Zelphir Kaltstahl
2020-10-25 8:52 ` Efraim Flashner
2020-10-25 11:49 ` Zelphir Kaltstahl
2020-10-21 7:09 ` Efraim Flashner
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).