-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add pixi support #23
Add pixi support #23
Conversation
How to use pixi in comodoThe pixi.toml file, also called project manifest, is where we specify all the project configurations, environments along with their dependencies. In this case, I've created a These environment have the name of the simulator (i.e. they are called The it is possible to activate one of the environments with: pixi shell -e <environment-name> just like one will activate a conda environment. It is also possible to run directly a command in one of these environment using: pixi run -e <environment-name> python <script-filename.py> or pixi run -e <environment-name> jupyter notebook and then run the jupyter notebooks in the examples folder. Visual Studio CodeFor the folks using
And when running Jupyter notebooks from vscode, it is possible to select as kernel one of the pixi environments bu clicking on the top right corner of the notebook: |
This comment was marked as outdated.
This comment was marked as outdated.
Issue installing Drake packageI'm getting an error when trying to add drake package, available from pypi as: pixi add -f drake --pypi drake
× failed to solve the pypi requirements of 'all' 'linux-64'
├─▶ failed to resolve pypi dependencies
╰─▶ Because only drake>=0.35.0 is available and drake>=0.35.0,<=1.11.0 has no wheels with a matching Python ABI tag, we can conclude that drake<0.36.0 cannot be used.
And because drake>=1.12.0 has no wheels with a matching Python implementation tag and you require drake, we can conclude that your requirements are unsatisfiable.
hint: Pre-releases are available for drake in the requested range (e.g., 0.35.0b1), but pre-releases weren't enabled (try: `--prerelease=allow`)
|
So, how pixi solve works is that it first solves the conda dependencies, then given the installed version of conda dependencies it solves the python one. Which version of python are you using (or is pixi selecting?) I guess there is no drake version compatible with the required python version. |
Why? If we are installing |
In my case pixi is selecting python version |
bc0ba36
to
e8c91d7
Compare
You're right @traversaro , my message was a regression when I was installing it from git source. Installing the onda package works fine. I tried multiple times, by cleaning the cache and existing environments and it worked fine. I will mark my message as obsolete. |
Looking in Drake documentation, from the "Supported configurations" table reported here, it shows that for Ubuntu 24 LTS is supported only python 3.12, but the footnote says that in theory also python 3.10 should be supported via |
BTW when I install this environment I get the following warning:
@traversaro I've seen you're one of the maintainers of the From a quick look at the etils package I've seen that there exist and |
I am unable to reproduce the warning, what command are you executing? |
Can you add index c078c78..a98a258 100644
--- a/pixi.toml
+++ b/pixi.toml
@@ -23,6 +23,7 @@ mesalib = ">=24.2.4,<25"
notebook = ">=7.2.2,<8"
ipykernel = ">=6.29.5,<7"
resolve-robotics-uri-py = ">=0.3.0,<0.4"
+python = "*"
[pypi-dependencies]
# TODO: move adam-robotics package to conda dependencies as soon as PR https://github.com/ami-iit/adam/pull/100 is merged However, the confusing error is indeed a pixi problem, if you do it in a simple case you get the clear error that a python is missing from dependencies. |
Strange, even doing this I continue to get the same error (I also removed the I tried in an empty project to do: pixi init pixi add drake --pypi and got: But doing pixi add python
pixi add drake --pypi Then gives the same:
|
I remember it was logged with pretty much every pixi command on this environment, but I also cannot reproduce this now, strange.. I will let you know when if this happens again. |
Today, running $ pixi run test ✔ 12:01:40
WARN The feature 'style' is defined but not used in any environment
WARN The feature 'testing' is defined but not used in any environment
WARN The feature 'viz' is defined but not used in any environment
WARN The feature 'all' is defined but not used in any environment
WARN The package `etils==1.9.4` does not have an extra named `epy`
WARN The package `etils==1.9.4` does not have an extra named `epy`
WARN The package `etils==1.9.4` does not have an extra named `epy`
WARN The package `etils==1.9.4` does not have an extra named `epy`
|
e8c91d7
to
4b1cdfe
Compare
@CarlottaSartore I think this PR is ready for review. To install Let me know if that works for you :) we can also add instructions on the README if you want |
I reported the issue in prefix-dev/pixi#771 . I think that Ruben is as ROSCon so I do not think he will able to reply shortly, but at least we reported it somewhere. |
Thanks a lot @traversaro !! |
Updated |
With the suggestion from prefix-dev/pixi#771 (comment) I was able to install drake through pixi. Now the drake example notebook runs, but still I'm getting an unrelated error while running the simulation:
I don't know if that notebook worked successfully before @CarlottaSartore |
It may be a problem of drake version? @akhilsathuluri may know more about this. By checking on his lock files, I guess he used drake 1.23.0 . |
I tried just by pinning that version but still I get the failed controller error, I have to try to run it with the same conda environment he used to check if it's a problem with dependencies or if the code the notebook uses has changed, breaking its functionality. |
If everything else is working except for drake perhaps we can merge as it is so people that anyhow use drake for the rest of the backends, and open a different issue to track solving the drake problems? fyi @xela-95 @CarlottaSartore |
Yep good idea! |
Opened #27 since I'm getting the same error also from the main branch with a conda environment. |
@CarlottaSartore this is ready to be reviewed :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM @xela-95 thanks! could you please add some documentation also in the main readme ?
Sure! I will add it ASAP |
Interestingly, it would be worth reporting this problems and its workaround somehow, for example in https://github.com/prefix-dev/pixi/discussions (as I do not know if this is a issue that can be addressed). |
ffbe64b
to
61ca460
Compare
@CarlottaSartore I refactored the README to be more clear and ordered. Let me know what do you think :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you really much @xela-95 , few comments
…and clarified installation instructions
Co-authored-by: Carlotta Sartore <56030908+CarlottaSartore@users.noreply.github.com>
fe2b3ac
to
ba6f647
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perfect ! Thanks @xela-95 ! Merging !
I would like to add a pixi project file to enable an easy way to install and run simulations in comodo in a way that is:
Blocked by: