How to install mysqlclient v2.0.1 in anaconda/conda

Question:

I try to install mysqlclient v2.0.1 in anaconda/conda

conda install -n py37 mysqlclient=2.0.1
or
conda install -c "conda-forge/label/cf202003" -n py37 mysqlclient=2.0.1

But I get such error message:

Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.  

PackagesNotFoundError: The following packages are not available from current channels:

  - mysqlclient=2.0.1

Current channels:

  - https://repo.anaconda.com/pkgs/main/win-64
  - https://repo.anaconda.com/pkgs/main/noarch
  - https://repo.anaconda.com/pkgs/r/win-64
  - https://repo.anaconda.com/pkgs/r/noarch
  - https://repo.anaconda.com/pkgs/msys2/win-64
  - https://repo.anaconda.com/pkgs/msys2/noarch

To search for alternate channels that may provide the conda package you're
looking for, navigate to

    https://anaconda.org

and use the search bar at the top of the page

Where am i wrong and how to fix it ?

Asked By: Kiryl Vinahradau

||

Answers:

Conda Forge has never built mysqlclient for win-64 platform, and Anaconda seems to have given up on the Windows builds after 1.3.14 (~3 years ago). Thus, one cannot install v2.0.1 as a Conda package.

Perhaps consider using the MySQL Connector/Python package instead, which goes by mysql-connector-python and is building for all platforms on both the defaults and conda-forge channels:

conda install mysql-connector-python

Otherwise, if insisting on mysqlclient=2.0.1, one could install it with pip install with the environment active.

Answered By: merv
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.