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

issue with Modify install to use Git version instructions #1095

Closed
jerabaul29 opened this issue Apr 26, 2023 · 5 comments
Closed

issue with Modify install to use Git version instructions #1095

jerabaul29 opened this issue Apr 26, 2023 · 5 comments

Comments

@jerabaul29
Copy link

I need to use opendrift from source to have the lastest features (dataset reader), so I am trying to follow the instructions at: https://opendrift.github.io/install.html#modify-install-to-use-git-version . Getting the following issue:

> conda remove opendrift
... [lots happening]
> cd ~/Desktop/Git/opendrift/                                                                                                                                                                    
~/Desktop/Git/opendrift [master|✔]> pip install -e --no-deps .                                                                                                                                                                                                             
ERROR: --no-deps is not a valid editable requirement. It should either be a path to a local project or a VCS URL (beginning with bzr+http, bzr+https, bzr+ssh, bzr+sftp, bzr+ftp, bzr+lp, bzr+file, git+http, git+https, git+ssh, git+git, git+file, hg+file, hg+http, hg+https, hg+ssh, hg+static-http, svn+ssh, svn+http, svn+https, svn+svn, svn+file).
@jerabaul29
Copy link
Author

Doing without the --no-deps results in a GDAL error:

~/Desktop/Git/opendrift [master|✔]> pip install -e .
... [many lines / long debug trace]
      extensions/gdal_wrap.cpp:5360:13: warning: ‘CheckNumericDataType’ defined but not used [-Wunused-variable]
       5360 | static bool CheckNumericDataType(GDALExtendedDataTypeHS* dt)
            |             ^~~~~~~~~~~~~~~~~~~~
      error: command '/usr/bin/gcc' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for GDAL
  Running setup.py clean for GDAL
  Building wheel for utm (setup.py) ... done
  Created wheel for utm: filename=utm-0.7.0-py3-none-any.whl size=6085 sha256=7633ef62845ab9236a2d4cbeafdac18d9dfec4aaf6d4634733fc8a12be049dba
  Stored in directory: /home/jrmet/.cache/pip/wheels/c9/30/59/0a0f4976bbec8d13eb19b8ae0d691aeb9499463fb2924bf6d8
Successfully built opendrift Cartopy utm
Failed to build GDAL
ERROR: Could not build wheels for GDAL, which is required to install pyproject.toml-based projects

@gauteh
Copy link
Member

gauteh commented Apr 26, 2023

I think it should be:

$ pip install --no-deps -e .

otherwise it is interpreted as an argument to -e.

@gauteh gauteh closed this as completed in a6d3b71 Apr 26, 2023
@gauteh
Copy link
Member

gauteh commented Apr 26, 2023

By the way, you should probably also use:

conda remove --force opendrift

to prevent dependencies to be removed.

The cleanest way to set this up is to use https://opendrift.github.io/install.html#alternative-1-using-miniconda-and-git-recommended

@jerabaul29
Copy link
Author

The issue I see with method 1 is that it assumes one creates a new env, while I want / need to add to an existing env.

@jerabaul29
Copy link
Author

Just to confirm: the updated documentation works fine, I am now able to use the https://opendrift.github.io/install.html#modify-install-to-use-git-version to remove the opendrift conda-installed from a conda env, and re-install opendrift from sources, so this is perfect :) . Many thanks for the doc updates :) .

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

2 participants