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

Error settings up development environment #2556

Open
DavisOwen opened this issue Oct 7, 2019 · 1 comment
Open

Error settings up development environment #2556

DavisOwen opened this issue Oct 7, 2019 · 1 comment

Comments

@DavisOwen
Copy link

Dear Zipline Maintainers,

Before I tell you about my issue, let me describe my environment:

Environment

  • Operating System: MacOSx Mojave Version 10.14.6
  • Python Version: python 3.7.4
  • Python Bitness: 64
  • How did you install Zipline: Working on that now. Installing requirements using virtualenvwrapper and pip
  • Python packages: N/A

Now that you know a little about me, let me tell you about the issue I am
having:

Description of Issue

I am following this guide to set up my development environment.

https://www.zipline.io/development-guidelines

After settings up my virtual env and running ./etc/ordered_pip.sh ./etc/requirements.txt, I am running into this error when installing numpy

error: Command "clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -Inumpy/core/include -Ibuild/src.macosx-10.14-x86_64-3.7/numpy/core/include/numpy -Inumpy/core/src/private -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -I/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/include/python3.7m -Ibuild/src.macosx-10.14-x86_64-3.7/numpy/core/src/private -Ibuild/src.macosx-10.14-x86_64-3.7/numpy/core/src/private -Ibuild/src.macosx-10.14-x86_64-3.7/numpy/core/src/private -c numpy/random/mtrand/mtrand.c -o build/temp.macosx-10.14-x86_64-3.7/numpy/random/mtrand/mtrand.o" failed with exit status 1

I have installed python using Homebrew and also installed these libraries as specified in this doc for OSx

https://www.zipline.io/install.html

I have successfully set up zipline using the quantopian channel on a conda environment, but I would like to do some dev work.

Here is how you can reproduce this issue on your machine:

Reproduction Steps

  1. Have OSx
  2. Brew install python freetype pkg-config gcc openssl
  3. mkvirutalenv zipline
  4. ./etc/ordered_pip.sh ./etc/requirements.txt
    ...

What steps have you taken to resolve this already?

Brew reinstalled python.

I also set up a python3.5 conda environment and ran ./etc/ordered_pip.sh ./etc/requirements.txt, and at that point ran into an issue of installing bcolz (numpy worked). I fixed that by simply conda installing bcolz. However, I decided to try to go strictly off the docs so as to avoid some wonky behavior. If you think I would have an easier time using conda instead of virualenv wrapper then I am all for it.
...

Anything else?

...

Sincerely,
Davis

@taliarhodes
Copy link
Contributor

Hi @DavisOwen,

The issue you are seeing here is two-fold:

  1. We currently do not support Python 3.6+ and it seems your pip/virtualenv environment is using Python 3.7. See issue here for info on that: Support for Newer Python Versions #2616

  2. Because it is not supported, there is no wheel already built for the old version of Numpy with such a new version of Python. As such, it has to be compiled from source and you're experiencing an error compiling it.

Some options would be to install Python 3.5 and use a virtualenv setup with Python 3.5 (your install command looks like you just brew installed the latest, hence the 3.7.4. You can install multiple Python versions though and point Virtualenv to different versions) or to investigate the compiler errors for numpy/installing numpy from source.

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