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

install pydnp3 done, how to import it #17

Open
THS-Laker opened this issue Oct 17, 2019 · 1 comment
Open

install pydnp3 done, how to import it #17

THS-Laker opened this issue Oct 17, 2019 · 1 comment

Comments

@THS-Laker
Copy link

THS-Laker commented Oct 17, 2019

install pydnp3 library by :
pip install pydnp3
install it success, and pip list as following:
Package Version


pybind11 2.4.3
pydnp3 0.1.0
python-dateutil 2.8.0
pytz 2019.3
query-string 2019.4.13
request 2019.4.13
requests 2.22.0
setuptools 41.2.0
six 1.12.0
soupsieve 1.9.4
trollius 2.2.post1
urllib3 1.25.6
wheel 0.33.6

~\Python_test>python
Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:53:40) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.

import pydnp3
Traceback (most recent call last):
File "", line 1, in
ImportError: No module named pydnp3

so, anyone know how to import it?

i use command "pip show -f pydnp3", as following:
Name: pydnp3
Version: 0.1.0
Summary: pydnp3 -- python binding for opendnp3
Home-page: http://github.com/Kisensum/pydnp3
Author: Anh Nguyen
Author-email: anh@kisensum.com
License: Apache 2.0
Location: c:\portablegit\usr\bin\lib\site-packages
Requires: pybind11
Required-by:
Files:
pydnp3-0.1.0.dist-info\DESCRIPTION.rst
pydnp3-0.1.0.dist-info\INSTALLER
pydnp3-0.1.0.dist-info\LICENSE.txt
pydnp3-0.1.0.dist-info\METADATA
pydnp3-0.1.0.dist-info\RECORD
pydnp3-0.1.0.dist-info\WHEEL
pydnp3-0.1.0.dist-info\metadata.json
pydnp3-0.1.0.dist-info\top_level.txt
pydnp3.so

so the question is changed to how to import .so file into python?

@garretfick
Copy link
Contributor

You shouldn't need to import the .so directly. Have a look at the examples in the examples folder for how to use this in python.

https://github.com/ChargePoint/pydnp3/tree/master/examples

In short, you will import this as

from pydnp3 import opendnp3, openpal, asiopal, asiodnp3

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