Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Very hard to install #12

Open
Kyu opened this issue Apr 30, 2017 · 1 comment
Open

Very hard to install #12

Kyu opened this issue Apr 30, 2017 · 1 comment

Comments

@Kyu
Copy link

Kyu commented Apr 30, 2017

Actually, kinda impossible, since it's asking me for a file that doesn't exist.

If I try to do it on python 2 (using pip), I get:

Installing collected packages: oursql
  Running setup.py install for oursql ... error
    Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-XIVjbY/oursql/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-2M8E04-record/install-record.txt --single-version-externally-managed --compile:
    cython not found, using previously-cython'd .c file.
    running install
    running build
    running build_ext
    building 'oursql' extension
    mysql_config --cflags
    creating build
    creating build/temp.linux-x86_64-2.7
    creating build/temp.linux-x86_64-2.7/oursqlx
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-lMBuS3/python2.7-2.7.12=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c oursqlx/oursql.c -o build/temp.linux-x86_64-2.7/oursqlx/oursql.o -I/usr/include/mysql
    oursqlx/oursql.c:8:22: fatal error: pyconfig.h: No such file or directory
     #include "pyconfig.h"
                          ^
    compilation terminated.
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
    
    ----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-XIVjbY/oursql/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-2M8E04-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-XIVjbY/oursql/

On py3 it's

ubuntu@Human:~/oursql-py3k$ python setup.py build_ext
cython not found, using previously-cython'd .c file.
running build_ext
building 'oursql' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/oursqlx
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-lMBuS3/python2.7-2.7.12=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c oursqlx/oursql.c -o build/temp.linux-x86_64-2.7/oursqlx/oursql.o
x86_64-linux-gnu-gcc: error: oursqlx/oursql.c: No such file or directory
x86_64-linux-gnu-gcc: fatal error: no input files
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

I'm installing from source here because 0488d1d wasn't applied to the py3k branch.

@phdru
Copy link

phdru commented Jan 15, 2018

pyconfig.h is a file from Python sources. Could be installed with python-dev package. I have two of them:

/usr/include/python2.7/pyconfig.h
/usr/include/python3.4m/pyconfig.h

I forked oursql and applied commit 0488d1d as a part of PR #6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants