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

How to run MTT - python : Help with dependencies #522

Open
sachinprabhu007 opened this issue Apr 28, 2017 · 5 comments
Open

How to run MTT - python : Help with dependencies #522

sachinprabhu007 opened this issue Apr 28, 2017 · 5 comments

Comments

@sachinprabhu007
Copy link

sachinprabhu007 commented Apr 28, 2017

Hi

Can someone please assist me in building mtt considering python. I tried to install dependencies i.e pyenv.txt
Also need help regarding ini files.

**OS : centos 7 
python version : 2.7**

I am successful in building openmpi from source code. Needed help with MTT. Any help is much appreciated
**openmpi version : 2.1**

Thank you! 

Resultant error while trying to install dependencies is as follows : 



 In file included from psycopg/psycopgmodule.c:27:0:
  ./psycopg/psycopg.h:31:22: fatal error: libpq-fe.h: No such file or directory
   #include <libpq-fe.h>
                        ^
  compilation terminated.
  error: command 'gcc' failed with exit status 1
  
  ----------------------------------------
  Failed building wheel for psycopg2
  Running setup.py clean for psycopg2
Failed to build psycopg2
Installing collected packages: psycopg2, requests, argparse, stevedore, virtualenv, virtualenv-clone, virtualenvwrapper, wheel, Yapsy
  Found existing installation: psycopg2 2.5.1
    DEPRECATION: Uninstalling a distutils installed project (psycopg2) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.
    Uninstalling psycopg2-2.5.1:
      Successfully uninstalled psycopg2-2.5.1
  Running setup.py install for psycopg2 ... error
    Complete output from command /usr/bin/python2 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-Fh10ay/psycopg2/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-ReRnkb-record/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-2.7
    creating build/lib.linux-x86_64-2.7/psycopg2
    copying lib/tz.py -> build/lib.linux-x86_64-2.7/psycopg2
    copying lib/pool.py -> build/lib.linux-x86_64-2.7/psycopg2
    copying lib/extras.py -> build/lib.linux-x86_64-2.7/psycopg2
    copying lib/extensions.py -> build/lib.linux-x86_64-2.7/psycopg2
    copying lib/_range.py -> build/lib.linux-x86_64-2.7/psycopg2
    copying lib/__init__.py -> build/lib.linux-x86_64-2.7/psycopg2
    copying lib/psycopg1.py -> build/lib.linux-x86_64-2.7/psycopg2
    copying lib/_json.py -> build/lib.linux-x86_64-2.7/psycopg2
    copying lib/errorcodes.py -> build/lib.linux-x86_64-2.7/psycopg2
    creating build/lib.linux-x86_64-2.7/psycopg2/tests
    copying tests/dbapi20.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
    copying tests/test_bug_gc.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
    copying tests/test_async.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
    copying tests/testconfig.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
    copying tests/test_quote.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
    copying tests/test_extras_dictcursor.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
    copying tests/test_types_basic.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
    copying tests/test_transaction.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
    copying tests/test_cancel.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
    copying tests/test_dates.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
    copying tests/test_lobject.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
    copying tests/dbapi20_tpc.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
    copying tests/test_copy.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
    copying tests/test_types_extras.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
    copying tests/test_psycopg2_dbapi20.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
    copying tests/test_module.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
    copying tests/__init__.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
    copying tests/test_green.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
    copying tests/testutils.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
    copying tests/test_with.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
    copying tests/test_cursor.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
    copying tests/test_connection.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
    copying tests/test_notify.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
    copying tests/test_bugX000.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
    running build_ext
    building 'psycopg2._psycopg' extension
    creating build/temp.linux-x86_64-2.7
    creating build/temp.linux-x86_64-2.7/psycopg
    gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.6.1 (dt dec pq3 ext)" -DPG_VERSION_HEX=0x090212 -I/usr/include/python2.7 -I. -I/usr/include -I/usr/include/pgsql/server -c psycopg/psycopgmodule.c -o build/temp.linux-x86_64-2.7/psycopg/psycopgmodule.o -Wdeclaration-after-statement
    In file included from psycopg/psycopgmodule.c:27:0:
    ./psycopg/psycopg.h:31:22: fatal error: libpq-fe.h: No such file or directory
     #include <libpq-fe.h>
                          ^
    compilation terminated.
    error: command 'gcc' failed with exit status 1
    
    ----------------------------------------
  Rolling back uninstall of psycopg2
Command "/usr/bin/python2 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-Fh10ay/psycopg2/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-ReRnkb-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-Fh10ay/psycopg2/

***EDIT: Added verbose block markup***
@jsquyres
Copy link
Member

Github pro tip: put three back ticks on a line by itself before and after output text to render it in a verbatim mode with a fixed-width font. https://help.github.com/articles/basic-writing-and-formatting-syntax/#quoting-code

@noahv
Copy link
Contributor

noahv commented May 2, 2017

Hi Sachin,

Fun with postgres! It is picky and likes to install key header files into different locations for different distributions. That seems to make issues like this show up a lot more often.

I was able to reproduce this issue on a centos7 box. Here are the steps that you can try to fix it. Note that we use postgres9.3.

sudo yum localinstall -y http://yum.postgresql.org/9.3/redhat/rhel-7-x86_64/pgdg-centos93-9.3-1.noarch.rpm
sudo yum install postgresql93-server postgresql93-dev postgresql93-lib
export PATH=/usr/pgsql-9.3/bin/:$PATH 
cd mtt
virtualenv venv
source venv/bin/activate
pip install -r pyenv.txt

Please give this a try and let me know what results you get.

Thanks,

-- Noah

@sachinprabhu007
Copy link
Author

Hello

Thanks for suggestion. I installed postgresql 9.5 version. Results in same error.

Thanks
-- Sachin

@noahv
Copy link
Contributor

noahv commented May 3, 2017

What steps exactly did you run? Did you add it the postgres 9.5 bin directory to your path?

@sachinprabhu007
Copy link
Author

Hello

I followed same steps as you mentioned but instead of 9.3 i installed 9.5. Yes I did add bin directory to path. I didn't create any virtual environment though.

Also referred https://www.postgresql.org/download/linux/redhat/

I have built openmp-2.1 from source and tried "already installed " module mentioned in github. I wanted to use mtt version 3 with python client.

Thanks for your valuable time
Regards
Sachin

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

No branches or pull requests

3 participants