I'm using anaconda to learn python, but when I try to install it to use the database, I get an error
% conda install mysql-connector-python
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: \
Found conflicts! Looking for incompatible packages.
This can take several minutes. Press CTRL-C to abort.
failed
UnsatisfiableError: The following specifications were found
to be incompatible with the existing python installation in your environment:
Specifications:
- mysql-connector-python -> python[version='>=2.7,<2.8.0a0|>=3.7,<3.8.0a0|>=3.6,<3.7.0a0|>=3.5,<3.6.0a0']
Your python: python=3.8
If python is on the left-most side of the chain, that's the version you've asked for.
When python appears to the right, that indicates that the thing on the left is somehow
not available for the python version you are constrained to. Note that conda will not
change your python version to a different minor version unless you explicitly specify
that.
I don't know the details, but is it incompatible? Need to specify the version? I feel like it is being said. Please let me know if anyone can understand the details of the error.
conda install -c conda-forge mysql-connector-python
Since Anaconda has few packages, I installed it from the channel called conda-forge.
It seems that it can be installed with pip, but I found multiple articles that it is dangerous to mix anaconda and pip, so I did not use it this time.
(I think it's a good idea to search in the order of conda> conda-forge> pip.)
conda search mysql-connector-python
When you run pkgs/It's on the main channel! I found out that it may be possible to install even if I enter this
I was told that multiple packages were installed when I ran the command, but I wonder if this is a must for using mysql-connector-python
Recommended Posts