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

New to this - HELP! #8

Open
arjundhawan opened this issue Nov 17, 2017 · 9 comments
Open

New to this - HELP! #8

arjundhawan opened this issue Nov 17, 2017 · 9 comments

Comments

@arjundhawan
Copy link

arjundhawan commented Nov 17, 2017

Hello! New to coding, and I need help. Keep getting the following error. How do I move forward?

Arjuns-MacBook-Pro:~ root# from nanoleaf import setup
from: can't read /var/mail/nanoleaf
Arjuns-MacBook-Pro:~ root# ipAddressList = setup.find_auroras()
-sh: syntax error near unexpected token `('

@foobarbecue
Copy link

foobarbecue commented Dec 1, 2017

Hi arjundhawan, the problem is that you're entering those commands into your system shell, but they are python statements rather than shell commands. You need to start a python interpreter (probably by typing "python") and then you can use the commands you've typed here.

@carlostico
Copy link

Not working either

from nanoleaf import setup
Traceback (most recent call last):
File "", line 1, in
ImportError: No module named nanoleaf

@stewartadam
Copy link

stewartadam commented Dec 4, 2017

Did you install nanoleaf with pip? (note - if you're new to coding you may want to start with something like Dive Into Python 3 to get a better feel for basic syntax & usage)

@carlostico
Copy link

Hi, had to enter commands from Venv to work thanks !!

@jacobwtyler
Copy link

Could you help me out? When I use the pip install command, I get:

pi@jacobwtyler:~/nanoleaf $ pip install nanoleaf --upgrade
Collecting nanoleaf
Using cached nanoleaf-0.4.1.tar.gz
Complete output from command python setup.py egg_info:
fatal: Not a git repository (or any of the parent directories): .git
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-build-S08u0G/nanoleaf/setup.py", line 4, in
gitVersion = subprocess.check_output("git tag -l --points-at HEAD".split()).decode('UTF-8').strip()
File "/usr/lib/python2.7/subprocess.py", line 219, in check_output
raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['git', 'tag', '-l', '--points-at', 'HEAD']' returned non-zero exit status 128

----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-S08u0G/nanoleaf/

@jacobwtyler
Copy link

I tried creating a virtualenv as you suggested and it gave the exact same error.

@stewartadam
Copy link

Python 3 is required, use 'pip3' if python 2 is the system default.

@jacobwtyler
Copy link

Okay thank you!

@VdkaShaker
Copy link

Really appreciate this post. I rarely ever deal directly with Python scripts so this was very instructive on how to get through the one time setup steps. I think it would be very helpful if you include this basic information as "requirements" when sharing the documentation, so those of us not familiar with the distinction know where to focus.

I had a similar problem with the new Lutron Caseta setup in Home Assistant. There was simply a series of commands to be run to generate the necessary files, but it took me weeks to figure out how to use them. I was encountering different versions of Python with different commands, then different versions of pip with different commands. It was all new to me. I still don't know if there were version requirements for the scripts. The series of commands that worked for me were the opposite of what worked for another user I was chatting with.

This thread actually helped me understand WHY (these can't just be run from a shell command line!). Just suggesting you provide these requirements in documentation for users.

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

6 participants