amperka / ino

Command line toolkit for working with Arduino hardware
http://inotool.org
MIT License
1.08k stars 232 forks source link

OSError: [Errno 2] No such file or directory: '/usr/share/arduino/libraries' #204

Open chrisspen opened 9 years ago

chrisspen commented 9 years ago

I'm on Linux, but the Ubuntu packages are so old, I just downloaded the pre-compiled binary from arduino.cc and installed it into ~/arduino-1.5.8. However, ino seems unable to handle a manual installation, since every command returns the error:

$ ino build
Traceback (most recent call last):
  File "/usr/local/bin/ino", line 6, in <module>
    main()
  File "/usr/local/lib/python2.7/dist-packages/ino/runner.py", line 76, in main
    args.func(args)
  File "/usr/local/lib/python2.7/dist-packages/ino/commands/build.py", line 285, in run
    self.scan_dependencies()
  File "/usr/local/lib/python2.7/dist-packages/ino/commands/build.py", line 247, in scan_dependencies
    lib_dirs = [self.e.arduino_core_dir] + list_subdirs(self.e.lib_dir) + list_subdirs(self.e.arduino_libraries_dir)
  File "/usr/local/lib/python2.7/dist-packages/ino/utils.py", line 41, in list_subdirs
    entries = [e for e in os.listdir(dirname) if e not in exclude and not e.startswith('.')]
OSError: [Errno 2] No such file or directory: '/usr/share/arduino/libraries'

Is it possible to configure ino to work with a non-packaged Linux installation?

nejadb commented 9 years ago

Having this issue as well. It looks like ino finds the arduino files in ino/environment.py. I tried to edit and build from source but I haven't been successful yet. It would be nice to just set a config flag somewhere.

nathanejohnson commented 9 years ago

Looks like you can specify with --arduino-dist. This should work with your ~/.inorc or ino.ini file if you don't want to have to specify it every time. Maybe something like this (haven't tried it)

[list-models]
arduino-dist=/path/to/arduino

[preproc]
arduino-dist=/path/to/arduino

[build]
arduino-dist=/path/to/arduino

[upload]
arduino-dist=/path/to/arduino
chrisspen commented 9 years ago

I fixed this by symlinking my local path to /usr/share/arduino. However, this only works with version < 1.5, since that introduces some folder changes with ino does not yet support.

nejadb commented 9 years ago

Solid info, thanks all. I'm using 1.6 right now so I'm not sure I'll downgrade but I'll play around with it.