Cannot successfully install robotpy-ctre

We are trying to install robotpy-ctre on our driver station laptop. I tried installing it by running the following command:

pip install robotpy-ctre

I have also seen on the robotpy docs it says to install it like so:

py -3 -m pip install -U robotpy[ctre]

When I run “pip list” to check what packages are installed, “robotpy-ctre” appears. However, VS Code says that it is not installed. I know that it is fine as long as it is installed on the robot, but I am confused why it wont work on our laptop. Maybe I am installing it wrong?

You need to ensure that vscode is using the same python that you are invoking when you are doing pip. See Using Python Environments in Visual Studio Code , and if you can’t figure it out from that then feel free to post here again.

The install procedure is slightly different for 2024. I am still working on updating the installation docs for the robotpy site, but the FRC docs site is up to date: FRC Python Programming — FIRST Robotics Competition documentation

It is still not working. There are three pythons that appear when I set the interpreter.

There is one from the Microsoft store located at “AppData/Local/Microsoft/WindowsApps/python3.12.exe”. This is the one that is “recommended” by VS Code.

Another one is located at “AppData/Local/Programs/Python/Launcher/py.exe”. This one says it is “global”.

The last one is located at “AppData/Local/Programs/Python/Python312/python.exe”.

I tried all of these but the problem still persists. I am wondering why everything is saying ctre is not installed. I have tried installing it in every way I have found online, and it gives me the “requirement already satisfied” message each time.

I installed robotpy and rev without difficulty and they are both detected by VSCode. I am not sure why ctre is different. Are there any other things I could try?

Oh.

The package name is now phoenix5, not ctre. That might be why you think vscode isn’t seeing it?

See docs at CTRE Libraries — RobotPy CTRE 2024.1.1 documentation

@asodhi was that it?

Yes, this was the solution. Everything seems to be working now. Thanks.

1 Like