What is a glif_sdk?

hi
I received error

ModuleNotFoundError Traceback (most recent call last)
in <cell line: 6>()
4 import warnings
5 from allensdk.api.queries.glif_api import GlifApi
----> 6 import glif_sdk.lims_utilities as lu
7 from allensdk.core.nwb_data_set import NwbDataSet
8 from allensdk.api.api import Api

ModuleNotFoundError: No module named ‘glif_sdk’

It looks like “glif_sdk” is a directory with a few library files in it in the GLIF_Teeter_et_al_2018 repository, which contains figure generation code for that manuscript.

I think running that code in the same directory as the “glif_sdk” directory could find it; alternatively, you could add it to your Python path.

As a caveat, this is six year old code base that is not being updated (since it is related to figures from paper), so it is, for example, written in Python 2 and likely would require some updating to work with current versions of some of the packages it uses, etc.

thanks
yes this is for article of Teeter.
I don’t know how add it to python path
please help me

You can add the directory in your script before importing it with something like:

import sys
sys.path.append("/path/to/directory/of/.../GLIF_Teeter_et_al_2018/libraries/")

import glif_sdk

If you want to add it to your Python path permanently and you’re using a Linux or Mac OS system, you can modify your .bashrc or .zshrc file like:

export PYTHONPATH = "${PYTHONPATH}:/path/to/directory/of/.../GLIF_Teeter_et_al_2018/libraries/"

You can see e.g. StackOverflow for help: python - Permanently add a directory to PYTHONPATH? - Stack Overflow

thanks, But my problem was not solved

I’m sorry you are still having trouble. If you are trying to simulate GLIFs, you may have more success using the code and instructions from the Allen SDK:
http://alleninstitute.github.io/AllenSDK/glif_models.html

It has information about how to download and run specific models, and the Allen SDK is an actively supported package.