Giter Club home page Giter Club logo

Comments (5)

jpivarski avatar jpivarski commented on June 19, 2024 1
conda install -c conda-forge root

ROOT is a large binary; it's not likely that it will ever be available on PyPI. (I have the PyPI name registered in case it ever becomes possible, but it's not likely.)

from aghast.

jpivarski avatar jpivarski commented on June 19, 2024 1

ROOT is not a requirement for hist or aghast, and that's something that won't change when aghast becomes based on jagged arrays. (Be sure to keep in mind that that update is many months in the future.)

Some of the histogram types that aghast converts to and from are ROOT histograms; when converting from ROOT histograms, the user has already imported ROOT somehow—we don't care how—and when converting to ROOT histograms, we have to import ROOT internally in that function. If it fails with ImportError, we give an error message asking the user to install ROOT and provide some hints about how to do that.

How users install ROOT is their own business, and there are many ways. Conda is a new one, which plays well with the Python ecosystem because it can manage Python package versions in the same optimization as the ROOT version. Pip probably won't be one because ROOT extends so far beyond the expectations of what a Python package looks like. (It puts constraints on which C++ compiler you use for projects that use ROOT—things like that.) Most of the users who want to convert histograms into and out of PyROOT objects already have ROOT installed. In fact, it's not uncommon for physicists to have several versions of ROOT installed, some of which were compiled manually to get some feature.

So this is why our use of ROOT doesn't imply any changes in whether hist or aghast uses venv, pip, or other Python standards. It should be thought of as a big thing on the border, not a small package to absorb into the stack.

As a testing dependency, we can absorb it into the testing stack with conda, but that means that any projects with ROOT in their tests have to install testing dependencies with conda (uproot did that, for instance).

from aghast.

LovelyBuggies avatar LovelyBuggies commented on June 19, 2024

@jpivarski Thx, but still a problem here.

I cannot use this command conda install -c conda-forge root directly in a Python3 venv. I have all other packages listed in requirements.txt and install them in my virtual environment to set up my dev env now. I wonder if there is a good way to install ROOT just like this.

Log:

(.env) NinodeMacBook-Pro:Nino-hist nino$ conda install -c conda-forge root
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: - failed with initial frozen solve. Retrying with flexible solve.

CondaError: KeyboardInterrupt

from aghast.

jpivarski avatar jpivarski commented on June 19, 2024

Conda environments are their own virtual environments. If you just need isolation, you can conda create, but if you need it to specifically be a Python 3 venv, then you might be out of luck. Python venv might be limited to Python packaging, but the vast majority of ROOT is not Python and not easily packaged within Python's directory structures.

from aghast.

LovelyBuggies avatar LovelyBuggies commented on June 19, 2024

Thanks. We might need to change our developing method.
However, whether the new version aghast will do some improvements on this feature, in order to better facilitate development in Python venv (it looks like we have to use conda if we want to import ROOT now)?

from aghast.

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.