Pertpy works fine if install with
pip install pertpy
However when installed from github
gh repo clone theislab/pertpy
cd pertpy
pip install .
When running pertpy.pl.coda.boxplots(), I keep encountering the following error
AttributeError: module 'pertpy.plot' has no attribute 'coda'
The installed packages are as follows
scanpy==1.9.5 anndata==0.10.2 umap==0.5.4 numpy==1.24.4 scipy==1.11.3 pandas==2.1.2 scikit-learn==1.3.2 statsmodels==0.14.0 igraph==0.10.8 pynndescent==0.5.10
The errors occur both in apple silicon macos sonoma and intel linux platform.
The only available plot modules are

Is this because some packages are in conflict? How can I solve this problem?
Dear @hmnzo5gy,
thank you for using pertpy! Could you please try: pip install .[coda]
when installing from source and report back?
Thank you for the response. I tried pip install .[coda]
and pip seem to be not able to find coda.
zsh: no matches found: .[coda]
the pip version I used is pip-23.3.1 in python 3.10 conda environment.
I downgraded the pertpy from 0.6.0 to 0.5.0 and the problem is resolved.
When I install pertpy from source using the latest github deposit the problem was resolved.
2 Likes
Dear all I recently encountered the same issue, I have a Mac M3. However all the solutions here did not work. I can not fix the issue. Thank you for the help. I am using visual study code and a jupyter notebook.
If i use it on agur prediction I also geht the error:
AttributeError: module ‘pertpy.plot’ has no attribute ‘ag’
Package Version
absl-py 2.1.0
adjustText 1.3.0
aiofiles 0.6.0
aiohappyeyeballs 2.4.0
aiohttp 3.7.4
aiosignal 1.3.1
anndata 0.10.8
anndata2ri 1.3.2
anyio 4.2.0
appnope 0.1.3
argon2-cffi 21.3.0
argon2-cffi-bindings 21.2.0
array_api_compat 1.8
arrow 1.3.0
arviz 0.20.0
astropy 7.0.0
astropy-iers-data 0.2025.1.27.0.32.44
astroquery 0.4.9.post1
asttokens 2.0.5
astunparse 1.6.3
async-lru 2.0.4
async-timeout 3.0.1
attrs 23.1.0
Babel 2.11.0
beautifulsoup4 4.12.3
bleach 4.1.0
blitzgsea 1.3.47
Brotli 1.0.9
cached-property 2.0.1
cairocffi 1.7.1
CairoSVG 2.7.1
celltypist 1.6.3
certifi 2024.12.14
cffi 1.16.0
chardet 3.0.4
charset-normalizer 3.3.2
chex 0.1.88
click 8.1.7
cloudpickle 3.1.1
cmd2 1.5.0
coda 0.1.0
colorama 0.4.6
comm 0.2.1
commonmark 0.9.1
contextlib2 21.6.0
contourpy 1.2.1
cssselect2 0.7.0
custom-inherit 2.4.1
cycler 0.12.1
debugpy 1.6.7
decorator 5.1.1
decoupler 1.8.0
defusedxml 0.7.1
dill 0.3.9
dm-tree 0.1.9
dnspython 2.7.0
docrep 0.3.2
equinox 0.11.11
et_xmlfile 2.0.0
ete3 3.1.3
etils 1.9.2
executing 0.8.3
fastjsonschema 2.16.2
fcsparser 0.2.8
filelock 3.13.1
flatbuffers 24.3.25
flax 0.8.5
fonttools 4.53.1
formulaic 1.1.1
formulaic-contrasts 1.0.0
frozenlist 1.4.1
fsspec 2024.6.1
gast 0.6.0
gems 0.4.0
google-pasta 0.2.0
grpcio 1.65.5
h5netcdf 1.5.0
h5py 3.11.0
html5lib 1.1
humanize 4.10.0
idna 2.10
igraph 0.11.6
importlib_resources 6.4.3
inflect 7.5.0
interface-meta 1.3.0
ipykernel 6.28.0
ipython 8.25.0
ipywidgets 8.1.2
jaraco.classes 3.4.0
jaraco.context 6.0.1
jaraco.functools 4.1.0
jax 0.5.0
jaxlib 0.5.0
jaxopt 0.8.3
jaxtyping 0.2.38
jedi 0.19.1
Jinja2 3.0.0
joblib 1.4.2
json5 0.9.6
jsonschema 4.19.2
jsonschema-specifications 2023.7.1
jupyter 1.0.0
jupyter_client 8.6.0
jupyter-console 6.6.3
jupyter_core 5.7.2
jupyter-events 0.10.0
jupyter-lsp 2.2.0
jupyter_server 2.14.1
jupyter_server_terminals 0.4.4
jupyterlab 4.0.11
jupyterlab-pygments 0.1.2
jupyterlab_server 2.25.1
jupyterlab-widgets 3.0.10
keras 3.5.0
keyring 25.6.0
kiwisolver 1.4.5
lamin_utils 0.13.10
legacy-api-wrap 1.4
legendkit 0.3.4
leidenalg 0.10.2
libclang 18.1.1
lightning 2.1.4
lightning-utilities 0.11.6
lineax 0.0.7
llvmlite 0.43.0
loguru 0.7.3
lxml 5.3.0
Markdown 3.7
markdown-it-py 3.0.0
marker 2.1.5
MarkupSafe 2.1.3
marsilea 0.4.8
matplotlib 3.9.2
matplotlib-inline 0.1.6
matplotlib-venn 1.1.1
mdurl 0.1.2
mellon 1.5.0
mistune 2.0.4
ml_collections 0.1.1
ml-dtypes 0.4.0
more-itertools 10.5.0
mpmath 1.3.0
msgpack 1.0.8
mudata 0.3.0
multidict 6.0.5
multipledispatch 1.0.0
muon 0.1.7
namex 0.0.8
natsort 8.4.0
nbclient 0.8.0
nbconvert 7.10.0
nbformat 5.9.2
ncls 0.0.68
nest-asyncio 1.6.0
networkx 3.3
notebook 7.0.8
notebook_shim 0.2.3
numba 0.60.0
numpy 1.26.4
numpyro 0.15.2
omnipath 1.0.8
openpyxl 3.1.5
opt-einsum 3.3.0
optax 0.2.4
optree 0.12.1
orbax-checkpoint 0.6.0
ott-jax 0.5.0
overrides 7.4.0
packaging 24.1
palantir 1.3.6
pandas 2.2.2
pandocfilters 1.5.0
parso 0.8.3
patsy 0.5.6
pertpy 0.10.0
pexpect 4.8.0
pillow 10.4.0
pip 24.2
platformdirs 3.10.0
ply 3.11
progressbar2 4.5.0
prometheus-client 0.14.1
prompt-toolkit 3.0.43
protobuf 4.25.4
psutil 5.9.0
ptyprocess 0.7.0
PubChemPy 1.0.4
pure-eval 0.2.2
pyarrow 19.0.0
pycparser 2.21
pydeseq2 0.5.0
pyerfa 2.0.1.5
pygam 0.9.1
Pygments 2.15.1
pymongo 4.11.1
pynndescent 0.5.13
Pyomo 6.8.2
pyparsing 3.1.2
PyPDF2 3.0.1
pyperclip 1.9.0
pypng 0.20220715.0
PyQt5 5.15.10
PyQt5-sip 12.13.0
pyranges 0.1.2
pyro-api 0.1.2
pyro-ppl 1.9.1
PySocks 1.7.1
python-dateutil 2.9.0.post0
python-json-logger 2.0.7
python-utils 3.9.1
pytorch-lightning 2.4.0
pytz 2024.1
pyvo 1.6
PyYAML 6.0.1
pyzmq 25.1.2
qtconsole 5.5.1
QtPy 2.4.1
referencing 0.30.2
reportlab 4.2.5
requests 2.25.1
rfc3339-validator 0.1.4
rfc3986-validator 0.1.1
rich 13.9.4
rpds-py 0.10.6
rpy2 3.5.16
ruamel.yaml 0.17.17
scanpy 1.10.2
scCODA 0.1.9
scikit-learn 1.5.1
scikit-misc 0.5.1
scipy 1.11.4
scvi-colab 0.12.0
scvi-tools 1.1.6
seaborn 0.13.2
SEACells 0.3.3
Send2Trash 1.8.2
session_info 1.0.0
setuptools 72.1.0
sip 6.7.12
six 1.16.0
sniffio 1.3.0
sorted_nearest 0.0.39
soupsieve 2.5
sparsecca 0.3.1
stack-data 0.2.0
statsmodels 0.14.2
stdlib-list 0.10.0
svglib 1.5.1
svgpathtools 1.6.1
svgwrite 1.4.3
sympy 1.13.2
tabulate 0.9.0
tensorboard 2.17.1
tensorboard-data-server 0.7.2
tensorflow 2.17.0
tensorflow-probability 0.25.0
tensorstore 0.1.64
termcolor 2.4.0
terminado 0.17.1
texttable 1.7.0
threadpoolctl 3.5.0
tinycss2 1.2.1
toolz 0.12.1
torch 2.4.0
torchaudio 2.4.0.dev20240820
torchmetrics 1.4.1
torchvision 0.20.0.dev20240820
tornado 6.4.1
toyplot 2.0.0
toytree 3.0.9
tqdm 4.66.5
traitlets 5.14.3
typeguard 4.4.1
types-python-dateutil 2.9.0.20241206
typing_extensions 4.12.2
tzdata 2024.1
tzlocal 5.2
umap-learn 0.5.6
urllib3 1.26.20
wadler_lindig 0.1.3
wcwidth 0.2.5
webencodings 0.5.1
websocket-client 1.8.0
Werkzeug 3.0.3
wheel 0.43.0
widgetsnbextension 4.0.10
wrapt 1.16.0
xarray 2025.1.2
xarray-einstats 0.8.0
xlrd 2.0.1
XlsxWriter 3.2.0
yarl 1.9.4
zipp 3.20.0