Comments (15)
Are you using a Debian based system, if so have you installed the libpq-dev
package? If you're using a Mac you will need to brew install postgresql
for the header files.
from build-a-saas-app-with-flask.
Python 2.7.9 and pip 7.1.0 on Debian 3.16.0-4-amd64
from build-a-saas-app-with-flask.
Sorry, I edited my comment to ask for different info. Can you sudo apt-get install libpq-dev
and then try running pip install?
from build-a-saas-app-with-flask.
E: Unable to locate package libqp-dev
from build-a-saas-app-with-flask.
Oops, libpq-dev
.
from build-a-saas-app-with-flask.
hehe ;p
libpq-dev is already the newest version.
from build-a-saas-app-with-flask.
What happens if you just pip install psycopg2
? Also can you paste the error it dumped?
from build-a-saas-app-with-flask.
Okay, will try again on fresh install
from build-a-saas-app-with-flask.
`
root@template:~# pip install psycopg2
Collecting psycopg2
Downloading psycopg2-2.6.1.tar.gz (371kB)
100% |████████████████████████████████| 372kB 613kB/s
Building wheels for collected packages: psycopg2
Running setup.py bdist_wheel for psycopg2
Complete output from command /usr/bin/python -c "import setuptools;file='/ tmp/pip-build-FVZKlH/psycopg2/setup.py';exec(compile(open(file).read().repla ce('\r\n', '\n'), file, 'exec'))" bdist_wheel -d /tmp/tmpduKOBYpip-wheel-:
running bdist_wheel
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/init.py -> build/lib.linux-x86_64-2.7/psycopg2
copying lib/_range.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/pool.py -> build/lib.linux-x86_64-2.7/psycopg2
copying lib/extras.py -> build/lib.linux-x86_64-2.7/psycopg2
copying lib/tz.py -> build/lib.linux-x86_64-2.7/psycopg2
copying lib/errorcodes.py -> build/lib.linux-x86_64-2.7/psycopg2
copying lib/extensions.py -> build/lib.linux-x86_64-2.7/psycopg2
creating 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/init.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/test_lobject.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/test_async.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_bug_gc.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_bugX000.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_psycopg2_dbapi20.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_dates.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_notify.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_connection.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/test_types_extras.py -> build/lib.linux-x86_64-2.7/psycopg2/test s
copying tests/test_types_basic.py -> 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_copy.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/dbapi20_tpc.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
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototype s -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION=" 2.6.1 (dt dec pq3 ext lo64)" -DPG_VERSION_HEX=0x090403 -DHAVE_LO64=1 -I/usr/incl ude/python2.7 -I. -I/usr/include/postgresql -I/usr/include/postgresql/9.4/server -c psycopg/psycopgmodule.c -o build/temp.linux-x86_64-2.7/psycopg/psycopgmodule .o -Wdeclaration-after-statement
unable to execute 'x86_64-linux-gnu-gcc': No such file or directory
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Failed building wheel for psycopg2
Failed to build psycopg2
Installing collected packages: psycopg2
Running setup.py install for psycopg2
Complete output from command /usr/bin/python -c "import setuptools, tokenize ;file='/tmp/pip-build-FVZKlH/psycopg2/setup.py';exec(compile(getattr(tokeniz e, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" ins tall --record /tmp/pip-RJiEJB-record/install-record.txt --single-version-externa lly-managed --compile:
running install
running build
running build_py
running build_ext
building 'psycopg2._psycopg' extension
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototy pes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wforma t -Werror=format-security -fPIC -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION ="2.6.1 (dt dec pq3 ext lo64)" -DPG_VERSION_HEX=0x090403 -DHAVE_LO64=1 -I/usr/in clude/python2.7 -I. -I/usr/include/postgresql -I/usr/include/postgresql/9.4/serv er -c psycopg/psycopgmodule.c -o build/temp.linux-x86_64-2.7/psycopg/psycopgmodu le.o -Wdeclaration-after-statement
unable to execute 'x86_64-linux-gnu-gcc': No such file or directory
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python -c "import setuptools, tokenize;file='/tmp/pip-buil d-FVZKlH/psycopg2/setup.py';exec(compile(getattr(tokenize, 'open', open)(file_ _).read().replace('\r\n', '\n'), __file, 'exec'))" install --record /tmp/pip-R JiEJB-record/install-record.txt --single-version-externally-managed --compile" f ailed with error code 1 in /tmp/pip-build-FVZKlH/psycopg2
root@template:~#
`
Threw an error on psycopg2
from build-a-saas-app-with-flask.
You may want to ping the author of psycopg2 or post an issue in his repo because at this point this is beyond the scope of the saas app.
It hints that you might be missing GCC on your machine. Have you done a apt-get install build-essential
?
from build-a-saas-app-with-flask.
It's a fresh vm so hmm don't think I installed build-essentials ;o will try that later
from build-a-saas-app-with-flask.
Gave it a few more tries, ended up needing:
sudo apt-get install python-setuptools python-dev build-essential python-psycopg2
(build-essential) alone was not enough
from build-a-saas-app-with-flask.
Ok thanks. I don't think python-psycopg2 is needed tho. We're installing it through pip.
Also would you mind providing the exact distro of Linux you're using, Debian 3.16.0-4 is probably just the kernel version.
from build-a-saas-app-with-flask.
No longer have the vm, as some ghost process spawned ;S
Debian 8 / Jessie , don't remember much more :(
from build-a-saas-app-with-flask.
Ok thanks, Jessie is enough information.
from build-a-saas-app-with-flask.
Related Issues (20)
- Illegal instruction: 4 HOT 8
- Several questions for solution evaluation HOT 6
- Revisiting OS X Postgres permissions issue HOT 15
- Internal sever error and db reset issue on Mac HOT 3
- Error importing module add: HOT 12
- Error importing module db: HOT 5
- Getting blank responses from cat watch HOT 44
- Cannot access admin page HOT 2
- CSRF problem HOT 17
- Adding Custom CSS and JS HOT 9
- SMTPAuthenticationError 534 HOT 4
- Getting a ImportError when running with docker compose HOT 4
- redis need a version bump HOT 3
- gunicorn does not run on windows HOT 2
- ERROR when building HOT 4
- celery-beat KeyError 'Scheduler' HOT 16
- how can i configure postgresql over here can you help me out HOT 1
- ImportError: No module named abc HOT 2
- FLASK_ENV error in build HOT 10
- why not django? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from build-a-saas-app-with-flask.