1

From my understanding, mysql isn't compatible with Python 3. I've tried several methods on Google to downgrade my version of Python, like run

conda install python=2.7.12 

But this didn't work. I specifically need to use mySQL as I'm trying to run RepeatModeler (bioinformatics tool) to analyze some genomic data. Can anyone help with this? I've been trying to solve this problem for awhile. Thanks!

2
  • Even thought the command you ran might have installed the said version, it wouldn't make the system see the installed version. You might want to look into python path, and if possible, separately for SQL. (last part might not be correct.) Also list the things you tried to avoid repeated suggestions.
    – user1038202
    Commented Sep 24, 2019 at 23:52
  • 1
    If you need to downgrade Python, you are doing something wrong: the end-of-life for Python 2 is Jan 1, 2020 and it's won't be supported and projects will drop support for Python 2. I'm also curious on why you need Python 2 for MySQL, as far as I'm aware, MySQL already supports Python 3 for long time. Regarding the question: please, provide more information on you environment: OS and version, Python installation and related version.
    – m0nhawk
    Commented Sep 25, 2019 at 1:20

1 Answer 1

3

You don't.

Python 2 and 3 are actually different languages/runtimes

If you call python it is python2, and if you need python 3 its python 3.

on ubuntu 18.04 for example

invoking python directly gives you

geek@heckate_router:~$ python
Python 2.7.15+ (default, Jul  9 2019, 16:51:35)
[GCC 7.4.0] on linux2

While python3

gives you

geek@heckate_router:~$ python3
Python 3.6.8 (default, Aug 20 2019, 17:12:48)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.

Basically python 2 and 3 can and do co-exist. Unless you need a specific version, in which case you may want something like virtualenv. Setting that up is some what out of the scope of my answer

As for mysql

Installing the mysql server metapackage installs the following packages

The following additional packages will be installed:
  libcgi-fast-perl libcgi-pm-perl libevent-core-2.1-6 libfcgi-perl
  libhtml-template-perl mysql-client-5.7 mysql-client-core-5.7
  mysql-server-5.7 mysql-server-core-5.7

There's no requirement for python at all for it. There seem to be python and python 3 libraries for mysql ... but looking at repeatmodeler's github page, it seems perl based with no python prerequisites.

Practically you're looking at the problem the wrong way.

Interestingly that github page says

WARNING: There is a bioconda and a docker package floating around proporting to have a functional RepeatModeler package. Neither work correctly. For the time being we recommend installing this program as described below.

So the issue might be elsewhere - possibly with the anaconda repo you are using.

1
  • Hey, thank you for your response! Been a bit busy so I'm just now able to respond back. I figured MySQL wasn't compatible, because I googled it, but when trying to re-Google it, I believe I misinterpretted the results because I can't find what I thought I read. The main problem I'm having I guess is that I don't know how to get my username, host name, and database for MySQL, because that's what RepeatModeler is asking for so I can run through the tutorial Commented Sep 27, 2019 at 21:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .