NoModuleFound - Cscore

We are getting an error saying that there is no module found, Cscore, even though that Pip says that it’s installed on the RoboRIO.

1 Like

There is no Cscore module, but there is a cscore module.

  • What’s the exact error message you’re getting, including all context? And can you show which lines of code are having the issue?
  • What’s the exact output of py -m robotpy_installer list?

When attempting to deploy we receive this error:
Traceback (most recent call last):
File “C:\Users\Team1288\Desktop\cem\robot.py”, line 4, in
import cscore
ModuleNotFoundError: No module named ‘cscore’

py -m robotpy_installer list outputs:
Package Version


numpy 1.22.2
pip 21.2.4
pynetworktables 2021.0.0
pyntcore 2022.2.1.2
robotpy 2022.0.33
robotpy-cscore 2022.0.3
robotpy-ctre 2022.0.5
robotpy-hal 2022.2.1.1
robotpy-libgfortran4 7.3.0+r1
robotpy-openblas 0.3.19+r1
robotpy-opencv 4.5.5+r1
robotpy-opencv-core 4.5.5+r1
robotpy-rev 2022.0.1
robotpy-wpilib-utilities 2022.0.1
robotpy-wpimath 2022.2.1.4
robotpy-wpiutil 2022.3.1.3
setuptools 58.1.0
wpilib 2022.2.1.5

The reason you’re getting the import error is because you don’t have cscore installed on your computer. When you run robot.py deploy, it executes your robot.py code, so if your robot.py imports cscore, it expects it to exist on your computer. We don’t distribute cscore for Windows for a variety of reasons.

Please read the RobotPy image processing documentation and change your code to follow its recommendations for running image processing code on the roborio. In particular, make sure you heed this warning:

  • Never import the cscore package from your robot code, it will just waste memory

Either of these two examples demonstrate the correct way to use cscore from a RobotPy program:

Thanks for helping us.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.