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 when running locally: Starting... Error running 'algo serve' #14

Closed
thanosbellos opened this issue Sep 17, 2018 · 7 comments
Closed

Comments

@thanosbellos
Copy link

Hi, i am trying to build and run locally my algorithm on my machine (mac os 10.13.6). I have python 3.6.6 installed as main python (pyenv). When i execute command:
algo runlocal -D test.json
The message 'Error running 'algo serve' appears after a while..

Out of curiosity i run: algo serve and after the installation of packages finishes, there is a build error:
INFO ALGOERR - class RegexFlag(enum.IntFlag):
INFO ALGOERR - AttributeError: module 'enum' has no attribute 'IntFlag'

After searching a little bit into the wild internet, i found the following thread enum34 isn't compatible with python 3.6.

Algorithmia requires python version > 3.4 and also requires presence of enum34.

Is it something caused by my python environment or is it something that may have to be addressed on your side?

@zeryx
Copy link
Contributor

zeryx commented Sep 17, 2018

@thanosbellos happy you asked, I haven't seen this one yet.
So algorithmia python3 is a bit of a misnomer, our python 3 algorithms are executed with precisely python 3.5.4, which is the default version of python that comes with ubuntu 16.04+.

We do have future plans to support 3.6+ in the future, for now, I'd recommend either downgrading your built-in python version to 3.5.4 or make that algorithmia cli command line call from within a python virtual environment.

Let me know if that helps,
James

@thanosbellos
Copy link
Author

Everything worked great after i followed your suggestion and used python 3.5.4!! Thanks a lot for your immediate response and help!!

P.S The whole idea of the algorithmia platform is really really interesting and helpful!!

@zeryx
Copy link
Contributor

zeryx commented Sep 21, 2018

Great to hear, I'll close this for now - feel free to reopen!

@zeryx zeryx closed this as completed Sep 21, 2018
@trung-watchtower
Copy link

trung-watchtower commented Apr 25, 2019

Hi, When i run these command in a conda env with python 3.5.4, I am still unable to run algo serve - I get the following error

A python version needs to be specified
Error running 'bin/build'

I though running algo serve --no-build would work but I get this error

INFO ALGOOUT - A python version needs to be specified
Failed to start LangServer: exited with code 1

@zeryx could you look into this and let me know what i'm doing wrong. Thanks!

@trung-watchtower
Copy link

Nvm, I figured it out, just had to set LANGUAGE_VERSION=python3 as an environment variable.

@dattran2346
Copy link

Hi @zeryx , I have set up a new conda env with python 3.5.4, I also export LANGUAGE_VERSION=python3 to .zshrc, but when I run algo serve I still get the following error

Failed to start LangServer: exited with code 0

Does it mean I have to install python LangServer. I didn't see the doc for this.

@TKassis
Copy link

TKassis commented Jun 22, 2019

I'm getting the same error message when trying to run locally:

[* ] Starting... Error running 'algo serve'

I'm running an anaconda environment with Python 3.5.4 and I set an environment variable to LANGUAGE_VERSION=python3.

Anyone else still having this issue?

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

5 participants