question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Installing scvi-tools with conda and with pip

See original GitHub issue

Hi, I am trying to install scvi-tools with conda using conda install scvi-tools -c conda-forge using python 3.8 and also tried with python 3.9

When I import scvi I get the following error: AttributeError: module 'distutils' has no attribute 'version'

I also tried installing scvi-tools with pip: pip install scvi-tools or pip install scvi-tools[tutorials], but got the following error when I import scvi

TypeError: Descriptors cannot not be created directly.
If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
If you cannot immediately regenerate your protos, some other possible workarounds are:
 1. Downgrade the protobuf package to 3.20.x or lower.
 2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).

More information: https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates

How can I install scvi?

Many thanks

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
Nasrine26commented, Jun 2, 2022

Found a workaround by downgrading protobuf package to 3.20.x and now importing scvi works: pip install --upgrade protobuf==3.20.0

0reactions
rimelofcommented, Jun 7, 2022

Started a clean environment and installed 0.16.3 with pip. It works now. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Installation - scvi-tools
scvi-tools can be installed via conda or pip. ... Installing scvi-tools on a Mac with Apple Silicon is only possible using a native...
Read more >
scvi-tools - PyPI
Basic installation. For conda, conda install scvi-tools -c conda-forge. and for pip, pip install scvi-tools. Please be sure to install a version of...
Read more >
Scvi Tools - :: Anaconda.org
conda install. To install this package run one of the following: conda install -c bioconda scvi-tools. Description. By data scientists, for data scientists ......
Read more >
Managing packages - Conda
Installing packages from Anaconda.org ... You can install pip in the current conda environment with the command conda install pip , as discussed...
Read more >
Issue with importing SCVI package into an jupyter ...
[!pip3 install SCVI] [!pip install "scvi-tools[tutorials]"] ... I have tried installing SCVI using brew forge in conda environment.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found