Prajjwal Das
Prajjwal Das

Reputation: 13

Cannot install kwant and matplotlib together

I'm using miniconda3 on a windows 11 machine.

When I try to install matplotlib after installing kwant on a virtual environment, it downgrades the numpy (to 1.26) and kwant (to 1.4) packages for some reason.

When I try to install kwant after installing matplotlib (which by the way installs with numpy-2.1.3), it gives me the following error:

(nanoelec) D:\OneDrive - UCL\Academics\Nanoelectronics>conda install -c conda-forge kwant
Channels:
- conda-forge
- defaults
Platform: win-64
Collecting package metadata (repodata.json): done
Solving environment: - warning  libmamba Added empty dependency for problem type SOLVER_RULE_UPDATE
failed

LibMambaUnsatisfiableError: Encountered problems while solving:
  - package kwant-1.4.3-nompi_py310h7011a7b_101 requires python >=3.10,<3.11.0a0, but none of the providers can be installed

Could not solve for environment specs
The following packages are incompatible
├─ kwant is installable with the potential options
│  ├─ kwant [1.4.0|1.4.0a1|1.4.0rc1|1.4.1|1.4.2] would require
│  │  └─ python >=3.6,<3.7.0a0 , which can be installed;
│  ├─ kwant [1.4.0|1.4.0rc1|1.4.1|1.4.2|1.4.3] would require
│  │  └─ python >=3.7,<3.8.0a0 , which can be installed;
│  ├─ kwant 1.4.0a1 would require
│  │  └─ python >=3.5,<3.6.0a0 , which can be installed;
│  ├─ kwant [1.4.2|1.4.3|1.4.4|1.5.0] would require
│  │  └─ python >=3.9,<3.10.0a0 , which can be installed;
│  ├─ kwant [1.4.2|1.4.3|1.4.4] would require
│  │  └─ python >=3.8,<3.9.0a0 , which can be installed;
│  ├─ kwant [1.4.3|1.4.4|1.5.0] would require
│  │  └─ python >=3.10,<3.11.0a0 , which can be installed;
│  ├─ kwant [1.4.3|1.4.4|1.5.0] would require
│  │  └─ python >=3.11,<3.12.0a0 , which can be installed;
│  └─ kwant [1.4.4|1.5.0] would require
│     └─ python >=3.12,<3.13.0a0 , which can be installed;
└─ pin-1 is not installable because it requires
   └─ python 3.13.* , which conflicts with any installable versions previously reported.

I'm performing these through a terminal inside VS Code if that is relevant. Also by the way:

(nanoelec) D:\OneDrive - UCL\Academics\Nanoelectronics>python --version
Python 3.13.1

Any idea what is happening and what can I do?

Upvotes: 0

Views: 31

Answers (1)

Tzane
Tzane

Reputation: 3472

LibMambaUnsatisfiableError: Encountered problems while solving:
  - package kwant-1.4.3-nompi_py310h7011a7b_101 requires python >=3.10,<3.11.0a0, but none of the providers can be installed

Looks like kwant 1.4.3 requires Python 3.10, so try using that instead

Upvotes: 0

Related Questions