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

Python 3 installation #30

Closed
1am opened this issue Jul 3, 2014 · 3 comments
Closed

Python 3 installation #30

1am opened this issue Jul 3, 2014 · 3 comments

Comments

@1am
Copy link

1am commented Jul 3, 2014

Hi

I've tried installing pyFirmata with both pip and manual setup.py script and both times it failed due to invalid syntax errors.

Your site states that the library is passing python 3 tests but since I'm a python noob I'd like to ask it if is possible to install the library or should I just not bother and revert to Python 2.7.x?

PIP fails in the same part as setup.py execution. What is troubling is that pip actually thinks that the package was installed successfully so I tried running the "Basic usage" script anyway with the following result:

Traceback (most recent call last):
  File "main.py", line 6, in <module>
    from pyfirmata import Arduino, util
  File "C:\Python34\lib\site-packages\pyfirmata\__init__.py", line 2, in <module
>
    from boards import BOARDS
ImportError: No module named 'boards'

I'm running on a fresh Python 3.4 install on Windows.

E:\dev\...\pyFirmata>python setup.py install
C:\Python34\lib\distutils\dist.py:260: UserWarning: Unknown distribution option:
 'include_package_data'
  warnings.warn(msg)
C:\Python34\lib\distutils\dist.py:260: UserWarning: Unknown distribution option:
 'install_requires'
  warnings.warn(msg)
C:\Python34\lib\distutils\dist.py:260: UserWarning: Unknown distribution option:
 'zip_safe'
  warnings.warn(msg)
running install
running build
running build_py
creating build
creating build\lib
creating build\lib\pyfirmata
copying pyfirmata\__init__.py -> build\lib\pyfirmata
copying pyfirmata\boards.py -> build\lib\pyfirmata
copying pyfirmata\mockup.py -> build\lib\pyfirmata
copying pyfirmata\pyfirmata.py -> build\lib\pyfirmata
copying pyfirmata\util.py -> build\lib\pyfirmata
running install_lib
copying build\lib\pyfirmata\__init__.py -> C:\Python34\Lib\site-packages\pyfirma
ta
copying build\lib\pyfirmata\boards.py -> C:\Python34\Lib\site-packages\pyfirmata

copying build\lib\pyfirmata\mockup.py -> C:\Python34\Lib\site-packages\pyfirmata

copying build\lib\pyfirmata\pyfirmata.py -> C:\Python34\Lib\site-packages\pyfirm
ata
copying build\lib\pyfirmata\util.py -> C:\Python34\Lib\site-packages\pyfirmata
byte-compiling C:\Python34\Lib\site-packages\pyfirmata\__init__.py to __init__.c
python-34.pyc
byte-compiling C:\Python34\Lib\site-packages\pyfirmata\boards.py to boards.cpyth
on-34.pyc
byte-compiling C:\Python34\Lib\site-packages\pyfirmata\mockup.py to mockup.cpyth
on-34.pyc
  File "C:\Python34\Lib\site-packages\pyfirmata\mockup.py", line 127
    raise IOError, "Cannot read from pin %d" \
                 ^
SyntaxError: invalid syntax

byte-compiling C:\Python34\Lib\site-packages\pyfirmata\pyfirmata.py to pyfirmata
.cpython-34.pyc
  File "C:\Python34\Lib\site-packages\pyfirmata\pyfirmata.py", line 438
    raise IOError, "%s is not an input and can therefore not report" % self
                 ^
SyntaxError: invalid syntax

byte-compiling C:\Python34\Lib\site-packages\pyfirmata\util.py to util.cpython-3
4.pyc
  File "C:\Python34\Lib\site-packages\pyfirmata\util.py", line 27
    raise IOError, "No boards found in %s with identifier %s" % (base_dir, ident
ifier)
                 ^
SyntaxError: invalid syntax

running install_egg_info
removing 'C:\Python34\Lib\site-packages\pyFirmata-0.9.5-py3.4.egg-info' (and eve
rything under it)
Writing C:\Python34\Lib\site-packages\pyFirmata-0.9.5-py3.4.egg-info
@1am
Copy link
Author

1am commented Jul 3, 2014

Ok, i just found https://github.com/tino/pyFirmata/tree/py3 branch which seems to work (at least installs). Thanks!

@1am 1am closed this as completed Jul 3, 2014
@tino
Copy link
Owner

tino commented Jul 3, 2014

Hi, yeah 3.3 support is still in a different branch. Haven't had the time yet to merge it with master. Glad it works now!

@maramyy
Copy link

maramyy commented Jun 10, 2018

Hello i have the same issue , and i had just open the page that 1am added (https://github.com/tino/pyFirmata/issues/py3) but it gave me error , if there a thing i can do to run pyfirmata on python 3 inorder to interface with arduino pins please let me know
thanks in advance

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

3 participants