Skip to content
New issue

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

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

Already on GitHub? # to your account

Couldn't set up local environment #987

Closed
Mariatta opened this issue Aug 11, 2016 · 2 comments
Closed

Couldn't set up local environment #987

Mariatta opened this issue Aug 11, 2016 · 2 comments

Comments

@Mariatta
Copy link
Member

Mariatta commented Aug 11, 2016

Hello,

I followed instructions to set up python dot org locally as described in this page:
https://pythondotorg.readthedocs.io/install.html

Since I was not familiar with Vagrant, I skipped that part and went with the instructions under Manual Setup heading. (Perhaps I should not have done that?)

These were my steps:

git clone git://github.com/python/pythondotorg.git
cd pythondotorg
python3.4 -m venv venv
source venv/bin/activate
python3.4 pip install -r dev-requirements.txt

At this point I saw an error related to uWSGI.

Here is a snippet of the error:

Requirement already satisfied (use --upgrade to upgrade): oauthlib>=0.6.2 in /usr/local/lib/python3.4/site-packages (from requests-oauthlib>=0.3.0->django-allauth==0.22.0->-r requirements.txt (line 40))

Installing collected packages: uWSGI

Running setup.py install for uWSGI ... error

Complete output from command /usr/local/opt/python3/bin/python3.4 -u -c "import setuptools, tokenize;__file__='/private/var/folders/8t/szq9prv16rn3dvdjcd_q6cym0000gs/T/pip-build-0hp0c9ai/uWSGI/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/8t/szq9prv16rn3dvdjcd_q6cym0000gs/T/pip-fjrw0gqx-record/install-record.txt --single-version-externally-managed --compile:

running install

using profile: buildconf/default.ini

... some really long message or stack trace of some sort... and then:

*** uWSGI compiling server core ***

[thread 1][clang] core/utils.o

[thread 2][clang] core/protocol.o

[thread 0][clang] core/socket.o

[thread 3][clang] core/logging.o

[thread 1][clang] core/master.o

[thread 2][clang] core/master_utils.o

core/socket.c:713:28: error: use of undeclared identifier 'SOL_TCP'

                if (setsockopt(serverfd, SOL_TCP, TCP_FASTOPEN, (const void *) &uwsgi.tcp_fast_open, sizeof(int)) < 0) {

                                         ^

1 error generated.

Command "/usr/local/opt/python3/bin/python3.4 -u -c "import setuptools, tokenize;__file__='/private/var/folders/8t/szq9prv16rn3dvdjcd_q6cym0000gs/T/pip-build-0hp0c9ai/uWSGI/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/8t/szq9prv16rn3dvdjcd_q6cym0000gs/T/pip-fjrw0gqx-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/8t/szq9prv16rn3dvdjcd_q6cym0000gs/T/pip-build-0hp0c9ai/uWSGI/

I'm using Macbook OS X El Capitan 10.11.6

It was suggested by @berkerpeksag that I comment out uWSGI from requirements.txt file.
After this, the installation was successful, and I was able to continue with the rest to get my local env running locally.

I'm creating this ticket as per suggestion of @MarkMangoba 😃

I'm really interested to help contributing to this project. If there is anything that I can do about this, be it testing, or updating documentation, please just let me know 👋

@berkerpeksag
Copy link
Member

Hi @Mariatta,

The following dependencies are only required in production:

uWSGI==2.0.10
raven==5.2.0

And the following dependency is required in development environment:

django-debug-toolbar==1.2.2

I think the next steps would be the following:

  1. move django-debug-toolbar to dev-requirements.txt

  2. move uwsgi and raven to prod-requreimets.txt

  3. move other dependencies in requrements.txt to base-requirements.txt

  4. make requirements.txt behave like a factory function:

    -r base-requirements.txt
    -r prod-requirements.txt
    
  5. add -r base-requirements.txt to dev-requirements.txt

@berkerpeksag
Copy link
Member

I'm really interested to help contributing to this project. If there is anything that I can do about this, be it testing, or updating documentation, please just let me know

You may find #985 interesting to work on :)

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

No branches or pull requests

2 participants