Others have asked about this, but my situation seems slightly different, and none of the suggestions they received worked for me (e.g. here, here, here).
I'm using Anaconda Navigator on Windows, and trying to use the "nco" package. I installed it via the Anaconda Navigator, and when (in Spyder) I type conda list nco
it gives me:
conda list nco
# packages in environment at C:\Users\{user}\Anaconda3:
#
# Name Version Build Channel
font-ttf-inconsolata 2.001 hcb22688_0
nco 5.0.6 h5be7ecf_0 conda-forge
webencodings 0.5.1 py39haa95532_1
However, when I type import nco
I get
import nco
Traceback (most recent call last):
File "C:\Users\{user}\AppData\Local\Temp/ipykernel_21968/3374827941.py", line 1, in <module>
import nco
ModuleNotFoundError: No module named 'nco'
I notice that there is no "nco" folder in my C:\Users\{user}\Anaconda3\Lib\site-packages
folder; the only "nco" files are in C:\Users\{user}\Anaconda3\pkgs
, which contains nco-5.0.6-h5be7ecf_0
. I'm not completely sure whether to expect an nco folder in site-packages, but thought I'd mention that there isn't one there there.
I also tried making a new environment, test
(had just been in base
before), and installing nco via the navigator, but conda list nco
gives the same:
conda list nco
# packages in environment at C:\Users\{user}\Anaconda3:
#
# Name Version Build Channel
font-ttf-inconsolata 2.001 hcb22688_0
nco 5.0.6 h5be7ecf_0 conda-forge
webencodings 0.5.1 py39haa95532_1
and import nco still doesn't work.
I've also tried conda update --all
, which ran quickly and updated nco among others, but doesn't change anything with my issue.
I also tried conda clean -p
; it ran for 12 hours before I cancelled it just now; it didn't print any output, but I don't know if I'd expect it to.
Finally, I'm just using 1 version of python, and have only recently installed/started using Anaconda.
(base) C:\>which python
/cygdrive/c/Users/{user}/Anaconda3/python
(base) C:\>which conda
/cygdrive/c/Users/{user}/Anaconda3/Scripts/conda
Any suggestions really appreciated!