I'd like to run call_variants.py
from deepvariant
. I was struggling for hours ans hours installing cuda, tensorflow etc... Unfortunately I ran into a problem and I don't know what to do. Let's start from the beginning:
conda create --name tf tensorflow
conda activate tf
python --version
Python 3.7.9
python3 -c 'import tensorflow as tf; print(tf.__version__)'
2.3.0
Now I tried to run the command:
python ${h_dir}/deepvariant/binaries/DeepVariant/1.0.0/DeepVariant-1.0.0/call_variants.zip \
--outfile ${test_dir}/test.gz \
--examples ${ex_dir}/ex_test.gz --checkpoint $model
I got:
Traceback (most recent call last):
File "/tmp/Bazel.runfiles_i55m5mpq/runfiles/com_google_deepvariant/deepvariant/call_variants.py", line 57, in <module>
from deepvariant import modeling
File "/tmp/Bazel.runfiles_i55m5mpq/runfiles/com_google_deepvariant/deepvariant/modeling.py", line 51, in <module>
import tf_slim
ModuleNotFoundError: No module named 'tf_slim'
So of course I decided to install it:
pip install tf_slim
Collecting tf_slim
Using cached tf_slim-1.1.0-py2.py3-none-any.whl (352 kB)
Requirement already satisfied: absl-py>=0.2.2 in ./anaconda3/envs/tf/lib/python3.7/site-packages (from tf_slim) (0.11.0)
Requirement already satisfied: six in ./anaconda3/envs/tf/lib/python3.7/site-packages (from absl-py>=0.2.2->tf_slim) (1.15.0)
Installing collected packages: tf-slim
Successfully installed tf-slim-1.1.0
However:
python3 -c 'import tf_slim as slim; print(slim.__version__)'
Traceback (most recent call last):
File "<string>", line 1, in <module>
AttributeError: module 'tf_slim' has no attribute '__version__'
An of course ModuleNotFoundError: No module named 'tf_slim'
after running the command. So maybe install with conda?
conda install -c conda-forge tf-slim
But it didn't help at all... I have no clue what to do next, looking forward to any ideas!
Edit: When I run something like this:
try:
import tf_slim as slim
print("module 'tf_slim' is installed")
except ModuleNotFoundError:
print("module 'tf_slim' is not installed")
python test.py
module 'tf_slim' is installed
But after command, still ModuleNotFoundError: No module named 'tf_slim'
¯_(ツ)_/¯