Issue with streamlit.cli from conda installation
eggrandio opened this issue · 4 comments
Hi,
I have installed pLannotate from conda and I am getting the following error message:
File "(...)/miniconda3/envs/plann/lib/python3.11/site-packages/plannotate/pLannotate.py", line 5, in
import streamlit.cli
ModuleNotFoundError: No module named 'streamlit.cli'
According to this issue in github, it seems that:
"If anyone stumbles across this, the streamlit.cli module was moved to streamlit.web.cli."
Best,
Edit: if I install it with mamba, it gets a different version of streamlit that works. But sometimes I get an error with altair version 5 (if it gets version 4, it works). Maybe "fixing" the versions of streamlit and altair in the recipe should fix the problem?
Hello,
After having hard time in the installation of the tool, I merge some issues discussion to find a solution.
What I did to make it work :
git clone --depth 1 --branch master https://github.com/barricklab/pLannotate.git
cd pLannotate
mamba env create -f environment.yml
mamba activate plannotate
# downgrade to a streamlit version that still works
mamba install streamlit=1.2.0
# fix the requirements.txt by simply overwriting it
echo "" > requirements.txt
Then, to install the blastDB, I had to make one modification on the resources.py script, changing
db_loc = f"https://github.com/barricklab/pLannotate/releases/download/v{plannotate_version.rsplit('.',1)[0]}.0/BLAST_dbs.tar.gz"
into
db_loc = f"https://github.com/mmcguffi/pLannotate/releases/download/v{plannotate_version.rsplit('.',1)[0]}.0/BLAST_dbs.tar.gz"
The problem was (I think) the author changed the git depot, and deplete all olders tags.
Then :
pip install . --no-deps -vv
plannotate setupdb
I'm running plannotate batch so I don't know if plannotate streamlit work with this setup, but I hope it works for you
I think @mmcguffi is working to update the conda install and the other internal links to reflect the repository change.
Very sorry about the trouble @madeleinevlt! I'll push some fixes soon -- you're correct that the git repository changed, which leads to some issues, but it appears other deps are causing problems too, at least via conda installation
One other solution in the meantime (which will also ensure that previous conda installs work) is for @jeffreybarrick to slightly change the url of the barricklab fork so that url will always direct to the new location
Thank you for the investigation and help @eggrandio and @madeleinevlt -- sorry for the headaches this caused. There is a new version of plannotate on conda that works (v1.2.1). I also included automated tests that will run once a month, so if something in the dependencies (or anything else) breaks, at least I'll be warned