Code Monkey home page Code Monkey logo

Comments (16)

mnlevy1981 avatar mnlevy1981 commented on July 18, 2024 1

Making the directory doesn't seem to matter much, the error is still from the --output option (the ls results look the same)

++ ls -A /Users/mlevy/.local/share/cartopy
+ '[' '' ']'
+ python --output /Users/mlevy/.local/share/cartopy cultural-extra cultural gshhs physical
unknown option --output
usage: python [option] ... [-c cmd | -m mod | file | -] [arg] ...
Try `python -h' for more information.

Unless cartopy is supposed to be a python script created by one of the earlier scripts? I tried creating ~/.local/ and post_build failed as in #38 (comment), so I created ~/.local/share/ and it failed in the same way so I created ~/.local/share/cartopy/ and it returned the above error. Note that the only difference is the missing ls: /Users/mlevy/.local/share/cartopy: No such file or directory line (I think)


When you get time, can you take a look at https://circleci.com/gh/NCAR/ncar-python-tutorial/76 and let me know what you thing in terms of the stdout info.

It looks like you're still tweaking things, but a couple of comments based on the output

************* Step 1/5: Installing Miniconda  *****************
************* Step 2/5: Updating `base` conda environment *******************
************* Step 3/5: Creating/Updating `analysis` conda environment (this can take 5-10 min) ***********
************* Step 4/5: Running post build script for `base` environment **************
************* Step 5/5: Running post build script for `analysis` environment ***************
************* Setup completed successfully. ****************

This is certainly more informative than the previous output, though I still think it would be useful to append a time stamp to each step so that users can track how long it's actually been. I'd like

************* Step 1/5: Installing Miniconda  (HH:MM:SS) *****************

but could see an argument for

************* Step 1/5: Installing Miniconda  (MMM DD YYYY HH:MM:SS) *****************

Also, it's still just two big steps:

  1. Install Miniconda
  2. Set up environments for this tutorial

So I was picturing

************* Step 1/2: Installing Miniconda (HH:MM:SS) *****************
************** Step 2/2: Creating/Updating conda environments (this can take 5-10 min) (HH:MM:SS) ***********
************* Step 2a: Updating `base` conda environment (HH:MM:SS) *******************
************* Step 2b: Creating/Updating `analysis` conda environment (HH:MM:SS) ***********
************* Step 2c: Running post build script for `base` environment (HH:MM:SS) **************
************* Step 2d: Running post build script for `analysis` environment (HH:MM:SS) ***************
************* Setup completed successfully. (HH:MM:SS) ****************

(That's not a big deal if the bookkeeping is easier to just let each script be its own step.)

from ncar-python-tutorial.

mnlevy1981 avatar mnlevy1981 commented on July 18, 2024

I got impatient and ^Ced out. I don't know if the traceback is useful:

************** Creating/Updating conda environments (this can take 5-10 min) ***********
^CTraceback (most recent call last):
  File "./setup/configure", line 106, in <module>
    main()
  File "./setup/configure", line 102, in main
    prepare_env()
  File "./setup/configure", line 92, in prepare_env
    run_script(env_update_script, my_env)
  File "./setup/configure", line 33, in run_script
    out, err = process_output.communicate()
  File "/Users/mlevy/miniconda3/lib/python3.7/subprocess.py", line 939, in communicate
    stdout, stderr = self._communicate(input, endtime, timeout)
  File "/Users/mlevy/miniconda3/lib/python3.7/subprocess.py", line 1681, in _communicate
    ready = selector.select(timeout)
  File "/Users/mlevy/miniconda3/lib/python3.7/selectors.py", line 415, in select
    fd_event_list = self._selector.poll(timeout)
KeyboardInterrupt

I'm trying the command one more time -- if this doesn't work, I might blow away my conda installation and see what happens if setup/configure installs it for me.

from ncar-python-tutorial.

andersy005 avatar andersy005 commented on July 18, 2024

@mnlevy1981, thank you for reporting this issue.

It's been 20+ minutes, and while I would not be surprised to learn that conda is doing something behind the screens, a little more information on how to track progress over this period of time would be nice.

Since we are using subprocess, one solution is to split the bash scripts into smaller scripts. Hopefully, this will helps us to report back to the user every few minutes whenever each small task is done. What do yo think?

from ncar-python-tutorial.

andersy005 avatar andersy005 commented on July 18, 2024

@mnlevy1981,

Can you try running

conda env update -f ./setup/env-conda-base.yml
conda env update -f ./setup/env-analysis.yml

on their own and see what conda is doing?

from ncar-python-tutorial.

mnlevy1981 avatar mnlevy1981 commented on July 18, 2024

@andersy005

one solution is to split the bash scripts into smaller scripts. Hopefully, this will helps us reporting back to the user every few minutes whenever each small task is done.

That would be nice -- being able to see, for instance, if this was hanging in the conda update conda call or if it had moved on to updating base or creating analysis or whatever. If possible, could be also have timestamps when each of these processes end? Something like

(12:07:55) Updating conda to latest version
(12:09:12) Adding packages to (base) environment

(I'm sure there's a better format than above, but that's the level of information I'd find helpful).

Also, does it make sense to offer a step-by-step approach in the README if the configure script fails or if users just want a little more detail in exactly what they are doing? For that, I'm picturing something like

Can you try running

conda env update -f ./setup/env-conda-base.yml
conda env update -f ./setup/env-analysis.yml

on their own and see what conda is doing?

Like you just suggested. I'll do that now and let you know.

from ncar-python-tutorial.

mnlevy1981 avatar mnlevy1981 commented on July 18, 2024

Verifying I was able to update base and create analysis using the provided yml files, so it's unclear to me why configure was hanging where it was

from ncar-python-tutorial.

andersy005 avatar andersy005 commented on July 18, 2024

Glad to hear that individual steps work. Remember to run the post build script too:

./setup/post_build

from ncar-python-tutorial.

mnlevy1981 avatar mnlevy1981 commented on July 18, 2024

post_build is failing:

+ jupyter labextension install @jupyter-widgets/jupyterlab-manager @pyviz/jupyterlab_pyviz nbdime-jupyterlab jupyter-leaflet
Building jupyterlab assets (build:prod:minimize)
+ jupyter labextension update --all
Extension 'nbdime-jupyterlab' already up to date
Extension '@pyviz/jupyterlab_pyviz' already up to date
Extension '@jupyter-widgets/jupyterlab-manager' already up to date
Extension 'jupyter-leaflet' already up to date
++ ls -A /Users/mlevy/.local/share/cartopy
ls: /Users/mlevy/.local/share/cartopy: No such file or directory
+ '[' '' ']'
+ python --output /Users/mlevy/.local/share/cartopy cultural-extra cultural gshhs physical
unknown option --output
usage: python [option] ... [-c cmd | -m mod | file | -] [arg] ...
Try `python -h' for more information.

from ncar-python-tutorial.

andersy005 avatar andersy005 commented on July 18, 2024

That is interesting! Does /Users/mlevy/.local/share/ directory exist?

from ncar-python-tutorial.

mnlevy1981 avatar mnlevy1981 commented on July 18, 2024

Nope! Not even ~/.local itself:

$ ls /Users/mlevy/.local
ls: /Users/mlevy/.local: No such file or directory

from ncar-python-tutorial.

andersy005 avatar andersy005 commented on July 18, 2024

I see... We need to make sure that that directory exists and if doesn't, we should create it in the post build scripts..

When you get time, can you take a look at https://circleci.com/gh/NCAR/ncar-python-tutorial/76 and let me know what you thing in terms of the stdout info.

from ncar-python-tutorial.

andersy005 avatar andersy005 commented on July 18, 2024

Looking at this a bit more

python --output /Users/mlevy/.local/share/cartopy cultural-extra cultural gshhs physical

It appears the setup/download_cartopy_assets.py script is not being passed to Python

python $CARTOPY_ASSET_SCRIPT --output ~/.local/share/cartopy cultural-extra cultural gshhs physical

I am going to investigate why $CARTOPY_ASSET_SCRIPT is null.

from ncar-python-tutorial.

andersy005 avatar andersy005 commented on July 18, 2024

@mnlevy1981

I am going to investigate why $CARTOPY_ASSET_SCRIPT is null.

I know why this is happening. $CARTOPY_ASSET_SCRIPT is set in configure script, and running the post build script on its own should fail since this variable doesn't exist outside of the subprocess called process.

Try running the original

./setup/configure

from ncar-python-tutorial.

andersy005 avatar andersy005 commented on July 18, 2024

This is certainly more informative than the previous output, though I still think it would be useful to append a time stamp to each step so that users can track how long it's actually been. I'd like

👍

I just added this in #40

from ncar-python-tutorial.

andersy005 avatar andersy005 commented on July 18, 2024

The latest version stdout:

****** Step 1/5: Installing Miniconda (20:10:31) ******
****** Step 2/5: Updating `base` environment (20:10:36) ******
****** Step 3/5: Creating/Updating `analysis` environment (this can take 5-10 min) (20:12:01) ******
****** Step 4/5: Running post build script for `base` environment (20:15:39) ******
****** Step 5/5: Running post build script for `analysis` environment (20:17:16) ******
****** Setup completed successfully. (20:20:52) ******
==> For changes to take effect, close and re-open your current shell. <==

@mnlevy1981, let me know if you give #40 the green light, and I will merge it.

from ncar-python-tutorial.

mnlevy1981 avatar mnlevy1981 commented on July 18, 2024

@mnlevy1981

I am going to investigate why $CARTOPY_ASSET_SCRIPT is null.

I know why this is happening. $CARTOPY_ASSET_SCRIPT is set in configure script, and running the post build script on its own should fail since this variable doesn't exist outside of the subprocess called process.

Try running the original

./setup/configure

This worked, thanks! I'm not sure why setup/configure worked after I created the environments by hand either, but I'll take it.

(I responded to your comments about the PR itself in #40 -- off to a meeting now, but will try to finalize review before I leave for the night. Thanks for taking this on!)

from ncar-python-tutorial.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.