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

pip install problem? #7

Closed
worldburger opened this issue Apr 7, 2016 · 6 comments
Closed

pip install problem? #7

worldburger opened this issue Apr 7, 2016 · 6 comments

Comments

@worldburger
Copy link

I've followed the instructions for installation via pip.
everything seems to function without giving any error messages.
However, when i attempt to test run bazel, it returns "command not found".

What am I missing?

This is a fresh install of raspbian via the noobs installer on a Raspberry Pi 3.

I should add: I did attempt to do the non-pip long-form install. I can't seem to get that to complete when attempting to compile bazel. When I enter the ./compile.sh part it fails saying:

Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Arrays.java:3332)
at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:137)
at java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:121)
at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:421)
at java.lang.StringBuilder.append(StringBuilder.java:136)
at sun.net.www.protocol.jar.Handler.parseContextSpec(Handler.java:207)
at sun.net.www.protocol.jar.Handler.parseURL(Handler.java:153)
at java.net.URL.(URL.java:615)
at java.net.URL.(URL.java:483)
at sun.misc.URLClassPath$JarLoader.checkResource(URLClassPath.java:922)
at sun.misc.URLClassPath$JarLoader.getResource(URLClassPath.java:1007)
at sun.misc.URLClassPath.getResource(URLClassPath.java:212)
at java.net.URLClassLoader$1.run(URLClassLoader.java:365)
at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at com.sun.tools.javac.main.Main.resourceMessage(Main.java:610)
at com.sun.tools.javac.main.Main.compile(Main.java:543)
at com.sun.tools.javac.main.Main.compile(Main.java:381)
at com.sun.tools.javac.main.Main.compile(Main.java:370)
at com.sun.tools.javac.main.Main.compile(Main.java:361)
at com.sun.tools.javac.Main.compile(Main.java:56)
at com.sun.tools.javac.Main.main(Main.java:42)

Google tells me this is a simply memory fix. Any ideas?

Full disclosure, I am relatively new to Python :)

@samjabrahams
Copy link
Owner

Thanks for opening this up! To start- the pip installation doesn't install Bazel- it just installs TensorFlow. Bazel is used to build the pip wheel file. If you've done the standard pip install, try starting up a Python dialog and import TensorFlow:

$ python

>>> import tensorflow as tf

As for the long-form installation- sorry to hear of the memory issue. I haven't seen that problem before; were you running any other memory-intensive software on the RPi while compiling?

@worldburger
Copy link
Author

Thanks for the swift reply, Sam! After reading your comment and realizing I didn't need Bazel to run TensorFlow, I ran the line you sent. After a few moments it gives me the >>> prompt. I was also able to a few of the TensorFlow.org examples to run. I overlooked testing TensorFlow itself! The pip install actually worked the first time. I was thinking Bazel was required for running TensorFlow. Thanks for explaining.

As far as the heap memory issue with Java, the first time I ran ./compile.sh to compile Bazel I had a browser (3-4 tabs) open. Last night, I tried to comple it with nothing else running, it returned the same error so I'm not sure what's causing the problem. My Pi Camera is also enabled and attached, but nothing running it.

@samjabrahams
Copy link
Owner

Just wanted to let you know that I haven't forgotten this issue- I'm going to need to find some time to go through the process from scratch to see where the problem is. Thank you for providing some more details!

@samjabrahams
Copy link
Owner

samjabrahams commented Apr 21, 2016

Hey @worldburger - I believe a solution to get around this problem has been found based on this comment from @SangManLINUX. I've been able to compile the latest version of Bazel (0.2.1), which gave an OutOfMemoryError before the fix.

I am currently compiling the 0.8RC0 version of TensorFlow: once I've tested it out I'll release updated instructions, and hopefully that will suffice to close this issue!

@worldburger
Copy link
Author

Thanks for the update @samjabrahams, I'll give it a fresh install 👍

@samjabrahams
Copy link
Owner

I believe this issue has been resolved, so I'm closing this. Let me know if you have any more issues!

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

2 participants