I'm kinda new to Rpi's and I have a problem executing a library called libscrc with python (I use python3), I need this to calculate a crc checksum for my RS485 communication. On pycharm on my PC everything works fine, but when I implement this on my RPI3 I get errors, I already managed to install the pyserial library and this works fine, but I keep getting errors when trying to run libscrc (this is the link to the library: https://pypi.org/project/libscrc/ ). This is the error:
Traceback (most recent call last):
File "Rs_485.py", line 1, in <module>
import libscrc
File "/home/pi/.local/lib/python3.6/site-packages/libscrc/__init__.py", line 14, in <module>
from ._crcx import *
ImportError: libpython3.6m.so.1.0: cannot open shared object file: No such file or directory
Can anyone help me? I already updated and upgraded the RPI.
When I try the following test command
pi#raspberrypi:~/codes $ python -m libscrc.testmodbus
I get:
/usr/bin/python: No module named libscrc
And I'm using python3.6 by the way
Give it a try by using the github link of the libscrc project
!pip install git+https://github.com/hex-in/libscrc.git
It worked this way for me! cheers!
The answer was found! Hope this wil help anyone out with the same problem!
Use this command!:
sudo apt-get install libpython3.6
this did the job for me! :)
Related
I was following along a tutorial where they used the SpeechRecognition module, but when I made it to the first test it returns C:\Users\USER\PycharmProjects\Fatawi\venv\Scripts\python.exe C:/Users/USER/PycharmProjects/Fatawi/main.py Traceback (most recent call last): File "C:\Users\USER\PycharmProjects\Fatawi\main.py", line 1, in <module> import speech_recognition as sr ModuleNotFoundError: No module named 'speech_recognition'
I've tried reinstalling the library multiple times along with the PyAudio library. I ran the test that PyPi has for it and it works, but I don't know how fix it from here.
Check your python interpreter environment (the python version that's run the python file) maybe it's not the same version as python when you downloaded Speech Recognition.
Check if you activating the environemt.
For better understand see this blog in geeks for geeks might help you.
So aftergoing through some of the settings of the project file and checking the Python Interpreter it didn't have the SpeechRecognition Package. So I'm assuming that something went wrong with the install.
Thank you Faisal Faraj for the help.
I'm following our tutorial. I already had python set up in VSC but I'm trying to use the Device Simulator express now. I'm getting an error when I hit play. It seems the system can't find the library error on line:
from adafruit_circuitplayground import cp
The error is:
Traceback (most recent call last):
File "c:/Users/YayaLenovoFlex/Documents/Python Scripts/trySimulator1.py", line 12, in
from adafruit_circuitplayground import cp
ModuleNotFoundError: No module named 'adafruit_circuitplayground'
Please help. I've very new to Visual Studio Code. I would rather use VSC then the MU editor if I can.
Thanks
Have you installed libraries by this command?
pip install adafruit_circuitplayground
Im just new to Python and trying to run a scripts online code here
However one error occurred:
File "C:\Python27\track.py", line 1,in <module>
import cv
ImportError: No module named cv
Can someone enlighten me?
Install OpenCV
https://opencv-python-tutroals.readthedocs.io/en/latest/py_tutorials/py_tutorials.html
It needs this package to function
Look at here http://opencv.willowgarage.com/wiki/InstallGuide%20%3A%20Debian, 'Making Python work';
third option worked for me but there is a bug there, the correct line to add bashrc is
export PYTHONPATH=$PYTHONPATH:/usr/local/lib/python2.7/site-packages
this can vary according to your python installation though.
I have been banging my head against the wall trying to get Exscript installed. After multiple failed attempts at doing it manually, I installed ActivePython and had success running "pypm install Exscript" from the cmd prompt.
I am now going through the Exscript documentation (found here https://github.com/knipknap/exscript/wiki/Python-API-Tutorial) and if I run the first example script I get an error:
>>> from Exscript.util.interact import read_login
Traceback (most recent call last):
File "<pyshell#6>", line 1, in <module>
from Exscript.util.interact import read_login
ImportError: No module named interact
So, I understand that this is saying that there is no module interact. How can I check this? Is there a way I can manually add this module? I would love to know WHY this module didnt come with the package, but that may be impossible to answer :)
Any and all help is greatly appreciated. Thank you
EDIT -
import Exscript.util works but if I try import Exscript.util.Interact I get the error. When I look in util.py I see an entry that says "from FooLib import Interact". I first thought it may just be a capitalization error (Exscript.util.interact vs util.Interact) but neither of those work. I am not sure where to go from here... :(
EDIT -
I have posted this question on the developers forums, hopefully he will have an answer for us. https://github.com/knipknap/exscript/issues/15
EDIT -
The developer suggested that I was using an old version and told me to download the latest. I had struggled installing the module manually so I googled how to easily install py modules. I found a writeup on easy_install.exe. I ran "c:\Python26>easy_install C:\Users\support\Desktop\lou\knipknap-exscript-v2.1-70-gf5583f3.tar.gz" from the cmd prompt, the module was installed (no errors) and now when i run the script it works.
Next challenge will be how to get these scripts to run as stand-alone exe's on users computers without Python installed :)
THANK YOU to everyone to commented I truely appreciate your help.
Lou
One common way packages are installed is as directories. So check your site-packages directory for an Exscript directory, and inside that there should be a util directory, and inside that there should be an interact.py file. Look for similar spellings in case the tutorial misspelled something.
I'm trying to install cx_Oracle to use Django inspectdb on an existing Oracle database to create models.py automatically. So far i'ts been very hard. I'm running a VM with Fedora 14 64bit and Python 2.7 and followed a mix of pages found with google to get it installed with sudo -E easy_install cx_Oracle
When I fire up python from terminal and try to import cx_Oracle to test the installation I get this:
>>> import cx_Oracle
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: libclntsh.so.11.1: cannot enable executable stack as shared object requires: Permission denied
I've never seen this before and don't know what to do. Any help would be very much appreciated.
Thanks in advance,
Stefano
It was SELinux, Fedora security system that was blocking it and I didn't notice! Installation was ok and it's working now. Sorry and thanks everyone.
It has occurred for me long time back
There are two set of libraries for 32 bit and 64 bit just copy these "*.so" files to the appropriate directories.
Please note there are more than 1 file[around 5 i guess] to be copied . just use a find command to locate your present location of libclntsh.so file and copy it to the respective lib directories. you can find the rest of the files since same exception pops up for everything.
You forgot to add the instantclient path in ldconfig; adding it will fix this problem.