So the default of anaconda is python 3.8, but you can invoke python2 by running python2 a_py_script.py
. The issue comes from the fact that you'll need to import things (say biopython), and you can't import them as any conda install -c conda-forge biopython
or pip install biopython
will be understood to automatically slot it into python3.8 packages exclusively.
I ask this because I have some python2.7 scripts that demand packages outside the default install scope and ideally I'd like to do this without having to create a new python=2.7
env and track down everything I need.
I've tried pip2.7 install biopython
and python2.7 -m pip install biopython
to no avail. Could it be that I technically don't have python 2.7 even though I'm able to invoke it from command line via python2
because python3 just naturally has some special limited backwards compatibility to run my python2 scripts? (I did notice that conda list
includes only 3.8 and no mention of 2.7)
I've tried cloning my env but I don't know how to do it in such a way that swapts just the version of python. conda create --name py27test --clone base python=2.7
says too many arguments. I'd like to know if this is even advisible as my base environment I would presume is entirely built off of v3.8 so swapping out the python versions will just be bad time hence why this seems impossible?