New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Episode 10 struggles on some operating systems #485
Comments
When the lesson is taught as part of a Software Carpentry workshop, git bash is installed and this is what we would use for Episode 10. Each lesson has a very short setup, mostly related to data needed for the lesson. We usually have a workshop setup with all the necessary packages (git bash, python or R, etc.) to be installed. I don't really know what is the policy here and if some information about git bash should be added in the setup. |
This was an issue we encountered at our last workshop, and it was kind of sloppy to get past because we weren't prepared (the instructors and helpers were using Linux and Mac). Windows learners couldn't run the programs in Git Bash with In the setup for the workshop, the instructions to install Anaconda on Windows only specify to "Make Anaconda the Default Python". The instructions don't say to select to "Add Anaconda to My PATH environment variable", and the installer actually now says this is "Not recommended", however in the Video Tutorial linked on the setup page, it shows that setting checked, as I believe it used to be enabled by default. I think this is why we had a much bigger problem with this episode 10 issue at our recent workshop than we saw with our first one--this time Windows users did not have Python on their PATH.
I am not typically a Windows user, so if someone has a better instruction to handle this, it would be good to hear! |
We are planning a revision of the installation instructions. Please see carpentries/workshop-template#459. |
I believe the current best practice on Windows is to add this to . $HOME/AppData/Local/Continuum/anaconda3/Scripts/activate |
@petebachant that seems much better than having people set their path with |
@petebachant has the best answer. I work for Anaconda, and we have tried to make sure that the activate shell scripts work in bash on windows. If you have issues, please file them on the conda issue tracker at https://github.com/conda/conda @ldko I'm glad you removed Anaconda from PATH - that's cleaner and less likely to interfere with random stuff. We advise that by default in new installations, but the old default was to add it to PATH. One other way to do all of this is to use Windows 10's Windows Subsystem for Linux. That's interesting in that it allows you to use the Linux anaconda/miniconda installers. Feel free to ping me if you have further questions. |
There was some discussion at unt-carpentries/2018-03-14-unt-swc#14 (comment) about when/why adding entries to PATH is something you either want to do (for convenience) or want to avoid (for avoiding problems). |
So, did you guys agree on using echo '. $HOME/AppData/Local/Continuum/anaconda3/Scripts/activate' >> ~/.bashrc ? |
At UNT we have since switched to doing something else that @somexpert determined to be better in https://github.com/unt-carpentries/2018-03-14-unt-swc/pull/15/files, though not very concise instructions. I think the idea with the change was that the installation may not always be in |
@ldko, @somexpert - Thanks for sharing those instructions - they're great. I'm teaching a slightly more advanced workshop next month and I want people to be able to create a conda environment, activate that environment and then execute a python script from within that environment at the command line. i.e.
After executing |
We have started to create conda environment for each workshop using yml file. And it works well with anaconda navigator on Linux and windows (we did not have Mac OS X) for those who are not familiar with command lines. We add it to .bashrc not .profile. |
@DamienIrving yes,
because otherwise Also, we ran the
because the Windows machine we ran this on also had an Anaconda for Python 2.7 installed and that is initially what got used when we didn't specify @annefou do you have a link you could share with instructions on how you all set up the conda environment for each workshop with the yml file? We are interested to look into that setup option. Thanks! |
Thanks, @ldko! |
I had a nice experience in my last workshop by installing everything, including |
@ocefpaf Whoa! So just |
@ldko here is an example on how we create new conda environment. https://annefou.github.io/jupyter_dashboards/setup.html |
Yep.
@annefou I would recommend
BTW, I'm pretty sure only |
@ocefpaf you are right: miniconda is prefered and we use it most of the time now. We still use the "full" anaconda installation when many python packages are required but I admit that it is not a good practice. |
@annefou I'm planning on creating a repo that "runs" the SWC lessons on CIs for Linux, OS X and Windows using the install instructions in a similar way as this repo. That would ensure the lesson works and we can always just fire up the CIs before a workshop to double check it. |
@ocefpaf That's definitely a great approach. Thanks for the link. |
Thank you for the documentation link @annefou ! @ocefpaf @DamienIrving using bash in Anaconda Prompt sounds like it could be easier for a workshop. I tried what was mentioned above running Am I missing something? I am having trouble finding documentation on running bash in the Anaconda Prompt to help me troubleshoot. I am attempting this on Windows 10 with conda 4.5.5. Thanks for any guidance you can provide! |
I'll take a closer look soon, maybe the last update broke it but the executable should be in the |
@ldko try using the |
Thanks @ocefpaf! When I do |
I do recommend it. It reduces the amount of steps and instructions we need to get a working environment for the workshop.
Good to know but the |
@ocefpaf So that's just |
Yep, then just call |
ah thanks @ocefpaf, I misunderstood when you first mentioned the |
We, conda-forge, only have However, I usually recommend VSCode b/c it is easy to install, has a nice GUI interface that Windows users like, and it is available on all platforms.
Yes, but one can write a menu install that creates an icon that would drop the users directly into that (ping @msarahan who suggested that to me yesterday 😉). |
Thanks for the input @ocefpaf ! |
anyone willing to submit a PR? |
I personally am hesitant to open a PR at this point not having yet done the suggestions provided in an actual workshop and nano not being available to use with the |
I agree. VSCode is my personal option, and ideally As people try the |
To avoid problems with various symbols, we have to specify the encoding when we read files. The actual codec name is `utf_8` but aliases like `utf8`, `utf-8`, etc are accepted. Here, I'm using `utf-8` alias. https://docs.python.org/3.8/library/codecs.html#standard-encodings This fixes `make lesson-check` when running under 'Git for Windows' for lessons that have non-cp1252 characters.
To avoid problems with various symbols, we have to specify the encoding when we read files. The actual codec name is `utf_8` but aliases like `utf8`, `utf-8`, etc are accepted. Here, I'm using `utf-8` alias. https://docs.python.org/3.8/library/codecs.html#standard-encodings This fixes `make lesson-check` when running under 'Git for Windows' for lessons that have non-cp1252 characters.
Episode 10 starts with the assumption that Python 3 is available in the user's shell.
However, at least o Windows, that may not be true:
Proper way to proceed should be stated at the beginning. If there is a flag in Anaconda installation that helps, this is quite too far in the material for learners to have time to fix it. Also, after successfull using Jupyter for quite a while, it is a setback and they may feel isolated from the others (e.g. people with Linux)
The text was updated successfully, but these errors were encountered: