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

M1 Mac support? #76

Closed
24dev opened this issue Nov 19, 2021 · 11 comments
Closed

M1 Mac support? #76

24dev opened this issue Nov 19, 2021 · 11 comments

Comments

@24dev
Copy link

24dev commented Nov 19, 2021

Description

Unable to pip3 install blankly on an M1 MacBook Big Sur.

Error (if applicable)

Collecting scikit-learn
  Downloading scikit-learn-1.0.1.tar.gz (6.6 MB)
     |████████████████████████████████| 6.6 MB 3.8 MB/s 
  Installing build dependencies ... error
  ERROR: Command errored out with exit status 1:
   command: /Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9 /private/var/folders/t9/2fb8pd6s41b0d41lk81pk_700000gn/T/pip-standalone-pip-ata6s47j/__env_pip__.zip/pip install --ignore-installed --no-user --prefix /private/var/folders/t9/2fb8pd6s41b0d41lk81pk_700000gn/T/pip-build-env-gp_u1yzv/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel 'Cython>=0.28.5' 'oldest-supported-numpy; python_version!='"'"'3.7'"'"' or platform_machine=='"'"'aarch64'"'"' or platform_system=='"'"'AIX'"'"' or platform_python_implementation == '"'"'PyPy'"'"'' 'numpy==1.14.6; python_version=='"'"'3.7'"'"' and platform_machine!='"'"'aarch64'"'"' and platform_system!='"'"'AIX'"'"' and platform_python_implementation != '"'"'PyPy'"'"'' 'scipy>=1.1.0'
       cwd: None
  Complete output (55279 lines):
  Ignoring numpy: markers 'python_version == "3.7" and platform_machine != "aarch64" and platform_system != "AIX" and platform_python_implementation != "PyPy"' don't match your environment

also

clang: error: the clang compiler does not support 'faltivec', please use -maltivec and include altivec.h explicitly

Platform Info

  • Python version: 3.9.9
  • Platform: MacOS M1
@EmersonDove
Copy link
Member

EmersonDove commented Nov 19, 2021

This is a really interesting error. I tried to help someone with this earlier on an M1 Mac mini but they went MIA so maybe we can fix it now. We do all of our development on Mac so I want to make sure it works on M1.

One thing you might have to do if this is a fresh development environment is pip install wheel or get the Apple build tools with xcode-select --install.

As a guess it looks like the dependencies can't be compiled on the architecture. Can you send the complete error/output in a pastbin or as a massive post? This makes it easy to see which dependency is failing.

@24dev
Copy link
Author

24dev commented Nov 20, 2021

Thanks for such a rapid reply, so far massively impressed by this package!
I've got both wheel and Xcode tools installed, so doesn't seem to be that.

Unfortunately Pastebin doesn't allow me to paste more than this, the error is actually around 100x this long, but it seems to be primarily complaining about numpy. https://pastebin.com/xAtQzYSF

@EmersonDove
Copy link
Member

Haha thats an impressive error to beat.

After some digging on this it looks like this is super common for these C++ dependencies - for example scipy/scipy#13409 . A lot of people are having success by opening their terminal in "Rosetta Mode":
https://www.courier.com/blog/tips-and-tricks-to-setup-your-apple-m1-for-development

The article duplicates their terminal app but if you wanted to run a quick test, just check open using rosetta temporarily & try running.

@24dev
Copy link
Author

24dev commented Nov 22, 2021

Opening terminal in Rosetta was all it took, it works now! I suppose it's not a perfect solve, but seems to be a common fix for lots of M1 problems. Thank you for the guidance.

Wondering if you have any advice/guides on running Blankly on a VM? Something quick and easy to setup, like using Google Cloud. Looks like you have plans to support that in-house, but a few of the website links are dead so I guess that's not ready yet? If there is an ETA on that I'd love to be a beta tester for it. I'd also be quite keen on contributing to its' development.

@24dev 24dev closed this as completed Nov 22, 2021
@EmersonDove
Copy link
Member

EmersonDove commented Nov 22, 2021

I'm glad it worked! I'm going to add this fix to the installation docs & follow up with the M1 Mac mini guy.

We run a lot of stuff on the cloud - in our use case docker makes the most sense because we can just take the image and pop it right on the cloud but I think it would really depend on your use case. python:3.8-slim has worked great for us as a base image.

When its ready to go I think we'll offer free or heavily discounted use to some people interested in beta, I'll put you down as someone interested!

We're always interested in bringing on more contributors. I've had a hard time managing the pulls we've gotten so far just because we've been doing so much. I've left #65 far longer than I should have. My plan has been to write up some good areas for contributions for awhile but I've just been lagging. There are plenty of TODOS and upgrades throughout the code if you wanted to try to focus in on a problem while I'm working on the contributor stuff - a lot of it would be awesome to resolve!

Just out of curiosity which links are dead on the site, I will forward that along and get it fixed.

@24dev
Copy link
Author

24dev commented Nov 22, 2021

Sounds good! Do you have an ETA for the platform? Just wondering if I should wait or setup my own system really.

Regarding contributing, I primarily do frontend work, so if there is frontend work on the platform that needs doing, I can help. React / React Native specifically.

Dead links:

  1. index -> Deploy in one command -> View our current timeline
  2. Some missing images on https://blankly.finance/products/platform, for Safari at least
  3. OANDA logo is missing all over
  4. footer - company - about

@EmersonDove
Copy link
Member

Hmm the images are definitely a new disappearance and I went ahead and passed that along to the platform side.

We're planning on opening up a beta sometime in December - most likely towards new year for a full public release in January so I can definitely loop you in for the beta.

We have some open source web projects in the pipeline - potentially releasing in the next few days. The side https://www.24dev.co looks pretty incredible (i'm actually going to refer a guy who's looking for website builders to your page). We might also open source the website or parts of it!

@24dev
Copy link
Author

24dev commented Nov 26, 2021

Perfect, love to be part of the beta. Just to confirm, it's going to be a hosted dashboard where we can run blankly backtests and see the results visually, plus run strategies?

Appreciate the referral!

@EmersonDove
Copy link
Member

Yep that's exactly what it will be! It should be a pretty cool integrated environment.

@24dev
Copy link
Author

24dev commented Nov 27, 2021

Amazing, can't wait!

@thomasfowler
Copy link

FWIW, I know this is a closed issue, but I've just moved to an M1 Mac. Installed natively (not using Rosetta) using Python 3.10.0 with no issues.

Seems any upstream dependencies that blocked running natively on Apple Silicon seem to have been resolved.

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

3 participants