Code Monkey home page Code Monkey logo

Comments (8)

chuan137 avatar chuan137 commented on August 27, 2024

bump;
I also wonder what the proper way to install additional python module dependencies.

from docker.

rudy-hermawan avatar rudy-hermawan commented on August 27, 2024

The installer are looking for the python usb, serial and qrcode.
Please try this (note : I am using Centos 7)

yum install python-pip
pip install pyusb
pip install pyserial
pip install qrcode

Disclaimer : I have not tested the functionality of the POS yet.

from docker.

ray-diama avatar ray-diama commented on August 27, 2024

@RudyGitHub I am running odoo on local on my windows 8.1 x64.
I ran the commands on cmd
py -m pip install pyusb
py -m pip install pyserial
py -m pip install qrcode
they were all successfully installed. I restarted the odoo service but I still got the same error saying no module named usb.core.
any guess on the matter?

from docker.

gregimagines avatar gregimagines commented on August 27, 2024

I've run into the same error. I have uninstalled and installed pyusb, pyserial, and qrcode numerous times, and have uninstalled libusb that same have had issues with, but cannot get the usb.core and evdev errors to go away.

from docker.

ray-diama avatar ray-diama commented on August 27, 2024

I have also issues with the libusb thingy, I am thinking of trying that out with openusb and see how it will workout.

from docker.

belcboo avatar belcboo commented on August 27, 2024

Update:

I found which was the issue, but I wasn't able to fix it. I'll try to explain what I found.

How Docker works: (I'll try to explain it in "layers")

Layer 1. Host
Layer 2. Docker
Layer 3. Docker Container

Layer 1. Host: In order to run docker you need a "host", it can be any computer whit any OS where you can install docker.
Layer 2. Docker: It's very similar to run a VMWare, VirtualBox, or any other program for virtualization.
Layer 3. Docker Container: Basically is a virtual machine preconfigurated for somebody to make the things easier. In our case we download a container with a Linux OS (Ubuntu I guess) preconfigurated with everything odoo needs to work.

The Layer 3 is the key here. It made us the things really easy, but at same time is our problem, when we install the usb.core package, we're doing the installation in our HOST layer and no in the Docker Container layer, and for that reason Odoo can't find that package.

Some Docker Containers allows you to have SSH to make changes as you need (For example in Windows you can download an Ubuntu through docker container, do ssh connection and install whatever you need), in our case as far I read we can't connect us through ssh to the Odoo docker container in order to install those packages.

One solution could be that somebody with privilegies to modify the docker container install those packages before we download it.

What I did:

I "solved" my issue using a Raspberry Pi with the POSBox image, you can find more info here: https://www.odoo.com/documentation/user/9.0/point_of_sale/overview/setup.html (The POSBox is a Raspberry Pi whit the POSBox image and you can download it here: https://nightly.odoo.com/trunk/posbox/)

Lastly sorry for my english, hope you can understand and found an "alternate" way to solve this issue as I did LOL.

Regards.

from docker.

clapas avatar clapas commented on August 27, 2024

The proper tool to connect to your container is nsenter, as put by the Docker people.

It looks like the odoo Docker image is missing some libraries for USB to work, which is expected as POSBox provides connectivity with printers, barcode scanners, etc. through USB.

@belcboo How did you manage to get POSBox working?

What can I do to fix this?

PD: I think we could bind-mount the missing files using -v to the docker command, but I don't know which files to map. Will get back here if I find it out.

from docker.

sle-odoo avatar sle-odoo commented on August 27, 2024

Hi,
We don't want to add all the dependencies of Odoo in the Docker image, as it is already big enough. The dependencies are declared in the requirements.txt in the upstream repository. You can just install it with pip if you want.

Regards

from docker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.