Jump to content
  • 0

wiringpi and easy_install on NanoPi M4


Jeffer
 Share

Question

I'm trying to install wiringpi by following the instruction given here https://github.com/Pavelectric/WiringPi_M4.

Most of the steps that I followed worked fine but when I do the very last command below,

Quote

$ sudo easy_install wiringpi-2.44.4-py3.6-linux-aarch64.egg

I get a following error,

Quote

Traceback (most recent call last):

  File "/usr/local/bin/easy_install", line 11, in <module>

    load_entry_point('setuptools==33.1.1', 'console_scripts', 'easy_install')()

  File "/home/pi/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 489, in load_entry_point

    return get_distribution(dist).load_entry_point(group, name)

  File "/home/pi/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2843, in load_entry_point

    return ep.load()

  File "/home/pi/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2434, in load

    return self.resolve()

  File "/home/pi/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2440, in resolve

    module = __import__(self.module_name, fromlist=['__name__'], level=0)

  File "/usr/local/lib/python3.6/dist-packages/setuptools-33.1.1-py3.6.egg/setuptools/command/easy_install.py", line 51, in <module>

  File "/usr/local/lib/python3.6/dist-packages/setuptools-33.1.1-py3.6.egg/setuptools/archive_util.py", line 11, in <module>

ImportError: cannot import name 'ContextualZipFile'

I googled how to deal with this kind of error, and some people tell that 'ContextualZipFile'  in archive_util.py doesn't have to be installed so I just need to comment that out.

Although, I couldn't find  '/usr/local/lib/python3.6/dist-packages/setuptools-33.1.1-py3.6.egg/setuptools/archive_util.py', 

I did that comment out solution to the all files below, which I got by doing find-command-research

Quote

/home/pi/Downloads/WiringPi_M4-master/setuptools-33.1.1/build/lib/setuptools/archive_util.py

/home/pi/Downloads/WiringPi_M4-master/setuptools-33.1.1/setuptools/archive_util.py

/home/pi/.local/lib/python3.6/site-packages/setuptools/archive_util.py

/home/pi/.pyenv/versions/3.5.6/lib/python3.5/site-packages/setuptools/archive_util.py


Now I don't know what to do here... It is very nice if anyone can help me get out of this darkness...

 

Thank you, 

 

 

 

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

Armbian is a community driven open source project. Do you like to contribute your code?

  • 0

Thank you for replying to my question.

After I tried with different .img file, which is nightly I think, everything worked well.

I successfully installed wiringpi both in Python2 and Python3.

 

But a problem now is that I get "Segmentation fault" errors when I try to use call back function with 

wiringpi.wiringPiISR(PIN_TO_SENSE, wiringpi.GPIO.INT_EDGE_BOTH, gpio_callback)

in some codes such as shown here https://github.com/WiringPi/WiringPi-Python/blob/master/examples/callback.py.

 

as soon as I command 

wiringpi.wiringPiISR(PIN_TO_SENSE, wiringpi.GPIO.INT_EDGE_BOTH, gpio_callback)

the gpio_callback function which I defined execute some times (typically ~10 times), 

that segmentation fault error occurs.

 

I have tested it with python2 and python3 as well.

Do you have any idea why this happens or maybe how to deal with this?

 

Thank you,

 

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...