Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[9.0] Failed to install modules (evdev, usb.core and serial modules missing) #48

Closed
belcboo opened this issue Jan 12, 2016 · 8 comments
Closed

Comments

@belcboo
Copy link

belcboo commented Jan 12, 2016

Hi,

I'm trying to install the ESC/POS Hadware Driver but I'm receiving the following error: "Unable to install module "hw_escpos" because an external dependency is not met: No module named usb.core".

The same happened when I tried to install the module "Weighting Scale Hardware Driver" (serial missing) and "Barcode Scanner Hardware Driver" (evdev missing). Can someone help me with that please?.

I don't have problems 'calling' the module usb.core using the command "import usb.core" from python. I tried the installation in ubuntu 15.04 and fedora 23 with docker, both OS are showing the same error. I'm using ESXi and I have added a usb host controller (Some people say that they solved this issue doing that).

Thanks in advance.

@chuan137
Copy link

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

@rudy-hermawan
Copy link

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.

@ray-diama
Copy link

@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?

@gregimagines
Copy link

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.

@ray-diama
Copy link

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

@belcboo
Copy link
Author

belcboo commented Jun 9, 2016

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.

@clapas
Copy link

clapas commented Sep 27, 2016

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.

@sle-odoo
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants