Enviroment.yml file? scvi installation problems

Hi,
I’m having trouble installing the scvi-tools. Anyone care to share an enviroment.yml file?
Installs successfully, but fails during imports (ex pandas, pydantic). Below is my enviroment.yml file
Thank you

name: single-cell
channels:

  • anaconda
  • pytorch
  • bioconda
  • conda-forge
    dependencies:
  • _libgcc_mutex=0.1=conda_forge
  • _openmp_mutex=4.5=2_kmp_llvm
  • adjusttext=0.7.3.1=py_1
  • aiohttp=3.8.5=py310h2372a71_0
  • aiosignal=1.3.1=pyhd8ed1ab_0
  • airr=1.5.0=pyh7cba7a3_0
  • anndata=0.9.2=pyhd8ed1ab_0
  • annotated-types=0.5.0=pyhd8ed1ab_0
  • arpack=3.8.0=nompi_h0baa96a_101
  • async-timeout=4.0.3=pyhd8ed1ab_0
  • attrs=23.1.0=pyh71513ae_1
  • awkward=2.4.4=pyhd8ed1ab_0
  • awkward-cpp=24=py310hd41b1e2_0
  • aws-c-auth=0.7.4=hc8144f4_1
  • aws-c-cal=0.6.2=h09139f6_2
  • aws-c-common=0.9.3=hd590300_0
  • aws-c-compression=0.2.17=h184a658_3
  • aws-c-event-stream=0.3.2=hd6ebb48_1
  • aws-c-http=0.7.13=hc690213_1
  • aws-c-io=0.13.32=h63140e9_5
  • aws-c-mqtt=0.9.6=h32970c0_2
  • aws-c-s3=0.3.17=hb5e3142_3
  • aws-c-sdkutils=0.1.12=h184a658_2
  • aws-checksums=0.1.17=h184a658_2
  • aws-crt-cpp=0.23.1=h94c364a_5
  • aws-sdk-cpp=1.11.156=h6600424_3
  • binutils_impl_linux-64=2.40=hf600244_0
  • blas=2.116=mkl
  • blas-devel=3.9.0=16_linux64_mkl
  • bokeh=3.2.2=pyhd8ed1ab_0
  • brotli=1.1.0=hd590300_1
  • brotli-bin=1.1.0=hd590300_1
  • brotli-python=1.1.0=py310hc6cd4ac_1
  • bzip2=1.0.8=h7f98852_4
  • c-ares=1.19.1=hd590300_0
  • ca-certificates=2023.7.22=hbcca054_0
  • cached-property=1.5.2=hd8ed1ab_1
  • cached_property=1.5.2=pyha770c72_1
  • certifi=2023.7.22=pyhd8ed1ab_0
  • charset-normalizer=3.2.0=pyhd8ed1ab_0
  • click=8.1.7=unix_pyh707e725_0
  • cloudpickle=2.2.1=pyhd8ed1ab_0
  • colorama=0.4.6=pyhd8ed1ab_0
  • contourpy=1.1.1=py310hd41b1e2_1
  • cuda-version=11.7=h67201e3_2
  • cudatoolkit=11.7.1=h4bc3d14_12
  • cudnn=8.8.0.121=h838ba91_3
  • cycler=0.12.0=pyhd8ed1ab_0
  • cytoolz=0.12.2=py310h2372a71_1
  • dask=2023.9.3=pyhd8ed1ab_0
  • dask-core=2023.9.3=pyhd8ed1ab_0
  • dask-image=2023.8.1=pyhd8ed1ab_0
  • distributed=2023.9.3=pyhd8ed1ab_0
  • docrep=0.3.2=pyh44b312d_0
  • entrypoints=0.4=pyhd8ed1ab_0
  • et_xmlfile=1.1.0=pyhd8ed1ab_0
  • ffmpeg=4.3=hf484d3e_0
  • filelock=3.12.4=pyhd8ed1ab_0
  • fonttools=4.43.0=py310h2372a71_0
  • freetype=2.12.1=h267a509_2
  • frozenlist=1.4.0=py310h2372a71_1
  • fsspec=2023.9.2=pyh1a96a4e_0
  • gcc=13.2.0=h574f8da_2
  • gcc_impl_linux-64=13.2.0=h338b0a0_2
  • gflags=2.2.2=he1b5a44_1004
  • glog=0.6.0=h6f12383_0
  • glpk=5.0=h445213a_0
  • gmp=6.2.1=h58526e2_0
  • gmpy2=2.1.2=py310h3ec546c_1
  • gnutls=3.6.13=h85f3911_1
  • h5py=3.9.0=nompi_py310ha2ad45a_103
  • hdf5=1.14.2=nompi_h4f84152_100
  • icu=73.2=h59595ed_0
  • idna=3.4=pyhd8ed1ab_0
  • igraph=0.10.7=h66a01bf_1
  • imagecodecs-lite=2019.12.3=py310h1f7b6fc_7
  • importlib-metadata=6.8.0=pyha770c72_0
  • importlib_metadata=6.8.0=hd8ed1ab_0
  • inflect=7.0.0=pyhd8ed1ab_0
  • jax=0.4.16=pyhd8ed1ab_0
  • jaxlib=0.4.14=cuda112py310hb0456fb_201
  • jinja2=3.1.2=pyhd8ed1ab_1
  • joblib=1.3.2=pyhd8ed1ab_0
  • jpeg=9e=h166bdaf_2
  • kernel-headers_linux-64=2.6.32=he073ed8_16
  • keyutils=1.6.1=h166bdaf_0
  • kiwisolver=1.4.5=py310hd41b1e2_1
  • krb5=1.21.2=h659d440_0
  • lame=3.100=h166bdaf_1003
  • lazy_loader=0.3=pyhd8ed1ab_0
  • lcms2=2.15=hfd0df8a_0
  • ld_impl_linux-64=2.40=h41732ed_0
  • leidenalg=0.10.1=py310hc6cd4ac_0
  • lerc=4.0.0=h27087fc_0
  • libabseil=20230802.1=cxx17_h59595ed_0
  • libaec=1.1.1=h59595ed_0
  • libarrow=13.0.0=h1935d02_5_cpu
  • libblas=3.9.0=16_linux64_mkl
  • libbrotlicommon=1.1.0=hd590300_1
  • libbrotlidec=1.1.0=hd590300_1
  • libbrotlienc=1.1.0=hd590300_1
  • libcblas=3.9.0=16_linux64_mkl
  • libcrc32c=1.1.2=h9c3ff4c_0
  • libcurl=8.3.0=hca28451_0
  • libdeflate=1.17=h0b41bf4_0
  • libedit=3.1.20191231=he28a2e2_2
  • libev=4.33=h516909a_1
  • libevent=2.1.12=hf998b51_1
  • libffi=3.4.2=h7f98852_5
  • libgcc-devel_linux-64=13.2.0=ha9c7c90_2
  • libgcc-ng=13.2.0=h807b86a_2
  • libgfortran-ng=13.2.0=h69a702a_2
  • libgfortran5=13.2.0=ha4646dd_2
  • libgomp=13.2.0=h807b86a_2
  • libgoogle-cloud=2.12.0=h8d7e28b_2
  • libgrpc=1.57.0=ha4d0f93_1
  • libhwloc=2.9.3=default_h554bfaf_1009
  • libiconv=1.17=h166bdaf_0
  • libjpeg-turbo=2.0.0=h9bf148f_0
  • liblapack=3.9.0=16_linux64_mkl
  • liblapacke=3.9.0=16_linux64_mkl
  • libleidenalg=0.11.1=h00ab1b0_0
  • libllvm14=14.0.6=hcd5def8_4
  • libnghttp2=1.52.0=h61bc06f_0
  • libnsl=2.0.0=hd590300_1
  • libnuma=2.0.16=h0b41bf4_1
  • libpng=1.6.39=h753d276_0
  • libprotobuf=4.23.4=hf27288f_6
  • libsanitizer=13.2.0=h7e041cc_2
  • libsqlite=3.43.0=h2797004_0
  • libssh2=1.11.0=h0841786_0
  • libstdcxx-ng=13.2.0=h7e041cc_2
  • libthrift=0.19.0=hb90f79a_1
  • libtiff=4.5.0=h6adf6a1_2
  • libutf8proc=2.8.0=h166bdaf_0
  • libuuid=2.38.1=h0b41bf4_0
  • libwebp-base=1.3.2=hd590300_0
  • libxcb=1.13=h7f98852_1004
  • libxml2=2.11.5=h232c23b_1
  • libzlib=1.2.13=hd590300_5
  • llvm-openmp=15.0.7=h0cdce71_0
  • locket=1.0.0=pyhd8ed1ab_0
  • lz4=4.3.2=py310h350c4a5_1
  • lz4-c=1.9.4=hcb278e6_0
  • markupsafe=2.1.3=py310h2372a71_1
  • matplotlib-base=3.8.0=py310h62c0568_1
  • matplotlib-scalebar=0.8.1=pyhd8ed1ab_0
  • mkl=2022.1.0=h84fe81f_915
  • mkl-devel=2022.1.0=ha770c72_916
  • mkl-include=2022.1.0=h84fe81f_915
  • ml_dtypes=0.2.0=py310hcc13569_2
  • mpc=1.3.1=hfe3b2da_0
  • mpfr=4.2.0=hb012696_0
  • mpmath=1.3.0=pyhd8ed1ab_0
  • msgpack-python=1.0.6=py310hd41b1e2_0
  • mudata=0.2.3=pyhd8ed1ab_0
  • multidict=6.0.4=py310h1fa729e_0
  • munkres=1.0.7=py_1
  • natsort=8.4.0=pyhd8ed1ab_0
  • nccl=2.19.3.1=h0800d71_0
  • ncurses=6.4=hcb278e6_0
  • nettle=3.6=he412f7d_0
  • networkx=3.1=pyhd8ed1ab_0
  • nose=1.3.7=py_1006
  • numcodecs=0.11.0=py310heca2aa9_1
  • omnipath=1.0.7=pyhd8ed1ab_0
  • openh264=2.1.1=h780b84a_0
  • openjpeg=2.5.0=hfec8fc6_2
  • openpyxl=3.0.10=py310h5eee18b_0
  • openssl=3.1.3=hd590300_0
  • opt-einsum=3.0.0=py_0
  • orc=1.9.0=h52d3b3c_2
  • packaging=23.2=pyhd8ed1ab_0
  • pandas=2.1.1=py310hcc13569_1
  • parasail-python=1.3.4=py310h6cc9453_0
  • partd=1.4.1=pyhd8ed1ab_0
  • patsy=0.5.3=pyhd8ed1ab_0
  • pillow=9.4.0=py310h023d228_1
  • pims=0.6.1=pyhd8ed1ab_1
  • pip=23.2.1=pyhd8ed1ab_0
  • platformdirs=3.11.0=pyhd8ed1ab_0
  • pooch=1.7.0=pyhd8ed1ab_4
  • psutil=5.9.5=py310h2372a71_1
  • pthread-stubs=0.4=h36c2ea0_1001
  • pynndescent=0.5.10=pyh1a96a4e_0
  • pyparsing=3.1.1=pyhd8ed1ab_0
  • pysocks=1.7.1=pyha2e5f31_6
  • python=3.10.12=hd12c33a_0_cpython
  • python-dateutil=2.8.2=pyhd8ed1ab_0
  • python-igraph=0.10.8=py310h1e3ba49_1
  • python-levenshtein=0.12.0=0
  • python-tzdata=2023.3=pyhd8ed1ab_0
  • python_abi=3.10=4_cp310
  • pytorch=2.1.0=py3.10_cpu_0
  • pytorch-mutex=1.0=cpu
  • pytz=2023.3.post1=pyhd8ed1ab_0
  • pywavelets=1.4.1=py310h1f7b6fc_1
  • pyyaml=6.0.1=py310h2372a71_1
  • rdma-core=28.9=h59595ed_1
  • re2=2023.03.02=h8c504da_0
  • readline=8.2=h8228510_1
  • requests=2.31.0=pyhd8ed1ab_0
  • s2n=1.3.52=h06160fa_0
  • scanpy=1.9.5=pyhd8ed1ab_0
  • scikit-image=0.20.0=py310h9b08913_1
  • scikit-learn=1.3.1=py310h1fdf081_0
  • scirpy=0.13.1=pyhdfd78af_0
  • seaborn=0.13.0=hd8ed1ab_0
  • seaborn-base=0.13.0=pyhd8ed1ab_0
  • session-info=1.0.0=pyhd8ed1ab_0
  • setuptools=68.2.2=pyhd8ed1ab_0
  • six=1.16.0=pyh6c4a22f_0
  • slicerator=1.1.0=pyhd8ed1ab_0
  • snappy=1.1.10=h9fff704_0
  • sortedcontainers=2.4.0=pyhd8ed1ab_0
  • squarify=0.4.3=py_0
  • statsmodels=0.14.0=py310h278f3c1_1
  • sympy=1.12=pypyh9d50eac_103
  • sysroot_linux-64=2.12=he073ed8_16
  • tblib=2.0.0=pyhd8ed1ab_0
  • texttable=1.7.0=pyhd8ed1ab_0
  • threadpoolctl=3.2.0=pyha21a80b_0
  • tk=8.6.13=h2797004_0
  • toolz=0.12.0=pyhd8ed1ab_0
  • torchaudio=2.1.0=py310_cpu
  • torchvision=0.16.0=py310_cpu
  • tornado=6.3.3=py310h2372a71_1
  • tqdm=4.66.1=pyhd8ed1ab_0
  • typing-extensions=4.8.0=hd8ed1ab_0
  • typing_extensions=4.8.0=pyha770c72_0
  • tzdata=2023c=h71feb2d_0
  • ucx=1.14.1=h64cca9d_5
  • umap-learn=0.5.4=py310hff52083_0
  • unicodedata2=15.1.0=py310h2372a71_0
  • validators=0.22.0=pyhd8ed1ab_0
  • wheel=0.41.2=pyhd8ed1ab_0
  • wrapt=1.15.0=py310h2372a71_1
  • xarray=2023.9.0=pyhd8ed1ab_0
  • xlrd=1.2.0=pyh9f0ad1d_1
  • xorg-libxau=1.0.11=hd590300_0
  • xorg-libxdmcp=1.1.3=h7f98852_0
  • xyzservices=2023.10.0=pyhd8ed1ab_0
  • xz=5.2.6=h166bdaf_0
  • yaml=0.2.5=h7f98852_2
  • yamlordereddictloader=0.4.0=py_0
  • yarl=1.9.2=py310h2372a71_0
  • zarr=2.16.1=pyhd8ed1ab_0
  • zict=3.0.0=pyhd8ed1ab_0
  • zipp=3.17.0=pyhd8ed1ab_0
  • zlib=1.2.13=hd590300_5
  • zstd=1.5.5=hfc55251_0
  • pip:
    • absl-py==2.0.0
    • accessible-pygments==0.0.4
    • aiobotocore==2.5.4
    • aioitertools==0.11.0
    • alabaster==0.7.13
    • annoy==1.17.3
    • anyio==3.7.1
    • appdirs==1.4.4
    • argon2-cffi==23.1.0
    • argon2-cffi-bindings==21.2.0
    • arrow==1.3.0
    • asciitree==0.3.3
    • asttokens==2.4.0
    • async-lru==2.0.4
    • babel==2.13.0
    • backcall==0.2.0
    • backoff==2.2.1
    • beautifulsoup4==4.12.2
    • biopython==1.81
    • biothings-client==0.3.0
    • black==23.9.1
    • bleach==6.0.0
    • blessed==1.20.0
    • botocore==1.31.17
    • cachetools==5.3.1
    • cell2location==0.1.3
    • cellxgene-census==1.6.0
    • cffi==1.16.0
    • cfgv==3.4.0
    • chex==0.1.7
    • comm==0.1.4
    • contextlib2==21.6.0
    • coverage==7.3.2
    • croniter==1.4.1
    • cython==3.0.2
    • dateutils==0.6.12
    • debugpy==1.8.0
    • decorator==5.1.1
    • deepdiff==6.5.0
    • defusedxml==0.7.1
    • diskcache==5.6.3
    • distlib==0.3.7
    • dm-tree==0.1.8
    • docutils==0.17.1
    • etils==1.5.0
    • exceptiongroup==1.1.3
    • execnet==2.0.2
    • executing==2.0.0
    • fastapi==0.103.2
    • fasteners==0.19
    • fastjsonschema==2.18.1
    • flake8==6.1.0
    • flax==0.7.4
    • fqdn==1.5.1
    • future==0.18.3
    • genomepy==0.16.1
    • google-auth==2.23.2
    • google-auth-oauthlib==1.0.0
    • greenlet==3.0.0
    • grpcio==1.59.0
    • h11==0.14.0
    • huggingface-hub==0.17.3
    • hyperopt==0.2.7
    • hypothesis==6.87.1
    • identify==2.5.30
    • imageio==2.31.5
    • imagesize==1.4.1
    • importlib-resources==6.1.0
    • iniconfig==2.0.0
    • inquirer==3.1.3
    • ipykernel==6.25.2
    • ipython==8.16.1
    • ipython-genutils==0.2.0
    • ipywidgets==8.1.1
    • isoduration==20.11.0
    • itsdangerous==2.1.2
    • jedi==0.19.1
    • jmespath==1.0.1
    • json5==0.9.14
    • jsonpointer==2.4
    • jsonschema==4.19.1
    • jsonschema-specifications==2023.7.1
    • jupyter==1.0.0
    • jupyter-cache==0.6.1
    • jupyter-client==8.3.1
    • jupyter-console==6.6.3
    • jupyter-core==5.3.2
    • jupyter-events==0.7.0
    • jupyter-lsp==2.2.0
    • jupyter-server==2.7.3
    • jupyter-server-terminals==0.4.4
    • jupyterlab==4.0.6
    • jupyterlab-pygments==0.2.2
    • jupyterlab-server==2.25.0
    • jupyterlab-widgets==3.0.9
    • latexcodec==2.0.1
    • lightning==2.0.9.post0
    • lightning-cloud==0.5.39
    • lightning-utilities==0.9.0
    • llvmlite==0.39.1
    • loguru==0.7.2
    • loompy==3.0.7
    • markdown==3.4.4
    • markdown-it-py==2.2.0
    • matplotlib-inline==0.1.6
    • mccabe==0.7.0
    • mdit-py-plugins==0.3.5
    • mdurl==0.1.2
    • mistune==3.0.2
    • mizani==0.9.3
    • ml-collections==0.1.1
    • msgpack==1.0.7
    • multipledispatch==1.0.0
    • muon==0.1.5
    • mygene==3.2.2
    • mypy-extensions==1.0.0
    • mysql-connector-python==8.1.0
    • myst-nb==0.17.2
    • myst-parser==0.18.1
    • nbclient==0.7.4
    • nbconvert==7.8.0
    • nbformat==5.9.2
    • nest-asyncio==1.5.8
    • nodeenv==1.8.0
    • norns==0.1.6
    • notebook==7.0.4
    • notebook-shim==0.2.3
    • numba==0.56.4
    • numpy==1.23.5
    • numpy-groupies==0.10.2
    • numpyro==0.13.2
    • oauthlib==3.2.2
    • opencv-python==4.8.1.78
    • optax==0.1.7
    • orbax-checkpoint==0.4.1
    • ordered-set==4.1.0
    • overrides==7.4.0
    • pandocfilters==1.5.0
    • parso==0.8.3
    • pathspec==0.11.2
    • pexpect==4.8.0
    • pickleshare==0.7.5
    • plotnine==0.12.3
    • plottable==0.1.5
    • pluggy==1.3.0
    • pre-commit==3.4.0
    • prometheus-client==0.17.1
    • prompt-toolkit==3.0.39
    • protobuf==4.21.12
    • ptyprocess==0.7.0
    • pure-eval==0.2.2
    • py4j==0.10.9.7
    • pyarrow==13.0.0
    • pyasn1==0.5.0
    • pyasn1-modules==0.3.0
    • pybtex==0.24.0
    • pybtex-docutils==1.0.3
    • pycodestyle==2.11.0
    • pycparser==2.21
    • pydantic==2.1.1
    • pydantic-core==2.4.0
    • pydata-sphinx-theme==0.14.1
    • pyfaidx==0.7.2.2
    • pyflakes==3.1.0
    • pygments==2.16.1
    • pyjwt==2.8.0
    • pymde==0.1.18
    • pyro-api==0.1.2
    • pyro-ppl==1.8.6
    • pytest==7.4.2
    • pytest-asyncio==0.21.1
    • pytest-cov==4.1.0
    • pytest-xdist==3.3.1
    • python-editor==1.0.4
    • python-json-logger==2.0.7
    • python-multipart==0.0.6
    • pytorch-lightning==2.0.9.post0
    • pyzmq==25.1.1
    • qtconsole==5.4.4
    • qtpy==2.4.0
    • ray==2.7.0
    • readchar==4.0.5
    • referencing==0.30.2
    • requests-oauthlib==1.3.1
    • rfc3339-validator==0.1.4
    • rfc3986-validator==0.1.1
    • rich==13.6.0
    • rpds-py==0.10.3
    • rsa==4.9
    • ruff==0.0.292
    • s3fs==2023.9.2
    • scib-metrics==0.4.0
    • scikit-misc==0.3.0
    • scipy==1.10.1
    • scrublet==0.2.3
    • scvi-tools==1.0.3
    • send2trash==1.8.2
    • sniffio==1.3.0
    • snowballstemmer==2.2.0
    • somacore==1.0.4
    • soupsieve==2.5
    • sparse==0.14.0
    • spatialdata==0.0.1
    • sphinx==5.3.0
    • sphinx-autodoc-typehints==1.23.0
    • sphinx-book-theme==1.0.1
    • sphinx-copybutton==0.5.2
    • sphinx-design==0.5.0
    • sphinx-hoverxref==1.3.0
    • sphinxcontrib-applehelp==1.0.7
    • sphinxcontrib-bibtex==2.6.1
    • sphinxcontrib-devhelp==1.0.5
    • sphinxcontrib-htmlhelp==2.0.4
    • sphinxcontrib-jquery==4.1
    • sphinxcontrib-jsmath==1.0.1
    • sphinxcontrib-qthelp==1.0.6
    • sphinxcontrib-serializinghtml==1.1.9
    • sphinxext-opengraph==0.8.2
    • sqlalchemy==2.0.21
    • squidpy==1.3.0
    • stack-data==0.6.3
    • starlette==0.27.0
    • starsessions==1.3.0
    • stdlib-list==0.9.0
    • tabulate==0.9.0
    • tbb==2021.10.0
    • tensorboard==2.14.1
    • tensorboard-data-server==0.7.1
    • tensorboardx==2.6.2.2
    • tensorstore==0.1.45
    • terminado==0.17.1
    • tifffile==2023.9.26
    • tiledb==0.22.3
    • tiledbsoma==1.4.3
    • tinycss2==1.2.1
    • tomli==2.0.1
    • torchmetrics==1.2.0
    • traitlets==5.11.2
    • types-python-dateutil==2.8.19.14
    • uri-template==1.3.0
    • urllib3==1.26.17
    • uvicorn==0.23.2
    • virtualenv==20.24.5
    • wcwidth==0.2.8
    • webcolors==1.13
    • webencodings==0.5.1
    • websocket-client==1.6.3
    • websockets==11.0.3
    • werkzeug==3.0.0
    • widgetsnbextension==4.0.9

Hi, could you share the full traceback of the import error you are getting?

Does this help?

(single-cell) jagraz@UPenn:~$ python
Python 3.10.12 | packaged by conda-forge | (main, Jun 23 2023, 22:40:32) [GCC 12.3.0] on linux
Type “help”, “copyright”, “credits” or “license” for more information.

import scvi
Traceback (most recent call last):
File “”, line 1, in
File “/home/jagraz/miniforge3/envs/single-cell/lib/python3.10/site-packages/scvi/init.py”, line 8, in
from ._settings import settings
File “/home/jagraz/miniforge3/envs/single-cell/lib/python3.10/site-packages/scvi/_settings.py”, line 8, in
from lightning.pytorch import seed_everything
File “/home/jagraz/miniforge3/envs/single-cell/lib/python3.10/site-packages/lightning/init.py”, line 17, in
from lightning.app import storage # noqa: E402
File “/home/jagraz/miniforge3/envs/single-cell/lib/python3.10/site-packages/lightning/app/init.py”, line 24, in
from lightning.app import components # noqa: E402, F401
File “/home/jagraz/miniforge3/envs/single-cell/lib/python3.10/site-packages/lightning/app/components/init.py”, line 1, in
from lightning.app.components.database.client import DatabaseClient
File “/home/jagraz/miniforge3/envs/single-cell/lib/python3.10/site-packages/lightning/app/components/database/init.py”, line 1, in
from lightning.app.components.database.client import DatabaseClient
File “/home/jagraz/miniforge3/envs/single-cell/lib/python3.10/site-packages/lightning/app/components/database/client.py”, line 22, in
from lightning.app.components.database.utilities import _GeneralModel
File “/home/jagraz/miniforge3/envs/single-cell/lib/python3.10/site-packages/lightning/app/components/database/utilities.py”, line 28, in
from pydantic.main import ModelMetaclass
ImportError: cannot import name ‘ModelMetaclass’ from ‘pydantic.main’ (/home/jagraz/miniforge3/envs/single-cell/lib/python3.10/site-packages/pydantic/main.py)

Hmm this is strange, the error should have been patched in Lightning 2.0.6. I think downgrading pydantic to <2.0.0 should work for now, could you try that out?

pip install -U pydantic==1.10.13

I get a different error now:
File “/home/jagraz/miniforge3/envs/scvi-env-p39/lib/python3.9/ctypes/init.py”, line 374, in init
self._handle = _dlopen(self._name, mode)
OSError: libtorch_cuda.so: cannot open shared object file: No such file or directory

This is my installation sequence, see any issues here?
conda create -n scvi-env-p39 python=3.9
conda activate scvi-env-p39
conda install -c anaconda pip
conda install pytorch torchvision torchaudio pytorch-cuda=11.7 -c pytorch -c nvidia
conda install jax jaxlib -c conda-forge
pip install scvi-tools

Perhaps if you share your python environment using the command below, I could try to duplicate yours
conda env create -f single-cell-analysis-environment.yml

I’ve tried using python 3.9 and 3.10, but dont seem to work failing with the same error below. Does installing scVI suppose to be difficult? I’m missing something very simple, but can’t pinpoint.
OSError: libtorch_cuda.so: cannot open shared object file: No such file or directory

conda list torch
-# packages in environment at /home/jagraz/miniforge3/envs/scvi-env-p310:
-#
-# Name Version Build Channel
pytorch-cuda 11.7 h778d358_5 pytorch
pytorch-lightning 2.0.9.post0 pypi_0 pypi
pytorch-mutex 1.0 cuda pytorch
torchaudio 2.0.0 py310_cu117 pytorch
torchmetrics 1.2.0 pypi_0 pypi
torchvision 0.15.0 py310_cu117 pytorch

Using Nvidia RTX A4000

I’ve been fighting this issue for a week. Any suggestions will be greatly appreciated.

Hi, I’ve pasted my environment packages below:

name: scvi-tools-dev
channels:
  - pytorch
  - nvidia
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=conda_forge
  - _openmp_mutex=4.5=2_kmp_llvm
  - blas=2.116=mkl
  - blas-devel=3.9.0=16_linux64_mkl
  - brotli-python=1.1.0=py311hb755f60_0
  - bzip2=1.0.8=h7f98852_4
  - ca-certificates=2023.7.22=hbcca054_0
  - certifi=2023.7.22=pyhd8ed1ab_0
  - charset-normalizer=3.2.0=pyhd8ed1ab_0
  - cuda-cudart=11.8.89=0
  - cuda-cupti=11.8.87=0
  - cuda-libraries=11.8.0=0
  - cuda-nvcc=11.8.89=0
  - cuda-nvrtc=11.8.89=0
  - cuda-nvtx=11.8.86=0
  - cuda-runtime=11.8.0=0
  - ffmpeg=4.3=hf484d3e_0
  - filelock=3.12.4=pyhd8ed1ab_0
  - freetype=2.12.1=h267a509_2
  - gmp=6.2.1=h58526e2_0
  - gmpy2=2.1.2=py311h6a5fa03_1
  - gnutls=3.6.13=h85f3911_1
  - icu=73.2=h59595ed_0
  - idna=3.4=pyhd8ed1ab_0
  - jinja2=3.1.2=pyhd8ed1ab_1
  - jpeg=9e=h0b41bf4_3
  - lame=3.100=h166bdaf_1003
  - lcms2=2.15=hfd0df8a_0
  - ld_impl_linux-64=2.40=h41732ed_0
  - lerc=4.0.0=h27087fc_0
  - libblas=3.9.0=16_linux64_mkl
  - libcblas=3.9.0=16_linux64_mkl
  - libcublas=11.11.3.6=0
  - libcufft=10.9.0.58=0
  - libcufile=1.7.2.10=0
  - libcurand=10.3.3.141=0
  - libcusolver=11.4.1.48=0
  - libcusparse=11.7.5.86=0
  - libdeflate=1.17=h0b41bf4_0
  - libexpat=2.5.0=hcb278e6_1
  - libffi=3.4.2=h7f98852_5
  - libgcc-ng=13.2.0=h807b86a_1
  - libgfortran-ng=13.2.0=h69a702a_1
  - libgfortran5=13.2.0=ha4646dd_1
  - libgomp=13.2.0=h807b86a_1
  - libhwloc=2.9.2=default_h554bfaf_1009
  - libiconv=1.17=h166bdaf_0
  - liblapack=3.9.0=16_linux64_mkl
  - liblapacke=3.9.0=16_linux64_mkl
  - libnpp=11.8.0.86=0
  - libnsl=2.0.0=h7f98852_0
  - libnvjpeg=11.9.0.86=0
  - libpng=1.6.39=h753d276_0
  - libsqlite=3.43.0=h2797004_0
  - libstdcxx-ng=13.2.0=h7e041cc_1
  - libtiff=4.5.0=h6adf6a1_2
  - libuuid=2.38.1=h0b41bf4_0
  - libwebp-base=1.3.2=hd590300_0
  - libxcb=1.13=h7f98852_1004
  - libxml2=2.11.5=h232c23b_1
  - libzlib=1.2.13=hd590300_5
  - llvm-openmp=16.0.6=h4dfa4b3_0
  - markupsafe=2.1.3=py311h459d7ec_0
  - mkl=2022.1.0=h84fe81f_915
  - mkl-devel=2022.1.0=ha770c72_916
  - mkl-include=2022.1.0=h84fe81f_915
  - mpc=1.3.1=hfe3b2da_0
  - mpfr=4.2.0=hb012696_0
  - mpmath=1.3.0=pyhd8ed1ab_0
  - ncurses=6.4=hcb278e6_0
  - nettle=3.6=he412f7d_0
  - networkx=3.1=pyhd8ed1ab_0
  - openh264=2.1.1=h780b84a_0
  - openjpeg=2.5.0=hfec8fc6_2
  - openssl=3.1.3=hd590300_0
  - pillow=9.4.0=py311h50def17_1
  - pip=23.2.1=pyhd8ed1ab_0
  - pthread-stubs=0.4=h36c2ea0_1001
  - pysocks=1.7.1=pyha2e5f31_6
  - python=3.11.5=hab00c5b_0_cpython
  - python_abi=3.11=4_cp311
  - pytorch=2.0.1=py3.11_cuda11.8_cudnn8.7.0_0
  - pytorch-cuda=11.8=h7e8668a_5
  - pytorch-mutex=1.0=cuda
  - readline=8.2=h8228510_1
  - requests=2.31.0=pyhd8ed1ab_0
  - setuptools=68.2.2=pyhd8ed1ab_0
  - sympy=1.12=pypyh9d50eac_103
  - tk=8.6.12=h27826a3_0
  - torchaudio=2.0.2=py311_cu118
  - torchtriton=2.0.0=py311
  - torchvision=0.15.2=py311_cu118
  - typing_extensions=4.8.0=pyha770c72_0
  - wheel=0.41.2=pyhd8ed1ab_0
  - xorg-libxau=1.0.11=hd590300_0
  - xorg-libxdmcp=1.1.3=h7f98852_0
  - xz=5.2.6=h166bdaf_0
  - zlib=1.2.13=hd590300_5
  - zstd=1.5.5=hfc55251_0
  - pip:
      - absl-py==2.0.0
      - accessible-pygments==0.0.4
      - aiobotocore==2.5.4
      - aiohttp==3.8.5
      - aioitertools==0.11.0
      - aiosignal==1.3.1
      - alabaster==0.7.13
      - anndata==0.10.1
      - annotated-types==0.5.0
      - anyio==3.7.1
      - appdirs==1.4.4
      - argon2-cffi==23.1.0
      - argon2-cffi-bindings==21.2.0
      - array-api-compat==1.4
      - arrow==1.2.3
      - asttokens==2.4.0
      - async-lru==2.0.4
      - async-timeout==4.0.3
      - attrs==23.1.0
      - babel==2.12.1
      - backcall==0.2.0
      - backoff==2.2.1
      - beautifulsoup4==4.12.2
      - biopython==1.81
      - biothings-client==0.3.0
      - black==23.9.1
      - bleach==6.0.0
      - blessed==1.20.0
      - botocore==1.31.17
      - cachetools==5.3.1
      - cellxgene-census==1.6.0
      - cffi==1.15.1
      - cfgv==3.4.0
      - chex==0.1.7
      - click==8.1.7
      - cloudpickle==2.2.1
      - colorama==0.4.6
      - comm==0.1.4
      - contextlib2==21.6.0
      - contourpy==1.1.1
      - coverage==7.3.1
      - croniter==1.4.1
      - cycler==0.11.0
      - dateutils==0.6.12
      - debugpy==1.8.0
      - decorator==5.1.1
      - deepdiff==6.5.0
      - defusedxml==0.7.1
      - diskcache==5.6.3
      - distlib==0.3.7
      - dm-tree==0.1.8
      - docrep==0.3.2
      - docutils==0.17.1
      - embedding-scvi==0.0.1
      - etils==1.5.0
      - executing==1.2.0
      - fastapi==0.103.1
      - fastjsonschema==2.18.0
      - flake8==6.1.0
      - flax==0.7.4
      - fonttools==4.42.1
      - fqdn==1.5.1
      - frozenlist==1.4.0
      - fsspec==2023.9.1
      - future==0.18.3
      - genomepy==0.16.1
      - google-auth==2.23.0
      - google-auth-oauthlib==1.0.0
      - greenlet==2.0.2
      - grpcio==1.58.0
      - h11==0.14.0
      - h5py==3.9.0
      - huggingface-hub==0.17.2
      - hyperopt==0.2.7
      - identify==2.5.29
      - igraph==0.10.8
      - imagesize==1.4.1
      - importlib-metadata==6.8.0
      - importlib-resources==6.0.1
      - iniconfig==2.0.0
      - inquirer==3.1.3
      - ipykernel==6.25.2
      - ipython==8.15.0
      - ipython-genutils==0.2.0
      - ipywidgets==8.1.1
      - isoduration==20.11.0
      - itsdangerous==2.1.2
      - jax==0.4.16
      - jaxlib==0.4.16+cuda11.cudnn86
      - jedi==0.19.0
      - jmespath==1.0.1
      - joblib==1.3.2
      - json5==0.9.14
      - jsonpointer==2.4
      - jsonschema==4.19.0
      - jsonschema-specifications==2023.7.1
      - jupyter==1.0.0
      - jupyter-cache==0.6.1
      - jupyter-client==8.3.1
      - jupyter-console==6.6.3
      - jupyter-core==5.3.1
      - jupyter-events==0.7.0
      - jupyter-lsp==2.2.0
      - jupyter-server==2.7.3
      - jupyter-server-terminals==0.4.4
      - jupyterlab==4.0.6
      - jupyterlab-pygments==0.2.2
      - jupyterlab-server==2.25.0
      - jupyterlab-widgets==3.0.9
      - kiwisolver==1.4.5
      - latexcodec==2.0.1
      - lightning==2.0.9
      - lightning-cloud==0.5.38
      - lightning-utilities==0.9.0
      - llvmlite==0.40.1
      - loguru==0.7.2
      - loompy==3.0.7
      - markdown==3.4.4
      - markdown-it-py==2.2.0
      - matplotlib==3.8.0
      - matplotlib-inline==0.1.6
      - mccabe==0.7.0
      - mdit-py-plugins==0.3.5
      - mdurl==0.1.2
      - mistune==3.0.1
      - ml-collections==0.1.1
      - ml-dtypes==0.3.0
      - msgpack==1.0.5
      - mudata==0.2.3
      - multidict==6.0.4
      - multipledispatch==1.0.0
      - mygene==3.2.2
      - mypy-extensions==1.0.0
      - mysql-connector-python==8.1.0
      - myst-nb==0.17.2
      - myst-parser==0.18.1
      - natsort==8.4.0
      - nbclient==0.7.4
      - nbconvert==7.8.0
      - nbformat==5.9.2
      - nest-asyncio==1.5.8
      - nodeenv==1.8.0
      - norns==0.1.6
      - nose==1.3.7
      - notebook==7.0.3
      - notebook-shim==0.2.3
      - numba==0.57.0
      - numpy==1.24.4
      - numpy-groupies==0.9.22
      - numpyro==0.13.0
      - nvidia-cublas-cu11==11.11.3.6
      - nvidia-cuda-cupti-cu11==11.8.87
      - nvidia-cuda-nvcc-cu11==11.8.89
      - nvidia-cuda-nvrtc-cu11==11.8.89
      - nvidia-cuda-runtime-cu11==11.8.89
      - nvidia-cudnn-cu11==8.9.4.25
      - nvidia-cufft-cu11==10.9.0.58
      - nvidia-cusolver-cu11==11.4.1.48
      - nvidia-cusparse-cu11==11.7.5.86
      - oauthlib==3.2.2
      - opt-einsum==3.3.0
      - optax==0.1.7
      - orbax-checkpoint==0.3.5
      - ordered-set==4.1.0
      - overrides==7.4.0
      - packaging==23.1
      - pandas==2.1.0
      - pandocfilters==1.5.0
      - parso==0.8.3
      - pathspec==0.11.2
      - patsy==0.5.3
      - pexpect==4.8.0
      - pickleshare==0.7.5
      - platformdirs==3.10.0
      - plottable==0.1.5
      - pluggy==1.3.0
      - pre-commit==3.4.0
      - prometheus-client==0.17.1
      - prompt-toolkit==3.0.39
      - protobuf==4.21.12
      - psutil==5.9.5
      - ptyprocess==0.7.0
      - pure-eval==0.2.2
      - py4j==0.10.9.7
      - pyarrow==13.0.0
      - pyasn1==0.5.0
      - pyasn1-modules==0.3.0
      - pybtex==0.24.0
      - pybtex-docutils==1.0.3
      - pycodestyle==2.11.0
      - pycparser==2.21
      - pydantic==2.1.1
      - pydantic-core==2.4.0
      - pydata-sphinx-theme==0.14.0
      - pyfaidx==0.7.2.1
      - pyflakes==3.1.0
      - pygments==2.16.1
      - pyjwt==2.8.0
      - pymde==0.1.18
      - pynndescent==0.5.10
      - pyparsing==3.1.1
      - pyro-api==0.1.2
      - pyro-ppl==1.8.6
      - pytest==7.4.2
      - pytest-cov==4.1.0
      - python-dateutil==2.8.2
      - python-editor==1.0.4
      - python-json-logger==2.0.7
      - python-multipart==0.0.6
      - pytorch-lightning==2.0.9
      - pytz==2023.3.post1
      - pyyaml==6.0.1
      - pyzmq==25.1.1
      - qtconsole==5.4.4
      - qtpy==2.4.0
      - ray==2.7.0
      - readchar==4.0.5
      - referencing==0.30.2
      - requests-oauthlib==1.3.1
      - rfc3339-validator==0.1.4
      - rfc3986-validator==0.1.1
      - rich==13.5.3
      - rpds-py==0.10.3
      - rsa==4.9
      - ruff==0.0.290
      - s3fs==2023.9.1
      - scanpy==1.9.5
      - scib-metrics==0.4.0
      - scikit-learn==1.3.0
      - scipy==1.10.1
      - scvi-tools==1.0.3
      - seaborn==0.12.2
      - send2trash==1.8.2
      - session-info==1.0.0
      - six==1.16.0
      - sniffio==1.3.0
      - snowballstemmer==2.2.0
      - somacore==1.0.4
      - soupsieve==2.5
      - sparse==0.14.0
      - sphinx==5.3.0
      - sphinx-autodoc-typehints==1.23.0
      - sphinx-book-theme==1.0.1
      - sphinx-copybutton==0.5.2
      - sphinx-design==0.5.0
      - sphinx-hoverxref==1.3.0
      - sphinxcontrib-applehelp==1.0.7
      - sphinxcontrib-bibtex==2.6.1
      - sphinxcontrib-devhelp==1.0.5
      - sphinxcontrib-htmlhelp==2.0.4
      - sphinxcontrib-jquery==4.1
      - sphinxcontrib-jsmath==1.0.1
      - sphinxcontrib-qthelp==1.0.6
      - sphinxcontrib-serializinghtml==1.1.9
      - sphinxext-opengraph==0.8.2
      - sqlalchemy==2.0.21
      - stack-data==0.6.2
      - starlette==0.27.0
      - starsessions==1.3.0
      - statsmodels==0.14.0
      - stdlib-list==0.9.0
      - tabulate==0.9.0
      - tbb==2021.10.0
      - tensorboard==2.14.0
      - tensorboard-data-server==0.7.1
      - tensorboardx==2.6.2.2
      - tensorstore==0.1.43
      - terminado==0.17.1
      - texttable==1.6.7
      - threadpoolctl==3.2.0
      - tiledb==0.22.3
      - tiledbsoma==1.4.3
      - tinycss2==1.2.1
      - toolz==0.12.0
      - torchmetrics==1.1.2
      - tornado==6.3.3
      - tqdm==4.66.1
      - traitlets==5.10.0
      - tzdata==2023.3
      - umap-learn==0.5.4
      - uri-template==1.3.0
      - urllib3==1.26.16
      - uvicorn==0.23.2
      - virtualenv==20.24.5
      - wcwidth==0.2.6
      - webcolors==1.13
      - webencodings==0.5.1
      - websocket-client==1.6.3
      - websockets==11.0.3
      - werkzeug==2.3.7
      - widgetsnbextension==4.0.9
      - wrapt==1.15.0
      - xarray==2023.8.0
      - yarl==1.9.2
      - zipp==3.17.0

Hi Mark,
Your enviroment.yml file did not work for either python 3.10 or 3.11. However, I successfully installed scvi using the command below in your Docker file and changing the AnnaData package version

git clone GitHub - scverse/scvi-tools: Deep probabilistic analysis of single-cell omics data
cd scvi-tools
conda create -n scvi-env-p311 python=3.11
conda activate scvi-env-p311
pip install --no-cache-dir “scvi-tools[all]==1.0.3”
conda install -c conda-forge pyarrow
conda install -c conda-forge scanpy python-igraph leidenalg
conda install -c conda-forge anndata=0.9.2

Reference Docker file

Hi @jagraz, glad you were able to figure out the installation. As a side note, I would recommend not installing all optional dependencies of scvi-tools (pip install scvi-tools[all]) unless you really are trying to use all the optional functions in the package, since this can lead to more dependency conflicts. Additionally, if you’re trying to install from source, please use the -e flag in pip install.