-
Notifications
You must be signed in to change notification settings - Fork 257
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
Sense Hat can't find RTIMU after upgrade to Python 3.5.2 #58
Comments
Can you check where RTIMU is installed to? Maybe it's installed for Python 3.4? You might want to grab a copy of RPF's fork of RTIMU lib and install it yourself. Download from https://github.com/RPi-Distro/RTIMULib |
Here are the results of my investigative work: First, I ran IDLE using Python 2.7 and issued the following commands to locate the RTIMULib:
I then searched for all files starting with RTI in the /usr/lib sub-directories:
I noticed that there is a similarly named, but not identical, .so file in the python3 directory. Checking the installed python modules via help("modules") in IDLE3 doesn't show anything with RTIMU in the name. Here are the results of checking the status of the python3-rtimulib package:
I'm not sure what all this means other than Python 2 finds the library and Python 3 doesn't. I am currently in the process of doing a manual install. I'll post the results after it finishes. |
I am happy to report that the manual install was successful. After the install, I decided to check to see what changed. Other than now working, I couldn't find what changed. The output of
reported the same list of files as before. Python 3 now reported the location of RTIMU as:
which existed before the manual install but wasn't being found. Thanks for helping me fix the problem. I'm still confused as to why using apt-get to install the latest available version of GNU R broke the link to the RTIMU library. |
You have installed an unsupported version of Python. Our packages are built to work with the versions of python available in jessie. Adding the stretch repo is expected to break many things. |
Has anyone gotten this to work? I'm hitting this same issue when trying to dockerize sense-hat |
As it's not very clear in that thread, I'd like to share what I did. Basically following
That should do the trick. Some code like this should work: from sense_hat import SenseHat
sense = SenseHat()
print('temperature', float(sense.get_temperature()))
print('humidity', float(sense.get_humidity()))
print('pressure', float(sense.get_pressure())) |
I have uploaded a test copy of RTIMULib to PyPI in order to make this process simpler. You can now Once this is confirmed and tested properly I'll push out a new sense hat version to pypi including the dependency on rtimulib, and document the process required for using in a virtualenv. |
That's very nice of you! I just tested successfully with: sudo apt install libopenjp2-7 sense-hat
pip install sense-hat rtimulib That seem to be sufficient, |
👍 |
I'm getting "PyRTIMU.h: No such file or directory" with the above suggestions. |
I ended up fixing it by installing the RTIMU Raspi fork manually. |
I'm surprised you needed to do that... Maybe I should try again with a fresh install to make sure. |
Hello :)
I am using Pycharm and Python3.7 and I am relatively new to the topic. Can someone help me what to do next? |
same problem, with python3.8 on a PRi-2 in a virtual environment
|
I suspect a packaging issue in : https://pypi.org/project/RTIMULib/7.2.1/ There is no headers in this archive: Is this intentional ? @bennuttall , @waveform I used this workaround :
in https://github.com/rzr/sense-hat-webthing/ May a new bug be open to request support pip3 along Python 3.7.3 ? Meanwhile as there is no tracker on this project, I created this page: https://github.com/RPi-Distro/RTIMULib/wiki/Python Related: |
Having this issue when trying to Dockerize this on an Arm64 (aarch64-linux-gnu-gcc) device. Cloning the rtimulib repo and building it doesn't work for me, probably because I'm missing the gcc environment (which I want to avoid having due to the needed extra space...). Are people building this without GCC?
EDIT: Solved it by adding gcc: |
Maybe fixes in RTIMULib would help ? I am checking if upstream is still active with: If not then it could be a good candidate for @abandonware team see: |
Relate-to: astro-pi#58 (comment) Signed-off-by: Philippe Coval <rzr@users.sf.net>
This helped a lot, thank you so much 👍 |
I recently upgraded the GNU R packages from 3.1.1 to 3.3.1. To do this, I had to add the stretch distribution to my /etc/apt/sources.list file. In the process of successfully upgrading GNU R, apt also chose to install an upgraded version of Python3. Now when I try to use the Sense Hat module with Python3, I get the following error message:
`Python 3.5.2+ (default, Sep 22 2016, 12:18:14)
[GCC 6.1.1 20160802] on linux
Type "copyright", "credits" or "license()" for more information.
pip3 reports that sense-hat 2.2.0 and RTIMUlib 7.2.1 are installed. I do NOT get this error when I use Python 2.7.9.
Any ideas on what got broken during the apt-get install of r-base? It was working fine before the GNU R upgrade.
The text was updated successfully, but these errors were encountered: