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

parcels_get_examples on windows #533

Closed
delandmeterp opened this issue Feb 14, 2019 · 11 comments
Closed

parcels_get_examples on windows #533

delandmeterp opened this issue Feb 14, 2019 · 11 comments

Comments

@delandmeterp
Copy link
Contributor

Hi @willirath,

All the students installing Parcels on a Windows machine are coming to me with the same problem. They can't download the examples using the command:
parcels_get_examples parcels_examples

So far, I was bypassing the problems by running manually python get_examples.py example_dir within the env directory of conda. There should be a correct way to run this, no? Do you know what am I missing ?

Thanks!

@willirath
Copy link
Collaborator

I'm not sure. How is this done on appveyor?

@willirath
Copy link
Collaborator

I'd think that https://github.com/OceanParcels/parcels/blob/master/appveyor.yml has all necessary steps. But it builds and installs locally and not from the conda-forge package.

Maybe the console_script part in the setup.py is not properly handled in the conda build?

@delandmeterp
Copy link
Contributor Author

Yes indeed. In the automatic tests, they install parcels dependencies, checkout last version, install the setup.py that write an exe file into a build directory.

So conda does not run any setup.py install ?

@willirath
Copy link
Collaborator

Steps I'd take to Isolate the problem:

  • Print contents of the parcels_get_examples script on appveyor and check against the same on a local Windows install of Parcels.

  • Add running parcels_get_examples as a test to the conda-forge recipe. (Then, we'd see if this functionality is broken already in the conda-forge package.)

@willirath
Copy link
Collaborator

So conda does not run any setup.py install ?

It does. Or it uses pip. I'm not sure.

@willirath
Copy link
Collaborator

See https://github.com/conda-forge/parcels-feedstock/blob/master/recipe/meta.yaml

On conda forge, a wheel is built with the setup.py and then this is installed with pip.

@willirath
Copy link
Collaborator

So let's find out how to add a test to the recipe that runs parcels_get_examples on the package and see if this breaks. (I can't be of much help / can't try anything myself before some time next week, though.)

@delandmeterp
Copy link
Contributor Author

Thanks! I haven't fully understood all the processes within the meta.yaml, but now I know where to search! I'll have a look in the next few days and come back here.

@willirath
Copy link
Collaborator

See https://conda-forge.org/docs/testing.html#simple-existence-testing-example for how to add arbitrary commands to the test section of the meta.yaml

erikvansebille added a commit to erikvansebille/parcels-feedstock that referenced this issue Mar 5, 2019
@erikvansebille
Copy link
Member

I just checked on a windows machine, and the error is

Fatal error in launcher: Unable to create process using
'"c:\bld\parcels_1545306932520\_h_env\python.exe"
"C:\Users\erik\Miniconda2\envs\parcelsv2\Scripts\parcels_get_examples.exe" '

Googling didn't really help, I fear. Much about spaces in directory names (e.g. pypa/pip#2783), but that doesn't seem to be the issue here

The good news, though, is that I found a relatively easy workaround

  1. Run curl https://raw.githubusercontent.com/OceanParcels/parcels/master/parcels/scripts/get_examples.py > parcels_get_examples.py
  2. Run python parcels_get_examples.py parcels_examples

Shall we add a note to the installation instructions on oceanparcels.org to suggest this workaround on Windows?

@erikvansebille
Copy link
Member

This has now been fixed

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