Trying to install robotpy-hal because code is failing with error no import module ‘hal’. This leads to an error with not having something like build so I tried to install that with robotpy-installer download-pip robotpy-build and need wpiutils or something like that and it seems like an endless dependency error. Is there something I’m missing here that I should have done? What the hell is happening?
I’ve done that many times. It redownloads robotpy but does not fix the error
Here’s an error for the command pip install -U pyfrc. It is the same error for the installation of many other packages like robotpy-hal.
Installing build dependencies: finished with status ‘error’
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3.7 /home/first/.local/lib/python3.7/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-3esqufkp/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple – ‘robotpy-build>=2020.1.5,<2021.0.0’ ‘robotpy-wpiutil>=2020.2.2.0,<2021.0.0’
What OS are you on?
What version of pip?
Also, are you trying to install code on the robot, or on your computer? Or both?
pip 20.0.2 python 3.7
Are you trying to install code on the robot, or on your computer? Or both?
Also, what’s the output of
Ok, I’m guessing that you’re trying to install robotpy locally? Robotpy installer is for installing robotpy on the robot, so it won’t help you in this instance.
We don’t publish Linux wheels on pypi, so the error you’re encountering is pip trying to build the wheels manually. Unfortunately, this requires a C++ compiler that is newer than the one that is available for Ubuntu 16. I’ll update the linux-specific documentation tonight.
Is there a reason you’re using Ubuntu 16? We do have wheels available for Ubuntu 18 (though not on pypi).
Also, if you’d like to discuss this in real time, feel free to stop by the RobotPy gitter.
I would love linux specific docs for this, thanks. Also this worked before for 2019 so at this point I’m trying to figure out what I changed from last year.
2019 did not require a C++ compiler, everything was pure python and worked pretty much everywhere. We’ve switched to C++ wrappers around WPILib, so everything this year is quite different. I’ve written a bit about this in our docs.
In particular, because WPILib requires a C++17 compiler, it’s a non-trivial task to publish compiled versions of RobotPy components for Linux.
A little more research shows that I have g++ 5.4 and it support c++17. However, the compile during the install of robotpy-cscore, for example, the ‘make’ invocation of g++ does not contain the required flag to use c++17. Is there a way to stop the ‘python setup.py’, fix the makefile and continue on?
robotpy-cscore uses a separate build from the other wpilib components.
Unfortunately, WPILib is not compatible with Ubuntu 16.04, I just tried it. Even if you were able to get the compilation to work, you’ll end up with the following error or something similar:
OSError: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.22' not found (required by /usr/local/lib/python3.7/dist-packages/wpiutil/lib/libwpiutil.so)`
If you don’t have the option to upgrade to Ubuntu 18.04, you could potentially install RobotPy in an Ubuntu 18.04 docker image. However there are drawbacks – in particular it would be quite difficult to get the simulation GUI working on the docker image, though technically possible.
That’s very nice of you to try. Thank you.
I just updated the documentation to mention Linux specific notes, including links to our precompiled wheels.