mwasilak / txThings

CoAP library for Twisted
94 stars 43 forks source link

No module named txthings.resource #22

Open sheshna opened 6 years ago

sheshna commented 6 years ago

Hi am new to coap and python but need to use it for my project.

when i start the coap server. am having the following prob, please advise asap :(

pi@raspberrypi:~/txThings/examples $ python server.py Traceback (most recent call last): File "server.py", line 15, in import txthings.resource as resource ImportError: No module named txthings.resource

engrjislam commented 5 years ago

There are 4 ways to resolve this problem

  1. copy and paste txthings to examples directory

  2. Install txthings library

     pip install txthings  
  3. Run setup.py as --

     python setup.py install

    I think option 3 is best way to install other dependencies.

  4. There could be another way if you make a requirements.txt file and put

    twisted
    txthings
    ipaddress
    service_identity

    save and close. Then run

    pip install -r requirements.txt