macro128 / pdm-conda

A PDM plugin to resolve/install/uninstall project dependencies with Conda
34 stars 2 forks source link

Question: Can't add `pdm-conda` as plugin. Issue with Python version #45

Open kevinsweeney84 opened 1 month ago

kevinsweeney84 commented 1 month ago

I am attempting to add the pdm-conda plugin to my project but am getting errors with versions. What am I doing wrong here?

(python3.10) $ mkdir pdm_example
(python3.10) $ cd pdm_example/

(python3.10) $ python --version
Python 3.10.14

(python3.10) $ pdm --version
PDM, version 2.17.1

(python3.10) $ pdm init
Creating a pyproject.toml for PDM...
Please enter the Python interpreter to use
 0. cpython@3.10 (/home/sweenke4/miniconda3/bin/python3.10/bin/python)
 1. cpython@3.10 (/home/sweenke4/.local/share/pdm/python/cpython@3.10.14/bin/python3)
 2. cpython@3.10 (/home/sweenke4/miniconda3/bin/python3.10/bin/python3.10)
 3. cpython@3.7 (/home/sweenke4/miniconda3/bin/python3.7)
 4. cpython@3.6 (/usr/bin/python3.6m)
 5. cpython@3.6 (/usr/bin/python3.6)
 6. cpython@3.4 (/usr/bin/python3.4m)
 7. cpython@3.4 (/usr/bin/python3.4)
 8. cpython@2.7 (/usr/bin/python2.7)
 9. cpython@3.9 (/home/sweenke4/.local/share/pdm/venv/bin/python)
Please select (0): 
Project name (pdm_example): 
Project version (0.1.0): 
Do you want to build this project for distribution(such as wheel)?
If yes, it will be installed by default when running `pdm install`. [y/n] (n): y
Project description (): 
Which build backend to use?
0. pdm-backend
1. setuptools
2. flit-core
3. hatchling
Please select (0): 
License(SPDX name) (MIT): 
Author name (Kevin Sweeney): 
Author email (kevin.****@****.com): 
Python requires('*' to allow any) (>=3.10): 
Project is initialized successfully

The pyproject.toml file then looks like the following:

[project]
name = "pdm_example"
version = "0.1.0"
description = "Default template for PDM package"
authors = [
    {name = "Kevin Sweeney", email = "kevin.****@****.com"},
]
dependencies = []
requires-python = ">=3.10"
readme = "README.md"
license = {text = "MIT"}

[build-system]
requires = ["pdm-backend"]
build-backend = "pdm.backend"

[tool.pdm]
distribution = true

I am then attempting to add the pdm-conda plugin to PDM using:

(python3.10) $ pdm plugin add pdm-conda

But I am getting the error of:

Installation failed:
ERROR: Ignored the following versions that require a different python version: 0.10.0 Requires-Python >=3.10; 0.10.0b0 Requires-Python >=3.10; 0.10.0b1 Requires-Python >=3.10; 
0.10.0b2 Requires-Python >=3.10; 0.11.0 Requires-Python ~=3.10.0; 0.11.0b1 Requires-Python ~=3.10.0; 0.11.0b2 Requires-Python ~=3.10.0; 0.11.0b3 Requires-Python ~=3.10.0; 0.12.0 
Requires-Python ~=3.10.0; 0.12.0b1 Requires-Python ~=3.10.0; 0.12.0b2 Requires-Python ~=3.10.0; 0.12.1 Requires-Python ~=3.10.0; 0.12.2 Requires-Python ~=3.10.0; 0.12.2b1 
Requires-Python ~=3.10.0; 0.13.0 Requires-Python ~=3.10.0; 0.14.0 Requires-Python ~=3.10.0; 0.14.0b1 Requires-Python ~=3.10.0; 0.14.1 Requires-Python ~=3.10.0; 0.14.1b1 
Requires-Python ~=3.10.0; 0.14.1b2 Requires-Python ~=3.10.0; 0.14.2 Requires-Python <3.13,>=3.10; 0.14.3 Requires-Python <3.13,>=3.10; 0.15.0 Requires-Python <3.13,>=3.10; 0.16.0 
Requires-Python <3.13,>=3.10; 0.16.0.dev1 Requires-Python <3.13,>=3.10; 0.16.0.dev2 Requires-Python <3.13,>=3.10; 0.16.0.dev3 Requires-Python <3.13,>=3.10; 0.16.1 Requires-Python 
<3.13,>=3.10; 0.16.2 Requires-Python <3.13,>=3.10; 0.16.2.dev1 Requires-Python <3.13,>=3.10; 0.16.3 Requires-Python <3.13,>=3.10; 0.16.3.dev1 Requires-Python <3.13,>=3.10; 0.16.4 
Requires-Python <3.13,>=3.10; 0.16.4.dev1 Requires-Python <3.13,>=3.10; 0.16.4.dev2 Requires-Python <3.13,>=3.10; 0.16.4.dev3 Requires-Python <3.13,>=3.10; 0.16.5 Requires-Python 
<3.13,>=3.10; 0.17.0 Requires-Python <3.13,>=3.10; 0.17.0.dev1 Requires-Python <3.13,>=3.10; 0.17.0.dev2 Requires-Python <3.13,>=3.10; 0.17.0.dev3 Requires-Python <3.13,>=3.10; 
0.17.0.dev4 Requires-Python <3.13,>=3.10; 0.17.1 Requires-Python <3.13,>=3.10; 0.17.2 Requires-Python <3.13,>=3.10; 0.17.3 Requires-Python <3.13,>=3.10; 0.17.4 Requires-Python 
<3.13,>=3.10; 0.17.4.dev1 Requires-Python <3.13,>=3.10; 0.17.5 Requires-Python <3.13,>=3.10; 0.17.5.dev1 Requires-Python <3.13,>=3.10; 0.17.5.dev2 Requires-Python <3.13,>=3.10; 
0.17.5.dev3 Requires-Python <3.13,>=3.10; 0.17.5.dev4 Requires-Python <3.13,>=3.10; 0.17.5.dev5 Requires-Python <3.13,>=3.10; 0.17.5.dev6 Requires-Python <3.13,>=3.10; 0.17.5.dev7
Requires-Python <3.13,>=3.10; 0.17.6 Requires-Python <3.13,>=3.10; 0.18.0 Requires-Python <3.13,>=3.10; 0.18.0.dev1 Requires-Python <3.13,>=3.10; 0.18.0.dev2 Requires-Python 
<3.13,>=3.10; 0.18.0.dev3 Requires-Python <3.13,>=3.10; 0.18.1 Requires-Python <3.13,>=3.10; 0.18.2 Requires-Python <3.13,>=3.10; 0.18.3 Requires-Python <3.13,>=3.10; 0.2.0 
Requires-Python >=3.10; 0.3.0 Requires-Python >=3.10; 0.3.1 Requires-Python >=3.10; 0.4.0 Requires-Python >=3.10; 0.5.0 Requires-Python >=3.10; 0.5.1 Requires-Python >=3.10; 0.5.2
Requires-Python >=3.10; 0.5.3 Requires-Python >=3.10; 0.6.0 Requires-Python >=3.10; 0.7.0 Requires-Python >=3.10; 0.7.0b1 Requires-Python >=3.10; 0.7.0b2 Requires-Python >=3.10; 
0.7.1 Requires-Python >=3.10; 0.7.1b0 Requires-Python >=3.10; 0.8.0 Requires-Python >=3.10; 0.8.0b0 Requires-Python >=3.10; 0.8.1 Requires-Python >=3.10; 0.8.1b0 Requires-Python 
>=3.10; 0.8.1b1 Requires-Python >=3.10; 0.8.1b2 Requires-Python >=3.10; 0.8.1b3 Requires-Python >=3.10; 0.9.0 Requires-Python >=3.10; 0.9.0b0 Requires-Python >=3.10; 0.9.0b1 
Requires-Python >=3.10; 0.9.0b2 Requires-Python >=3.10; 0.9.1 Requires-Python >=3.10; 0.9.1b0 Requires-Python >=3.10; 0.9.1b1 Requires-Python >=3.10; 0.9.2 Requires-Python >=3.10;
0.9.2b0 Requires-Python >=3.10; 0.9.2b1 Requires-Python >=3.10; 0.9.3 Requires-Python >=3.10; 0.9.3b0 Requires-Python >=3.10; 0.9.3b1 Requires-Python >=3.10
ERROR: Could not find a version that satisfies the requirement pdm-conda (from versions: none)
ERROR: No matching distribution found for pdm-conda
macro128 commented 1 month ago

Hi! This happens because right now all pdm-conda versions are incompatible with pdm>=2.17.0, the next plugin release will fix this issue

ssghost commented 3 days ago

Do you still have a project to make pdm-conda compatible with pdm>=2.17.0? Unfortunately, pdm has deleted all older versions (left only the newest 2.18.2) in its Github repo and Homebrew cask. I accidentally upgraded to the newest version and unable to use pdm-conda anymore because there's no way to downgrade pdm now.

macro128 commented 2 days ago

Hi! Yes, I'm working on it currently, it's taking me a while cuz I have to make several changes to adapt the plugin to the new cross platform system, the good news is, when it's done we will be able to have cross platform conda locks.