Comments (10)
Hi, firstly, try setting:
$ export PYTHONPATH=.
and try running the examples again from the top directory.
In fact, you should probably pull again, as I've just committed some changes - there's now a setup.py
which will install in the proper place. Have a look at the updated readme and let me know how you get on
from luma.oled.
p.s. there also was a documentation bug which also got fixed. The first line of the example was wrong:
from oled.device import ssd13055, sh1106
It should actually be:
from oled.device import ssd1306, sh1106
from luma.oled.
Just recloned the repository and reinstalled using setup.py, still no cigar. Your first suggestion did not help either. I have a feeling that this is just me being new at python but it shouldn't be this complicated :/
from luma.oled.
Can you paste the entire error message you are getting, and what is the output from running:
$ ls -l /usr/local/lib/python2.7/dist-packages/oled/
at the command line.
You're right, it shouldn't be this hard, but there are a lot of moving parts just to squirt an image down the wire - it's worth it though in the end ;)
I'll try and help best I can
from luma.oled.
Here's the output:
-rw-r--r-- 1 root staff 7733 Feb 24 16:36 device.py
-rw-r--r-- 1 root staff 6426 Feb 24 16:36 device.pyc
-rw-r--r-- 1 root staff 26 Feb 24 16:36 __init__.py
-rw-r--r-- 1 root staff 184 Feb 24 16:36 __init__.pyc
-rw-r--r-- 1 root staff 2754 Feb 24 16:36 render.py
-rw-r--r-- 1 root staff 1417 Feb 24 16:36 render.pyc
Thanks so much for the help, it's fantastic to see the creators of open-source software supporting their work :)
from luma.oled.
Ok, so you have the latest, looking at the file sizes
What output do you get if you run (at the bash prompt) in the top-level directory:
$ python examples/demo.py
You should get a picture like this (if you've wired it up properly)
If not, is there any text/error reported at the bash shell?
from luma.oled.
I see that image, and I found that my script works just fine if I run it from the top-level directory where I installed it (yay!). However, my understanding of installing a python package with sudo python setup.py install
is that it is installed for use from any directory. Is this correct?
from luma.oled.
Once installed with setup.py, the oled
package should be available regardless of where you are in the file system, so you should be able to do something like:
$ cd ~
$ python
Python 2.7.3 (default, Mar 18 2014, 05:13:23)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from oled.device import ssd1306
>>>
And not get an import error.
As to your own scripts, if you nest them directories, then you probably ought run them from the top level, and not in the subdirectories. The other thing that always still catches me out is not having an empty __init__.py
in package directories...
Anyway, its good news you got it working. Feel free to raise bugs or feature requests
from luma.oled.
I still can't run my script from anywhere on the machine, it has to be in the directory containing the oled package. Any idea what gives?
from luma.oled.
Can you post your script here, and I will have a look (else email it to me - [email protected])
from luma.oled.
Related Issues (20)
- how do i change in code sh1106 driver , need location for code change ? HOT 2
- [question] access screens on remote Pi?
- Support for non-Raspberry Pi Linux boards HOT 1
- New Haven 2.7 oled with ssd1322 HOT 4
- ImportError: The _imagingft C module is not installed HOT 1
- White display SPI issue with 6.x kernels HOT 2
- Array is incorrectly shifted for 96x16 OLEDs. HOT 5
- Scrolling text within bounding box
- Input/output error for luma.oled HOT 6
- sys_info.py: error: I2C device not found on address: 0x3C.But i2c can detected on pi 4b arm64
- Low FPS on SSD1322 and Raspberry Pi 3B HOT 1
- Orange Pi zero2 error Timer expired HOT 2
- Wrong column offset 1.54" SH1106 I2C HOT 5
- Hardware Accelerated 3D on the SSD1306
- from oled.device import ssd1306, sh1106 ModuleNotFoundError: No module named 'oled' HOT 7
- ImportError: cannot import name 'sh1107' from 'luma.oled.device' HOT 1
- Incremental screen updates with Luma and SH1106? HOT 1
- Semi-random pixels on SSD1322 - how to fix? HOT 4
- RPi3B multiple SPI SSD1306 displays HOT 5
- Support to display latin characters HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from luma.oled.