I have installed anaconda3 trying to run a certain pipeline but I think I have run into incompatibility errors.
For anaconda I created an enviroment with conda create -n name python=3.6 but it seems like some python files that are running from there are looking towards python 2.7. For example I am getting this error
File "/home/stella/anaconda3/envs/cutruntools2.1/bin/bamCoverage", line 5, in <module>
from deeptools.bamCoverage import main
File "/home/stella/anaconda3/envs/cutruntools2.1/lib/python3.6/site-packages/deeptools/bamCoverage.py", line 8, in <module>
from deeptools import writeBedGraph # This should be made directly into a bigWig
File "/home/stella/anaconda3/envs/cutruntools2.1/lib/python3.6/site-packages/deeptools/writeBedGraph.py", line 9, in <module>
from deeptools.utilities import getCommonChrNames
File "/home/stella/anaconda3/envs/cutruntools2.1/lib/python3.6/site-packages/deeptools/utilities.py", line 4, in <module>
from deeptools.bamHandler import openBam
File "/home/stella/anaconda3/envs/cutruntools2.1/lib/python3.6/site-packages/deeptools/bamHandler.py", line 2, in <module>
import pysam
File "/home/stella/.local/lib/python2.7/site-packages/pysam/__init__.py", line 5, in <module>
from pysam.libchtslib import *
ImportError: /home/stella/.local/lib/python2.7/site-packages/pysam/libchtslib.so: undefined symbol: _Py_ZeroStruct
Also, if I work inside the anaconda environment for example like
conda activate cutruntools2.1
(cutruntools2.1) stella@IBP10382:~$ python
Python 3.6.13 | packaged by conda-forge | (default, Feb 19 2021, 05:36:01)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import deeptools.misc
>>> from deeptools.bamCoverage import main
>>> import sys
I don't seem to be getting import errors as it seems in the first chunk of code. But on python after deactivation, I can't import these modules because it is other version of python. Running the bash command that calls all the python scripts etc from inside the environment doesn't resolve it either.
I would appreciate any comments or where to look for pointing me to the mistake.
Thanks!