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

pixi global install does not allow version specifications in 0.26.x #1685

Closed
2 tasks done
davised opened this issue Jul 26, 2024 · 7 comments · Fixed by #1713
Closed
2 tasks done

pixi global install does not allow version specifications in 0.26.x #1685

davised opened this issue Jul 26, 2024 · 7 comments · Fixed by #1713
Labels
🐞 bug Something isn't working

Comments

@davised
Copy link

davised commented Jul 26, 2024

Checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pixi, using pixi --version.

Reproducible example

❯ pixi --version
pixi 0.26.1
❯ pixi global install numpy=2.0.1
  × 'numpy=2.0.1' is not a valid package name. Package names can only contain 0-9, a-z, A-Z, -, _, or .

Ignore that numpy isn't a good example for global install. It happens with other packages too :

❯ pixi global install bat=0.24.0
  × 'bat=0.24.0' is not a valid package name. Package names can only contain 0-9, a-z, A-Z, -, _, or .

Issue description

pixi global install fails when the package has a version specified. This does not happen on versions <= 0.25.0.

Expected behavior

Previous versions allowed a version specification during global install. I see no reason to continue allowing version specifications for global installs.

@davised davised added the 🐞 bug Something isn't working label Jul 26, 2024
@davised
Copy link
Author

davised commented Jul 26, 2024

My current work-around is to install pixi v0.25.0 binary as pixi-0.25.0 and use that for global installs that need a version specified.

❯ ./pixi-0.25.0 global install kneaddata=0.12.0
✔ Installed package kneaddata 0.12.0 pyhdfd78af_1 from bioconda
  These executables are now globally available:
   -  kneaddata_trf_parallel
   -  kneaddata
   -  kneaddata_bowtie2_discordant_pairs
   -  kneaddata_database
   -  kneaddata_build_database
   -  kneaddata_read_count_table
   -  kneaddata_test

@baszalmstra
Copy link
Contributor

Thanks for reporting! We will fix this. As a workaround try adding spaces: "numpy 2.0.1"

@davised
Copy link
Author

davised commented Jul 26, 2024

Thanks for reporting! We will fix this. As a workaround try adding spaces: "numpy 2.0.1"

Looks like that uncovers another bug:

❯ pixi global install bat 0.24.0
✔ Installed package bat 0.24.0 he8a937b_0 from conda-forge
  × Cannot solve the request because of: No candidates were found for 0.24.0 *.
  │

0.24.0 should be found though:

❯ pixi search bat
Using channels from global config: conda-forge, bioconda

bat he8a937b_0
--------------

Name                bat
Version             0.24.0
Build               he8a937b_0
Size                2527297
License             MIT
Subdir              linux-64
File Name           bat-0.24.0-he8a937b_0.conda
URL                 https://conda.anaconda.org/conda-forge/linux-64/bat-0.24.0-he8a937b_0.conda
MD5                 18da2a0103ba121e1425266e7ba51327
SHA256              fd0a7aae7f4c52ddf2ac5098dcb9a8f4b7ab1ccdd88633390a73a9d1be3b7de2

@baszalmstra
Copy link
Contributor

baszalmstra commented Jul 26, 2024

Youll need to add quotes!

pixi global install "bat 0.24.0"

@davised
Copy link
Author

davised commented Jul 26, 2024

Youll need to add quotes!

pixi global install "bat 0.24.0"

❯ pixi global install "bat 0.24.0"
  × 'bat 0.24.0' is not a valid package name. Package names can only contain 0-9, a-z, A-Z, -, _, or .

Quotes works on previous versions though:

❯ ./pixi-0.25.0 global install "bat 0.24.0"
✔ Installed package bat 0.24.0 he8a937b_0 from conda-forge
  These executables are now globally available:
   -  bat

@baszalmstra
Copy link
Contributor

Haha Im sorry, its currently missing an operator, try:

pixi global install "bat =0.24.0"

Ill take a better look next week. Parsing and the error messages can definitely be improved.

@davised
Copy link
Author

davised commented Jul 26, 2024

Haha Im sorry, its currently missing an operator, try:

pixi global install "bat =0.24.0"

Ill take a better look next week. Parsing and the error messages can definitely be improved.

Still broken on the latest version, but works on the previous:

❯ pixi global install "bat =0.24.0"
  × 'bat =0.24.0' is not a valid package name. Package names can only contain 0-9, a-z, A-Z, -, _, or .

❯ ./pixi-0.25.0 global install "bat =0.24.0"
✔ Installed package bat 0.24.0 he8a937b_0 from conda-forge
  These executables are now globally available:
   -  bat

baszalmstra pushed a commit that referenced this issue Aug 1, 2024
I tried to fix #1685 but that was already fixed by someone else. Then I
found my global install was not working because of this issue:

The fix is using the `config.default_channels()` vs the
`config.default_channels`...

The rest of this PR is cleanup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants