question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error : pyodbc : src/pyodbc.h:56:10: fatal error: sql.h: No such file or directory

See original GitHub issue

OS : Windows 10

I cloned the repo and run docker-compose command. When I debugged the code, I had the following error in the backend container;

pyodbc : src/pyodbc.h:56:10: fatal error: sql.h: No such file or directory

It happens in ‘doccano/app/tools/dev-django.sh’ script when installing requirements.

Solution :

At the beginning of ‘doccano/app/tools/dev-django.sh’, I added

##############################
apt install -y gcc make # already installed actually
apt-get install -y build-essential libssl-dev libffi-dev python3-dev
apt-get install -y unixodbc-dev
##############################

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
sahinbatmazcommented, Jun 26, 2020

Thanks then. I don’t know the reason of the problem. I did not change the doccano github code in my local.

So, there should be a difference in [ windows 10, docker, docker-compose, docker image ].

I am closing the issue since it could not be repeated.

If someone somehow encounters such problem, solution is to update the code in https://github.com/doccano/doccano/blob/master/app/tools/dev-django.sh#L17

echo "Installing dependencies"
apt-get update && apt-get install -y g++ unixodbc-dev # pyodbc build dependencies

to

echo "Installing dependencies"
apt-get install -y build-essential libssl-dev libffi-dev python3-dev
apt-get update && apt-get install -y g++ unixodbc-dev # pyodbc build dependencies
0reactions
Hironsancommented, Jun 26, 2020

Thank you for your contribution.

Read more comments on GitHub >

github_iconTop Results From Across the Web

fatal error: sql.h: No such file or directory · Issue #441 - GitHub
Currently trying to install Pyodbc in a Docker file but getting the same error. All the solutions I have seen involve running on...
Read more >
sql.h not found when installing PyODBC on Heroku
I'm trying to install PyODBC on Heroku, but I get fatal error: sql.h: No such file or directory in the logs when pip...
Read more >
sql.h No such file or directory pyodbc - All About Tech
src/pyodbc.h:56:17: fatal error: sql.h: No such file or directory #include In Ubuntu, install the following dependency. sudo apt-get install ...
Read more >
Installing pyobdc - python - Server Fault
This issue can be address by first installing ODBC libraries for UNIX by running following commands: :~$ sudo apt install unixodbc-dev.
Read more >
pip install pyodbc failing - Watercooler | Deepnote Community
I am struggling to use pyodbc package in any Deepnote notebook, after using pip I get ... src/pyodbc.h:56:10: fatal error: sql.h: No such...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found