Issue
pip install gower
Defaulting to user installation because normal site-packages is not writeable
Looking in links: /usr/share/pip-wheels
Collecting gower
Using cached gower-0.1.2-py3-none-any.whl (5.2 kB)
Requirement already satisfied: scipy in /opt/conda/envs/anaconda-2022.05-py39/lib/python3.9/site-packages (from gower) (1.7.3)
Requirement already satisfied: numpy in /opt/conda/envs/anaconda-2022.05-py39/lib/python3.9/site-packages (from gower) (1.21.5)
Installing collected packages: gower
Successfully installed gower-0.1.2
Note: you may need to restart the kernel to use updated packages.
Thus, it is installed, but it can only be installed with pip, not with conda, and the module cannot be found:
import gower
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
Cell In[3], line 1
----> 1 import gower
ModuleNotFoundError: No module named 'gower'
I also tried installing it with conda then, but it is not in the conda package manager:
conda install gower
Channels:
- defaults
- conda-forge
- pytorch
Platform: linux-64
Collecting package metadata (repodata.json): done
Solving environment: failed
PackagesNotFoundError: The following packages are not available from current channels:
- gower
Current channels:
- defaults
- https://conda.anaconda.org/conda-forge/linux-64
- https://conda.anaconda.org/conda-forge/noarch
- https://conda.anaconda.org/pytorch/linux-64
- https://conda.anaconda.org/pytorch/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.
Note: you may need to restart the kernel to use updated packages.
I am in the same virtual environment all the time during the tests, one that is offered online on Anaconda.com with "anaconda-2022.05-py39". The error is the same when switching to "anaconda-panel-2023.05-py310".
What to do to get import gower
to run?
Solution
As the output of the pip installer says:
Note: you may need to restart the kernel to use updated packages.
I oversaw the note and should also know about it without the note.
When I switched back to the "anaconda-2022.05-py39" virtual environment/kernel, this triggered the needed restart of the kernel, the gower
module was found.
Answered By - questionto42
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.