Skip to content
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

Set-up notes on Windows #22

Closed
Robinlovelace opened this issue Mar 19, 2022 · 21 comments
Closed

Set-up notes on Windows #22

Robinlovelace opened this issue Mar 19, 2022 · 21 comments

Comments

@Robinlovelace
Copy link
Contributor

Making some notes here from recent installation experience.

  • Installed Chocolatey
  • Installed miniconda3
  • Installed VS Code
  • Installed the Quarto plugin in VS Code

At that point I tried running some Python code and was asked to select the Python Interpreter:

image

@Robinlovelace
Copy link
Contributor Author

Happily it found the miniconda interpreter:

image

@Robinlovelace
Copy link
Contributor Author

This is so variable per OS and with so many different options (including Quarto/Jupyter) I definitely think it deserves a decent section, in the Appendix #19 .

@Robinlovelace
Copy link
Contributor Author

Robinlovelace commented Mar 19, 2022

First time I tried to run some Python code I got this:

image

@Robinlovelace
Copy link
Contributor Author

Unfortunately that failed? Any ideas Michael or Anita?? A bit confused, error message after clicking on message above suggests I'm in an infinite loop if I keep clicking Install!

image

@michaeldorman
Copy link
Collaborator

From my experience you need to open the Miniconda as administrator, and then:

conda install -c conda-forge ipykernel

Maybe the VScode button does this as ordinary non-administrator user, and that's why it's not working?

@Robinlovelace
Copy link
Contributor Author

Will try. So far I've got...

(base) C:\Users\robinadmin\gh\geocompr\py>conda env create -f environment.yml
Collecting package metadata (repodata.json): failed

CondaError: KeyboardInterrupt

Terminate batch job (Y/N)?

@michaeldorman
Copy link
Collaborator

(Also, the ipykernel package should be included in the requirements.txt file which as part of the setup of all packages used in the book)

@michaeldorman
Copy link
Collaborator

Will try. So far I've got...

(base) C:\Users\robinadmin\gh\geocompr\py>conda env create -f environment.yml
Collecting package metadata (repodata.json): failed

CondaError: KeyboardInterrupt

Terminate batch job (Y/N)?

Interesting... I haven't tried creating environments yet

@Robinlovelace
Copy link
Contributor Author

Things are happening...

image

@Robinlovelace
Copy link
Contributor Author

Wow almost 20 minutes later and it's still not finished...

image

@michaeldorman
Copy link
Collaborator

I think it's normal, took a long time for me too

@Robinlovelace
Copy link
Contributor Author

It's done 🎉 and gave me this helpfull message:

Executing transaction: done
#
# To activate this environment, use
#
#     $ conda activate geocompy
#
# To deactivate an active environment, use
#
#     $ conda deactivate

@Robinlovelace
Copy link
Contributor Author

You may need to set your environment to geocompy or another an environment with the necessary packages by clicking on the top right button in VS Code:

image

@Robinlovelace
Copy link
Contributor Author

One question: any idea how to change the default kernel/environment?

@Robinlovelace
Copy link
Contributor Author

It's working but not sure what causes this message...

image

@michaeldorman
Copy link
Collaborator

It's working but not sure what causes this message...

image

This warning is always displayed when reading GPKG

@Robinlovelace
Copy link
Contributor Author

This warning is always displayed when reading GPKG

Any ideas why? See geopandas/geopandas#2385 FYI

@michaeldorman
Copy link
Collaborator

This warning is always displayed when reading GPKG

Any ideas why? See geopandas/geopandas#2385 FYI

There is an answer here, though can't say I understand it :-)
https://stackoverflow.com/questions/64995369/geopandas-warning-on-read-file

@anitagraser
Copy link
Collaborator

Wow almost 20 minutes later and it's still not finished...

We could recommend mamba instead of conda. It's a much faster solver. https://mamba.readthedocs.io/

@Robinlovelace
Copy link
Contributor Author

That sounds good to me, pls give it a bash if you get a chance.

@Robinlovelace
Copy link
Contributor Author

Update on this here:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants