macro128 / pdm-conda

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

bug: Issue installing PyTorch #28

Open T145 opened 7 months ago

T145 commented 7 months ago
pdm add https://download.pytorch.org/whl/nightly/cu121/torch-2.3.0.dev20240109%2Bcu121-cp310-cp310-win_amd64.whl
Adding packages to default dependencies: torch @ https://download.pytorch.org/whl/nightly/cu121/torch-2.3.0.dev20240109%2Bcu121-cp310-cp310-win_amd64.whl
See C:\Users\user\AppData\Local\Temp\pdm-lock-y6y6oamh.log for detailed debug log.
[CondaResolutionError]: Error resolving requirements with micromamba
nothing provides vc 9.* needed by python-2.7.12-0
WARNING: Add '-v' to see the detailed traceback

I'm using Python 3.10, so what's the problem here? I have micromamba as both the runner and the venv backend.

Praveenabi commented 7 months ago

@T145 , As per log you shared , it shows that it couldn't find visual C++ compiler version 9.0 which is needed by python version 2.7 . Can you try to install vc compiler v9.0 and try again ?

macro128 commented 7 months ago

Hi! Could you show me your pyproject file contents? -------- Mensaje original -------- El 10 ene. 2024, 05:33, T145 escribió:

pdm add https://download.pytorch.org/whl/nightly/cu121/torch-2.3.0.dev20240109%2Bcu121-cp310-cp310-win_amd64.whl Adding packages to default dependencies: torch @ https://download.pytorch.org/whl/nightly/cu121/torch-2.3.0.dev20240109%2Bcu121-cp310-cp310-win_amd64.whl See C:\Users\user\AppData\Local\Temp\pdm-lock-y6y6oamh.log for detailed debug log. [CondaResolutionError]: Error resolving requirements with micromamba nothing provides vc 9.* needed by python-2.7.12-0 WARNING: Add '-v' to see the detailed traceback

I'm using Python 3.10, so what's the problem here? I have micromamba as both the runner and the venv backend.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>

T145 commented 7 months ago

Hi! Could you show me your pyproject file contents? -------- Mensaje original -------- El 10 ene. 2024, 05:33, T145 escribió: pdm add https://download.pytorch.org/whl/nightly/cu121/torch-2.3.0.dev20240109%2Bcu121-cp310-cp310-win_amd64.whl Adding packages to default dependencies: torch @ https://download.pytorch.org/whl/nightly/cu121/torch-2.3.0.dev20240109%2Bcu121-cp310-cp310-win_amd64.whl See C:\Users\user\AppData\Local\Temp\pdm-lock-y6y6oamh.log for detailed debug log. [CondaResolutionError]: Error resolving requirements with micromamba nothing provides vc 9.* needed by python-2.7.12-0 WARNING: Add '-v' to see the detailed traceback I'm using Python 3.10, so what's the problem here? I have micromamba as both the runner and the venv backend. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>

It's barebones, generated w/ python -m pdm init -cr conda -c conda-forge. I've only changed the following settings:

[tool.pdm.conda]
channels = ["nvidia", "pytorch-nightly", "conda-forge", "pypi"]
as-default-manager = true

@T145 , As per log you shared , it shows that it couldn't find visual C++ compiler version 9.0 which is needed by python version 2.7 . Can you try to install vc compiler v9.0 and try again ?

As per the details I shared, I'm using Python 3.10. Therefore, Python 2.7 shouldn't be even remotely related to my project.

macro128 commented 7 months ago

I think that with those settings you should be able to install it running pdm add pytorch, that will invoke conda install pytorch -c nvidia -c pytorch-nightly -c conda-forge -c pypi

Please note that adding the channel pypi won't use pypi as an index (because it doesn't have any packages), if you want to use it you can fill excludes config with pypi only packages or set as-default-manager to false and use flag --conda when running pdm add