Error when running locally: Starting... Error running 'algo serve'
Closed this issue ยท 7 comments
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?
@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
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!!
Great to hear, I'll close this for now - feel free to reopen!
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!
Nvm, I figured it out, just had to set LANGUAGE_VERSION=python3
as an environment variable.
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.
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?