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

Issue running on Mac with Brew #1

Closed
andersgs opened this issue May 6, 2020 · 3 comments
Closed

Issue running on Mac with Brew #1

andersgs opened this issue May 6, 2020 · 3 comments
Labels
fix coming A fix for this issue is being tested, and will be available in the next release.

Comments

@andersgs
Copy link

andersgs commented May 6, 2020

On my Mac, python executable is the system python2. to get to python3 I use the exec python3 (installed via homebrew).

But, running:

anvil-app-server --app MyTodoList

Fails with the following issue:

[INFO  anvil.app-server.dispatch] Launching built-in downlink...
/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python: No module named anvil_downlink_host

Which suggests the runtime is looking for anvil_downlink_host in the wrong location, as I installed anvil-runtime-server in my homebrew installation.

So, I ran brew info python3 and picked up the bin folder that has python linked to my brew installation and then ran:

PATH=/usr/local/opt/python/libexec/bin:$PATH anvil-app-server --app MyTodoList

I was then able to get things to work.

This is a perennial issue with Python never enforcing python3 as the proper executable name.

Thought others might find this helpful.

Thank you for releasing Anvil as open-source! Very excited to give it a go.

PS. System info:

  • MacOSX 10.15.4
  • Homebrew 2.2.15
  • Homebrew/homebrew-core (git revision cb163; last commit 2020-05-06)
  • Homebrew/homebrew-cask (git revision 2748d; last commit 2020-05-06)
  • PATH: usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/opt/X11/bin:/Library/Apple/usr/bin
@daviesian
Copy link
Contributor

Thanks for the detailed report, and the workaround for others. We would always recommend installing anvil-app-server in a virtualenv - does that also solve the problem for you?

@meredydd
Copy link
Collaborator

meredydd commented May 7, 2020

It looks like this was the issue!

(We were launching the subprocess with the system default python interpreter, rather than your chosen interpreter. This will be fixed in the next release of the App Server. In the meantime, running the App Server in a virtualenv will solve the problem!)

@meredydd meredydd added the fix coming A fix for this issue is being tested, and will be available in the next release. label May 7, 2020
@andersgs
Copy link
Author

@daviesian just to confirm that it works in a virtualenv. Cheers. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix coming A fix for this issue is being tested, and will be available in the next release.
Projects
None yet
Development

No branches or pull requests

3 participants