huan / node-facenet

Solve face verification, recognition and clustering problems: A TensorFlow backed FaceNet implementation for Node.js.
https://zixia.github.io/node-facenet/
Apache License 2.0
405 stars 77 forks source link

There is a problem in the check-version.sh file #125

Closed leo-def closed 6 years ago

leo-def commented 6 years ago

Actual behavior

When I attempt to install this npm library, running the command below npm install facenet numjs flash-store

i get a livecycle error

Full Output Logs

# PASTE RELATED FULL LOG OUTPUT AT HERE:
LIFECYCLE
npm ERR! errno 1
npm ERR! facenet@0.8.0 preinstall: `npm run check-version`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the facenet@0.8.0 preinstall script.
huan commented 6 years ago

What's your version of node and python?

Please make sure you have node 8, python 3.6 or above.

leo-def commented 6 years ago

@zixia Node V9.8.0 and Python V3.6.5, but python3 is not recognized here

huan commented 6 years ago

What's the output when you run the check version helper script?

leo-def commented 6 years ago

I got the following error

[: !=: unary operator expected

in this line

ret=$(node -e 'console.log(process.versions.node.split(".")[0] >= 7 ? 0 : 1)')

But it works's fine when I execute directly in the CMD the following command

node -e 'console.log(process.versions.node.split(\".\")[0] >= 7 ? 0 : 1)

Other problem is about the python3 command that my system can't recognize, I guess that I need to downgrade my python to 3.5.

When I run the following command, its works fine.

python3 -c 'import sys; v = sys.version_info; print("%i" % (v.major <3 or v.major==3 and v.minor<5));'

huan commented 6 years ago

Can you provide the re-produce steps in detail?

I'm afraid that I could not be able to help without that information.

And I just get the code from latest master branch passed the CI unit tests, you can have a look at https://travis-ci.com/zixia/node-facenet/jobs/124931260, hope it helps.

leo-def commented 6 years ago

It's was problem in my environment, i solve using docker.

huan commented 6 years ago

Glad to hear that you had solved the problem.

Could you please close this issue?