Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail to find the module "libcomcat" after install libcomcat sucessfully #239

Open
sijiasoniachen opened this issue Mar 23, 2021 · 1 comment

Comments

@sijiasoniachen
Copy link

Good afternoon,

I am scraping the USGS Shakemap shape.zip files using Libcomcat. I follow the installation instruction to install libcomcat using "Anaconda Powershell Prompt", the codes are as followed.

_(base) PS C:\Users\sonia> conda create -n comcat --channel conda-forge python=3.8
WARNING: A conda environment already exists at 'C:\Users\sonia\anaconda3\envs\comcat'
Remove existing environment (y/[n])?

CondaSystemExit: Exiting.

(base) PS C:\Users\sonia> conda activate comcat

(comcat) PS C:\Users\sonia>
(comcat) PS C:\Users\sonia> conda config --add channels conda-forge

Warning: 'conda-forge' already in 'channels' list, moving to the top
(comcat) PS C:\Users\sonia>
(comcat) PS C:\Users\sonia> conda install libcomcat

Collecting package metadata (current_repodata.json): done
Solving environment: done

All requested packages already installed.

(comcat) PS C:\Users\sonia>
(comcat) PS C:\Users\sonia>_

However, I fail to find the libcomcat module when starting with Spyder (python 3.8):

_from libcomcat.search import search
Traceback (most recent call last):

File "", line 1, in
from libcomcat.search import search

ModuleNotFoundError: No module named 'libcomcat'_

I have tried to install python for version 3.6, 3.7, and 3.8, but none of them work.

Could you provide any suggestions about this situation?

Thank you!

Sonia

@emthompson-usgs
Copy link
Member

My guess is that this is a virtual environment issue. Before checking on what spyder is doing, try running ipython from within the comcat virtual environment:

conda activate comcat
which ipython
ipython

Let us know what path you get from the second line. Then try to import libcomcat to make sure that it is installed:

import libcomcat

And tell us what happens. If that works, then the issue is probably that you need to run spyder from within the comcat virtual environment. It isn't clear from your post how you opened spyder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants