Git Product home page Git Product logo

Comments (6)

gillins avatar gillins commented on August 16, 2024

You are right - once you deactivate conda the command line tools will no longer be available.

You can try installing python-fmask outside of conda by running python setup.py install in a copy of the repository. However you will need to ensure all of the required dependencies are installed (GDAL, GDAL Python bindings, RIOS, numpy and scipy). Getting these all installed (especially on Windows) can be difficult hence why we recommend using conda.

Out of interest - how are you planning to distribute your GRASS plugin? It sounds like it will require python-fmask to be available.

from python-fmask.

neilflood avatar neilflood commented on August 16, 2024

Yes, I am also a bit puzzled as to how this will work in practice.

As @gillins says, you can install all the relevant pieces without conda, if desired, but you still have the same problem that however you install them, their location needs to be accessible. One thought I have is that if you really don't want to keep conda active, you could still use it to do the install (as you have done) and then just manually set the PATH to include the conda bin directory (in your current case that is ~/miniconda3/bin). I have not tried this, but I suspect it would give you everything you need.

It is also better to use a separate conda environment,instead of the base environment, but that is kind of a separate question.

from python-fmask.

RobinKohrs avatar RobinKohrs commented on August 16, 2024

thank you very very much for the help:)! I actually did what @neilflood said and downloaded it with conda and then added the path to the conda bon to the PATH-variable. Afterwards I can run the functions also when conda is deactivated. But I really wanted to include your python-implementation of the fmask algorithm in a GRASS-Add-on. And for some reason when I run a little test script (basically just the import of fmask and rios), GRASS just doesn't find them anymore. I also created many separate conda-environments, but I just can't get it run. I really tried a lot, but due to the lack of my knowledge it still doesn't work at all.
So I really don't know if there ever will be a GRASS-plugin. In case it turns out that it really works, I think there is an official GRASS-Add-on site. I hope that's ok for you. As I'm really new to this I still miss quite some experience. I hope this isn't a too naive approach...

from python-fmask.

neilflood avatar neilflood commented on August 16, 2024

It sounds like the GRASS installation is running a different version of Python, and looking in a different location for installed Python packages (like rios and fmask). You would need to make sure that everything is part of a consistent build. This would mean either: (1) install everything through conda, from the same channel, including GRASS, Python, GDAL, RIOS and Fmask; or (2) install everything without conda.

I think at this point you should question whether there is any real benefit to having Fmask as a GRASS plugin. It is pretty easy to run using the command line tools,. It may not be worth the effort to have it integrated so closely into GRASS.

from python-fmask.

RobinKohrs avatar RobinKohrs commented on August 16, 2024

Thank you very much for the answers and my late reply... I will need to rethink the approach and see if this is a good idea at all. Running the command line tools seems to be the easiest and most straight-forward option indeed. Thanks again for all the help!:)

from python-fmask.

neilflood avatar neilflood commented on August 16, 2024

You're welcome, good luck.

from python-fmask.

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.