Closed atzberg closed 3 weeks ago
apt-get install nim
did not work on platform
$ uname -a Linux XXX 6.5.0-41-generic #41~22.04.2-Ubuntu SMP PREEMPT_DYNAMIC Mon Jun 3 11:32:55 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
Perhaps can clarify for which distributions package nim is available with this installation method. The Conda based installation worked fine here, and the documentation instructions do also give several other ways to install the package. quickstart.ipynb
jupyter notebook encounters issue with finding the YAML configuration file, even though it is in the same local directory.
!nim c -f -d:release -d:configPath=config.yaml --out:nimcso ../src/nimcso
Hint: used config file 'XXX/anaconda3/nim/config/nim.cfg' [Conf] Hint: used config file 'XXX/anaconda3/nim/config/config.nims' [Conf] .................................................................................................................................. XXX/github_nimCSO__JOSS_review/src/nimcso.nim(37, 8) Error: cannot open file: yaml
- The
apt-get install nim
did not work on platform$ uname -a Linux XXX 6.5.0-41-generic #41~22.04.2-Ubuntu SMP PREEMPT_DYNAMIC Mon Jun 3 11:32:55 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
Perhaps can clarify for which distributions package nim is available with this installation method. The Conda based installation worked fine here, and the documentation instructions do also give several other ways to install the package.
I adjusted the install instructions in 85ab1b0, doing my best to present Conda as the preferred installation method on Linux and highlighting that the default channel/repository may have an outdated version not supported with nimCSO
. I also added tests for old nim=1.6
to make sure it works, in case someone tries to use the old version anyway.
- Running the
quickstart.ipynb
jupyter notebook encounters issue with finding the YAML configuration file, even though it is in the same local directory.!nim c -f -d:release -d:configPath=config.yaml --out:nimcso ../src/nimcso
Hint: used config file 'XXX/anaconda3/nim/config/nim.cfg' [Conf] Hint: used config file 'XXX/anaconda3/nim/config/config.nims' [Conf] .................................................................................................................................. XXX/github_nimCSO__JOSS_review/src/nimcso.nim(37, 8) Error: cannot open file: yaml
I haven't encountered this problem before, but I believe you are experiencing a missing yaml
package, rather than a missing YAML configuration file. If configuration could not be found, I would expect an IO exception like:
Error: unhandled exception: cannot open: configThatDoesNotExist.yaml [IOError]
Could you please double-check that yaml
is present in the output of nimble list -i
?
yaml is now installed, but issues persist.
Confirmed install by conda list | grep yaml.
Still issues persist in the jupyter notebook:
!nimble list -i (shows blank) [also when run from command line]
!nim c -f -d:release -d:configPath=config.yaml --out:nimcso ../src/nimcso usage: nim [-h] [--verbose] [--version] [--config FILE] {show} ... nim: error: argument subparser_level_0: invalid choice: 'c' (choose from 'show')
!nim --version version: 0.2.0
Hope that helps in sorting the issues out with the example jupyter notebook.
@atzberg Thanks for the above information; it greatly narrows possible issues!
The !nim --version
returning version 0.2.0
got me quite confused because, looking at the official nim
releases, there has never been a public 0.2.0
version. At the same time, the current nim
package in conda-forge
for your x86_64 GNU/Linux is the most recent 2.0.8
and should have given you:
(base) root@codespaces-f0a096:/workspaces/nimCSO# nim --version
Nim Compiler Version 2.0.8 [Linux: amd64]
Compiled at 2024-07-03
Copyright (c) 2006-2023 by Andreas Rumpf
git hash: 83f6aae78a8983e4212d1bb56e76348d8240c894
, which should align with the conda list
output:
(base) root@codespaces-f0a096:/workspaces/nimCSO# conda list | grep nim
nim 2.0.8 he02047a_0 conda-forge
However, I think I figured it out! I believe you may have tried a pip install nim
, which points to the PyPI repository of Python packages, and the nim
package there is a niche Python interface to the Network Interface Monitor, currently at version 0.2.0
, which has nothing to do with the nim
language or compiler.
Could you try to
pip uninstall nim
first, and then
conda install -c conda-forge nim
[ ] I will add some notes for the above to the README to help users avoid this trap.
The yaml
that appeared missing was a nim
package, currently at version 2.1.1
, handled by nimble
, rather than a Python
yaml
package handled by conda
, is presently at version 0.2.5
. Since !nimble list -i
did not return anything, it seems the dependency install did not go through, which makes sense since nim
was not installed correctly (per previous point). Could you try nimble install --depsOnly
or nimble install -y arraymancer yaml
again?
[x] I will add some notes for the above to the README to help users avoid this trap.
I hope the above makes sense, but please do not hesitate to ask for clarification!
OK, that explains the issue. Would be good to add comment on this to the install instructions in the documents. The package looks good here to accept and publish.
@atzberg, does 4127cbb address your comments and solves this issue?
Yes
On Mon, Aug 12, 2024, 1:46 PM Rocco Meli @.***> wrote:
@atzberg https://github.com/atzberg, does 4127cbb https://github.com/amkrajewski/nimCSO/commit/4127cbbabb51d26ace0cb10700978ef6a8b6f940 address your comments and solves this issue?
— Reply to this email directly, view it on GitHub https://github.com/amkrajewski/nimCSO/issues/5#issuecomment-2284876449, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACBHSZWA6VHZQD4CY4J2Q7LZRENI3AVCNFSM6AAAAABKTLIUP2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOBUHA3TMNBUHE . You are receiving this because you were mentioned.Message ID: @.***>
Thank you for the update. @amkrajewski looks like this issue can be closed.
Overall the package is well organized with clear documentation, installation instructions, and examples. Below are a few relatively small items that were encountered: