Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

python3.6 and mysql do not works together

Mykola Fenyk
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 14, 2019

Hi to all. I have an unexpected problem after git push to my pull-request. 

I have installed mysqlclient ins step: - pip install -r $BITBUCKET_CLONE_DIR/requirements.txt!

On step - python manage.py makemigrations I got next error:

django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: libmariadbclient.so.18: cannot open shared object file: No such file or directory.Did you install mysqlclient or MySQL-python?

my bitbucket.pipeline file

 

image: python:3.6

pipelines:

pull-requests:
'**':
- step:
caches:
- pip
script:
- pip install -r $BITBUCKET_CLONE_DIR/requirements.txt
- export DJANGO_SETTINGS_MODULE=myproject.settings.tests
- cd $BITBUCKET_CLONE_DIR/src
- flake8
- python manage.py makemigrations
- python manage.py migrate
- coverage run --source='.' manage.py test
- coverage report -m
services:
- mysql
- mongo
- redis

definitions:
services:
mysql:
image: mysql:5.7
environment:
MYSQL_DATABASE: my_db
MYSQL_ROOT_PASSWORD: root
mongo:
image: mongo
redis:
image: redis

 

Everything works fine on my local computer!

Can someone help me with this problem?

 

 

1 answer

0 votes
Peter Plewa
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 2, 2019

Hi @Mykola Fenyk

Could you upload logs from the pipeline to help with debugging it?

The error is not pipeline specific and I would make sure first that you can run above steps with the same docker image in your local environment. This is a reference that I found that may be helpful: https://stackoverflow.com/questions/34348752/error-loading-mysqldb-module-libmysqlclient-so-20-cannot-open-shared-object-fi

Thanks,
Peter

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events