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

Difficulty with dev setup for Ubuntu 16.04 #82

Open
nshiff opened this issue Feb 10, 2017 · 2 comments
Open

Difficulty with dev setup for Ubuntu 16.04 #82

nshiff opened this issue Feb 10, 2017 · 2 comments

Comments

@nshiff
Copy link

nshiff commented Feb 10, 2017

seigenblues mentioned on reddit that the project was interested in some frontend work. I don't see any to-dos for frontend, so I figured I would clone the project and just see the state of things. I'm attempting to follow along with the readme instructions, but here's where I am.

  1. Install Python3 - ok

  2. Install pip - ok

  3. Install postgres - this seemed to work. On my version Ubuntu 16.04, there is the package postgresql and postgresql-9.5. In order to get 9.4, I used the linked instructions to use an alternate repository. This seemed to work.

  4. Install the python dependencies with pip. - This does not appear to be working. Here's what I have.

~/src/online-ratings/web$ pip install -r requirements.txt
<snip, lots of ok-looking output>
  Skipping optional fixer: idioms
  Skipping optional fixer: set_literal
  Skipping optional fixer: ws_comma
  running build_ext
  building 'psycopg2._psycopg' extension
  creating build/temp.linux-x86_64-3.5
  creating build/temp.linux-x86_64-3.5/psycopg
  x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.6.1 (dt dec pq3 ext lo64)" -DPG_VERSION_HEX=0x090505 -DHAVE_LO64=1 -I/usr/include/python3.5m -I. -I/usr/include/postgresql -I/usr/include/postgresql/9.5/server -c psycopg/psycopgmodule.c -o build/temp.linux-x86_64-3.5/psycopg/psycopgmodule.o -Wdeclaration-after-statement
  In file included from psycopg/psycopgmodule.c:27:0:
  ./psycopg/psycopg.h:30:20: fatal error: Python.h: No such file or directory
  compilation terminated.
  error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
  
  ----------------------------------------
  Failed building wheel for psycopg2
  Running setup.py clean for psycopg2

Failed to build psycopg2

I found a few references on Stack Overflow with failures to build this package, but none of the suggestions worked for me (installed autotools, ran pip with sudo).

  1. Run the tests! - ok

Linux: Install docker and docker-compose - ran hello-world with success

$ cp .env_example .env
$ docker-compose build
WARNING: Please be aware that .yml is the expected extension in most cases, and using .yaml can cause compatibility issues in future.

ERROR: In file './docker-compose.yaml' service 'version' doesn't have any configuration options. All top level keys in your docker-compose.yml must map to a dictionary of configuration options.

So I commented out the "version" line, but then fail with:

WARNING: The DB_NAME variable is not set. Defaulting to a blank string.
WARNING: The DB_USER variable is not set. Defaulting to a blank string.
ERROR: Validation failed in file './docker-compose.yaml', reason(s):
Unsupported config option for 'volumes' service: 'pgdata'
Unsupported config option for 'services' service: 'psql'

I don't understand... I modified .env with the values for an empty database I set up in Postgres. Any tips appreciated.

@brilee
Copy link
Contributor

brilee commented Feb 10, 2017

Can you run docker --version?

@brilee
Copy link
Contributor

brilee commented Feb 10, 2017

They changed the docker-compose.yml file format in 1.8 I think, to accept a new version: '2' config, so if you have a really old version for some reason, it won't understand the new version.

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