Comments (11)
fix this damn thing!
from octoprint-docker.
Never had the chance to install plugins inside this docker container. It's strange because pip is installed. It comes with Python:2.7 : https://github.com/docker-library/python/blob/a248f4583c5f788e1af02016f762cdc323ee5765/2.7/Dockerfile
Maybe it has something to do with permissions since this container run using the octoprint user.
from octoprint-docker.
@gaetancollaud it isn't that
talisker:~ jordan$
talisker:~ jordan$ docker exec -it octoprint bash
octoprint@1d12e2176e7f:/opt/octoprint$
octoprint@1d12e2176e7f:/opt/octoprint$ pip --version
pip 9.0.1 from /usr/local/lib/python2.7/site-packages (python 2.7)
octoprint@1d12e2176e7f:/opt/octoprint$
octoprint@1d12e2176e7f:/opt/octoprint$ whoami
octoprint
octoprint@1d12e2176e7f:/opt/octoprint$
octoprint@1d12e2176e7f:/opt/octoprint$ exit
talisker:~ jordan$
talisker:~ jordan$
talisker:~ jordan$ docker exec --user root -it octoprint bash
root@1d12e2176e7f:/opt/octoprint#
root@1d12e2176e7f:/opt/octoprint# pip --version
pip 9.0.1 from /usr/local/lib/python2.7/site-packages (python 2.7)
root@1d12e2176e7f:/opt/octoprint#
root@1d12e2176e7f:/opt/octoprint# whoami
root
root@1d12e2176e7f:/opt/octoprint#
root@1d12e2176e7f:/opt/octoprint# exit
talisker:~ jordan$
I suspect a path
issue here..
I am diggin through the code now to better understand how octoprint calls pip
.
from octoprint-docker.
Thanks @hypergig Just to be sure I ran octoprint as root but same result as you would expect.
I think the problem comme from the pip.py file. The command is None, like there is no pip available. I will open a issue in the main project, maybe someone has an idea.
EDIT: interesting information here : OctoPrint/OctoPrint#981
from octoprint-docker.
As requested by @foosel by mail here is the log when octoprint starts.
octoprint | 2017-02-13 19:04:03,081 - octoprint.server - INFO - Starting OctoPrint 1.3.0.post1+g1014712 (master branch)
octoprint | 2017-02-13 19:04:03,105 - octoprint.plugin.core - INFO - Loading plugins from /opt/octoprint/venv/lib/python2.7/site-packages/OctoPrint-1.3.0.post1+g1014712-py2.7.egg/octoprint/plugins, /home/octoprint/.octoprint/plugins and installed plugin packages...
octoprint | 2017-02-13 19:04:03,613 - octoprint.plugins.discovery - INFO - pybonjour is not installed, Zeroconf Discovery won't be available
octoprint | 2017-02-13 19:04:03,614 - octoprint.plugin.core - INFO - Found 7 plugin(s) providing 7 mixin implementations, 4 hook handlers
octoprint | 2017-02-13 19:04:03,626 - octoprint.plugin.core - INFO - Loading plugins from /opt/octoprint/venv/lib/python2.7/site-packages/OctoPrint-1.3.0.post1+g1014712-py2.7.egg/octoprint/plugins, /home/octoprint/.octoprint/plugins and installed plugin packages...
octoprint | 2017-02-13 19:04:03,725 - octoprint.plugin.core - INFO - Found 7 plugin(s) providing 7 mixin implementations, 4 hook handlers
octoprint | 2017-02-13 19:04:03,727 - octoprint.filemanager.storage - INFO - Initializing the file metadata for /home/octoprint/.octoprint/uploads...
octoprint | 2017-02-13 19:04:03,728 - octoprint.filemanager.storage - INFO - ... file metadata for /home/octoprint/.octoprint/uploads initialized successfully.
octoprint | 2017-02-13 19:04:03,736 - octoprint.plugins.softwareupdate - INFO - Loaded version cache from disk
octoprint | 192.168.192.113 - - [13/Feb/2017 19:04:04] "GET /sockjs/info?t=1487012643854 HTTP/1.1" 404 -
octoprint | 2017-02-13 19:04:04,224 - octoprint.util.pip - INFO - Using "/opt/octoprint/venv/bin/python -m pip" as command to invoke pip
octoprint | 2017-02-13 19:04:04,224 - octoprint.util.pip - DEBUG - Going to figure out pip's version
octoprint | 2017-02-13 19:04:04,662 - octoprint.util.pip - INFO - Version of pip is 9.0.1
octoprint | 2017-02-13 19:04:04,662 - octoprint.util.pip - ERROR - Cannot use pip
octoprint | 2017-02-13 19:04:04,663 - octoprint.plugin.core - INFO - Initialized 7 plugin implementation(s)
octoprint | 2017-02-13 19:04:04,665 - octoprint.plugin.core - INFO - 7 plugin(s) registered with the system:
octoprint | | Announcement Plugin (bundled) = /opt/octoprint/venv/lib/python2.7/site-packages/OctoPrint-1.3.0.post1+g1014712-py2.7.egg/octoprint/plugins/announcements
octoprint | | Core Wizard (bundled) = /opt/octoprint/venv/lib/python2.7/site-packages/OctoPrint-1.3.0.post1+g1014712-py2.7.egg/octoprint/plugins/corewizard
octoprint | | CuraEngine (<= 15.04) (bundled) = /opt/octoprint/venv/lib/python2.7/site-packages/OctoPrint-1.3.0.post1+g1014712-py2.7.egg/octoprint/plugins/cura
octoprint | | Discovery (bundled) = /opt/octoprint/venv/lib/python2.7/site-packages/OctoPrint-1.3.0.post1+g1014712-py2.7.egg/octoprint/plugins/discovery
octoprint | | Plugin Manager (bundled) = /opt/octoprint/venv/lib/python2.7/site-packages/OctoPrint-1.3.0.post1+g1014712-py2.7.egg/octoprint/plugins/pluginmanager
octoprint | | Software Update (bundled) = /opt/octoprint/venv/lib/python2.7/site-packages/OctoPrint-1.3.0.post1+g1014712-py2.7.egg/octoprint/plugins/softwareupdate
octoprint | | Virtual Printer (bundled) = /opt/octoprint/venv/lib/python2.7/site-packages/OctoPrint-1.3.0.post1+g1014712-py2.7.egg/octoprint/plugins/virtual_printer
octoprint | 2017-02-13 19:04:04,666 - octoprint.filemanager - INFO - Adding backlog items from all storage types to analysis queue...
octoprint | 2017-02-13 19:04:04,669 - octoprint.filemanager - INFO - Added 0 items from storage type "local" to analysis queue
octoprint | 2017-02-13 19:04:04,671 - octoprint.server - INFO - Reset webasset folder /home/octoprint/.octoprint/generated/webassets...
octoprint | 2017-02-13 19:04:04,676 - octoprint.server - INFO - Reset webasset folder /home/octoprint/.octoprint/generated/.webassets-cache...
octoprint | 2017-02-13 19:04:05,087 - octoprint.plugins.discovery - INFO - Registered OctoPrint instance on 22ab1dc201ba for SSDP
octoprint | 2017-02-13 19:04:05,091 - octoprint.plugins.pluginmanager - INFO - Loaded plugin repository data from disk, was still valid
octoprint | 2017-02-13 19:04:05,153 - octoprint.server - INFO - Listening on http://0.0.0.0:5000
octoprint | 2017-02-13 19:04:05,169 - octoprint.server.util.sockjs - INFO - New connection from client: 192.168.192.113
octoprint | 2017-02-13 19:04:05,237 - octoprint.server - INFO - Preemptively caching / (ui _default) for {'query_string': 'l10n=en', 'path': '/', 'base_url': 'http://192.168.192.69:5000/'}
We can clearly see ERROR - Cannot use pip
but I don't know were it come from. I enabled the log debug for octoprint.util.pip
. Tell me if something else is useful ?
loggers:
octoprint.util.pip:
level: DEBUG
If it can help here is the beginning of the api/plugin/pluginmanager
call.
{
"octoprint": "1.3.0.post1+g1014712",
"os": "linux",
"pip": {
"additional_args": null,
"available": false,
"install_dir": null,
"python": "\/opt\/octoprint\/venv\/bin\/python",
"use_user": false,
"version": null,
"virtual_env": false
},
//...
}
from octoprint-docker.
My lack of docker experience might be showing here again (and the fact that I haven't yet gotten around to testing this myself) but: is the site-packages folder of the virtual environment writable by the OctoPrint process in this setup? Because this kind of output can only be produced if the check here fails: https://github.com/foosel/OctoPrint/blob/master/src/octoprint/util/pip.py#L360. And if OctoPrint can't write to the package folder associated with the python environment it also can't install packages and if it can't do that it also can't install plugins (because those are packages)
If this is in fact the problem, it might be time for me to look closer into allowing a secondary python packages folder in which to install plugins, which could then reside on the writable part of the container.
from octoprint-docker.
@foosel where is the 'package folder associated with the python environment' ?
from octoprint-docker.
May I answer? It's in /opt/octoprint/venv
directory and #3 changes permissions, originally it had root as owner user.
$ ls -l /opt/octoprint/
total 388
...
drwxr-xr-x 5 octoprint octoprint 4096 Feb 14 06:40 venv
from octoprint-docker.
@armicron Thanks for PR, it fixed the issue for me, I can now install plugins.
In the meantime I switched from gaetancollaud/octoprint to octoprint/octoprint
from octoprint-docker.
awesome work!
from octoprint-docker.
How was this fixed I have the same issue. From reading above I don't understsand what fixed this.
from octoprint-docker.
Related Issues (20)
- marlin-binary-protocol missing
- Config_Directory not properly initiated HOT 3
- Q: what is the preffered method of updating the octoprint-docker container? HOT 1
- [BUG] octoprint/octoprint:latest or :1.8.6 not up to date HOT 4
- Q: octoprint-docker on Windows HOT 2
- Multiple Webcam Support
- [BUG] Multi camera support uses wrong port HOT 1
- Can't get webcam working
- Multiple processes of mjpg streamer started HOT 7
- [BUG] Webassets are not loaded when X-Script-Name is set HOT 3
- [BUG] Loading error: Passive login failed. raspi 4 HOT 8
- Docker container with camera-streamer HOT 3
- Shutdown/Reboot commands HOT 3
- [BUG] `undefined` tag is present on Dockerhub HOT 1
- AttributeError: 'Babel' object has no attribute 'app' HOT 5
- [BUG] validating /<path>/docker-compose.yml: (root) Additional property payload is not allowed HOT 2
- upgrade to bookworm release python HOT 3
- [BUG] and proposed fix for "PermissionError: [Errno 1] Operation not permitted" due to libseccomp2 HOT 1
- [BUG] mjpg_steamer fails and needs to be restarted
- Q: How do I use with CasaOS 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 octoprint-docker.