Giter Club home page Giter Club logo

Comments (6)

dojeda avatar dojeda commented on May 30, 2024 1

I don't think you can use poetry or poetry2conda for this particular package. Poetry relies on packages that are distributed through PyPI. I don't really understand what you are trying to achieve, given that your dependency is a "pure conda" package (which is regrettable).

from poetry2conda.

damienallen avatar damienallen commented on May 30, 2024 1

I'm facing a different use case that could also be described as a "conda only dependency". We use poetry for all our env management but need conda for our pyinstaller builds. Thus, we want pyinstaller in our conda env but not in our poetry envs.

Not sure if this really helps OP but maybe someone passing through in the future. We simply used the "extras" functionality in pyproject.toml:

[tool.poetry.dependencies]
...
pyinstaller = { version = "3.6", optional = true }

[tool.poetry.extras]
conda-only = ["pyinstaller"]

Then we call poetry2conda with the extras flag: poetry2conda --extras conda-only pyproject.toml conda.yml

@dojeda Really appreciate this tool!

from poetry2conda.

frankier avatar frankier commented on May 30, 2024

I was able to use the above trick to install a package not on pypi at all:

[tool.poetry.dev-dependencies]
dummypkg = { git="https://github.com/bjodah/dummypkg.git", tag="master", optional = true }
...

[tool.poetry.extras]
conda-only = ["dummypkg"]

[tool.poetry2conda.dependencies]
dummypkg = { name="cuml", version = "0.18", channel = "rapidsai" }
...

from poetry2conda.

chestergan avatar chestergan commented on May 30, 2024

I'm facing a different use case that could also be described as a "conda only dependency". We use poetry for all our env management but need conda for our pyinstaller builds. Thus, we want pyinstaller in our conda env but not in our poetry envs.

Not sure if this really helps OP but maybe someone passing through in the future. We simply used the "extras" functionality in pyproject.toml:

[tool.poetry.dependencies]
...
pyinstaller = { version = "3.6", optional = true }

[tool.poetry.extras]
conda-only = ["pyinstaller"]

Then we call poetry2conda with the extras flag: poetry2conda --extras conda-only pyproject.toml conda.yml

@dojeda Really appreciate this tool!

@dojeda This should be added to the package's descriptions; there is not a manual for all the possible yaml headers & configurations!

Moreover, I think poetry update should have an additional option, similar to --no-dev, to exclude installations & updates on extra dependencies.

from poetry2conda.

chestergan avatar chestergan commented on May 30, 2024

I'm facing a different use case that could also be described as a "conda only dependency". We use poetry for all our env management but need conda for our pyinstaller builds. Thus, we want pyinstaller in our conda env but not in our poetry envs.

Not sure if this really helps OP but maybe someone passing through in the future. We simply used the "extras" functionality in pyproject.toml:

[tool.poetry.dependencies]
...
pyinstaller = { version = "3.6", optional = true }

[tool.poetry.extras]
conda-only = ["pyinstaller"]

Then we call poetry2conda with the extras flag: poetry2conda --extras conda-only pyproject.toml conda.yml

@dojeda Really appreciate this tool!

How do you run poetry update on the .toml file successfully? poetry update still encounters the SolverProblemError for the conda-specific package nomkl:
image

from poetry2conda.

chestergan avatar chestergan commented on May 30, 2024

I was able to use the above trick to install a package not on pypi at all:

[tool.poetry.dev-dependencies]
dummypkg = { git="https://github.com/bjodah/dummypkg.git", tag="master", optional = true }
...

[tool.poetry.extras]
conda-only = ["dummypkg"]

[tool.poetry2conda.dependencies]
dummypkg = { name="cuml", version = "0.18", channel = "rapidsai" }
...

This works when there is only one conda-specific package, but what if there is more? How many dummy packages do I need to use?

from poetry2conda.

Related Issues (15)

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.