Comments (7)
Hmm... do you get similar output from these commands in the virtualenv?
(papertty) pi@rasputin:~/code/PaperTTY $ pip list
Package Version
------------- -------
click 6.7
Pillow 5.2.0
pip 18.0
pkg-resources 0.0.0
RPi.GPIO 0.6.3
setuptools 40.1.0
spidev 3.2
wheel 0.31.1
(papertty) pi@rasputin:~/code/PaperTTY $ pip --version
pip 18.0 from /home/pi/.virtualenvs/papertty/lib/python3.5/site-packages/pip (python 3.5)
(papertty) pi@rasputin:~/code/PaperTTY $ which python; python --version
/home/pi/.virtualenvs/papertty/bin/python
Python 3.5.3
from papertty.
My version:
~/PaperTTY $ pip list
Package Version
------------- -------
click 6.7
Pillow 5.2.0
pip 18.0
pkg-resources 0.0.0
RPi.GPIO 0.6.3
setuptools 40.2.0
spidev 3.2
wheel 0.31.1
pip --version
pip 18.0 from /home/pi/.virtualenvs/papertty/lib/python3.5/site-packages/pip (python 3.5)
~/PaperTTY $ which python
/home/pi/.virtualenvs/papertty/bin/python
:~/PaperTTY $ python --version
Python 3.5.3
from papertty.
I need to take a closer look later on the actual reason when I have time, but it seems that I had the system package python3-pil
installed on the system (via apt) and removing that I also get the same error in virtualenv.
So a workaround for now: sudo apt-get install python3-pil
.
If you find out what should be added to requirements, or if some pip trickery fixes it, do tell.
from papertty.
Seems that's not the only one. After installing the package at the system level and trying again, I get:
~/PaperTTY $ sudo ./papertty.py list
Traceback (most recent call last):
File "./papertty.py", line 14, in <module>
import drivers.drivers_base as drivers_base
File "/home/pi/PaperTTY/drivers/drivers_base.py", line 19, in <module>
import spidev
ImportError: No module named 'spidev'
Installing python3-spidev and trying again, I get:
~/PaperTTY $ sudo ./papertty.py list
Traceback (most recent call last):
File "./papertty.py", line 14, in <module>
import drivers.drivers_base as drivers_base
File "/home/pi/PaperTTY/drivers/drivers_base.py", line 20, in <module>
import RPi.GPIO as GPIO
ImportError: No module named 'RPi'
I suspect that it is pulling multiple packages from the system. I'm going to work down the chain.
from papertty.
Hmm, in that case it appears the virtualenv doesn't work as intended...
from papertty.
Ah, ok, this is because of sudo
, ie. the environment changes.
Two ways to run it:
Activating the virtualenv within the sudo
command:
sudo bash -c ". ~pi/.virtualenvs/papertty/bin/activate; ./papertty.py --driver epd2in13 terminal --autofit"
Or, simpler, just running the interpreter directly, ensuring the env gets set:
sudo ~/.virtualenvs/papertty/bin/python3 ./papertty.py --driver epd2in13 terminal --autofit
I'll update the docs. Thanks for submitting the issue.
from papertty.
Fixed in cea7132.
from papertty.
Related Issues (20)
- Screen has strange looking streaks HOT 3
- 7in5_V2 unusable slow? HOT 3
- No read access to /dev/vcsa1 - maybe run with sudo HOT 3
- PaperTTY on mac/osx HOT 1
- Updates are received in VNC mode only if other VNC client is connected to server HOT 1
- Optimizing refresh rate on 7.8'' Waveshare e-ink HOT 24
- What's the optimal settings for 6"HD? HOT 7
- Starting Up at Boot HOT 15
- Last known 'good' version of Raspbian OS for PaperTTY - and help in updating the install guide? HOT 24
- PaperTTY on Laptops with an IT8951 controller HOT 9
- Getting error init() got an unexpected keyword argument 'vcom' when trying to run PaperTTY HOT 1
- EPD2in13v4 and moving in line with waveshare reccommendations HOT 6
- Adjusting PaperTTY to work with weAct 2.9 HOT 6
- Is it possible to use it with a 13.3" monochrom e-Paper Display
- 3.7” display support
- Support for EPD7in5v_v2 HOT 2
- Issue with framebuffer display HOT 1
- ModuleNotFoundError when following poetry install HOT 1
- Completely non functional with 2in13V2 and Pi Zero W HOT 5
- Display doesn't update properly unless --invert HOT 2
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 papertty.