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

Run with: opcua-client Problem #62

Open
fine-tec opened this issue Apr 13, 2021 · 2 comments
Open

Run with: opcua-client Problem #62

fine-tec opened this issue Apr 13, 2021 · 2 comments

Comments

@fine-tec
Copy link

Hello, Everyone!

  1. I installed PyQT 5

  2. I installed python3.6.9 with python-pip3

  3. I entered pip3 install opcua-client

  4. I couldn't run this problem

Traceback (most recent call last):

File "/snap/opcua-client/18/bin/opcua-client", line 33, in
sys.exit(load_entry_point('opcua-client==0.8.0', 'console_scripts', 'opcua-client')())

File "/snap/opcua-client/18/lib/python3.6/site-packages/pkg_resources/init.py", line 474, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)

File "/snap/opcua-client/18/lib/python3.6/site-packages/pkg_resources/init.py", line 2846, in load_entry_point
return ep.load()

File "/snap/opcua-client/18/lib/python3.6/site-packages/pkg_resources/init.py", line 2450, in load
return self.resolve()

File "/snap/opcua-client/18/lib/python3.6/site-packages/pkg_resources/init.py", line 2456, in resolve
module = import(self.module_name, fromlist=['name'], level=0)

File "/snap/opcua-client/18/lib/python3.6/site-packages/uaclient/mainwindow.py", line 13, in
from uaclient.theme import breeze_resources
ModuleNotFoundError: No module named 'uaclient.theme'

  1. Could you tell me what is wrong?

Thanks for you kindness help!

@CuriousCrook
Copy link
Contributor

Hello fine-tec,

I have the same problem here. The cause is that the setuptools by default do not install subpackages. With a small change in setup.py you can fix the problem.

Change line 1 from
from setuptools import setup
to
from setuptools import setup, find_packages

and line 8 from
packages=["uaclient"],
to
packages=find_packages(),

Then you call clone the project and install via pip.

With kind regards
CC

@CuriousCrook
Copy link
Contributor

I found out a funny thing yesterday. When you install the opcua-client-gui in Linux the sub-package "theme" is installed automatically. But not if you use Windows!

I installed it both times on the same way.

  1. clone
  2. pip install -e

If you add the change described in my last comment, it will work in Windows too.

With kind regards
CC

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

2 participants