New to Python: wpilib doesn't exist.

When trying to deploy my code to the robot, I get the error saying:
“ImportError: No module named ‘wpilib’”.

Our programming team this year is new to python, and we have no idea as to how to make this work. Running last years’ code works fine, despite also having the library imported. Any ideas as to why this is happening?

Where is the error happening? Any other output that you might see could be helpful here.

How are you trying to deploy code to the robot?

Do you have pyfrc installed on the computer that you’re trying to deploy to the robot? What version (you should be using a 2016 version)? If you’re on Windows, you can find out by doing this on the command line to see what packages you have installed:

py -3 -m pip list

Or on linux/OSX:

pip3 list

Man, you just made me realize what the issue is, I overlooked it in my frustration. We completely forgot to install pyfrc, and we hadn’t done it yet because we’ve been having issues with pip as well. I don’t remember what errors we were getting, but I’ll give that another go.

But to answer your questions:

It’s happening at the top of the code, and stops when it can’t import wpilib. That’s about all the output we’re getting, just a couple lines of error message.

We’re deploying code through the code’s directory with

py deploy


So, we should be able to get this fixed now. Hopefully, my personal computer will be more forgiving than the teams programming computer so that I can figure this out.

If you don’t use python for things other than robotpy, I would recommend just uninstalling your old version of python (and ensuring that C:\Python34 is deleted) and installing Python 3.5. It comes with pip, and should work out of the box.

That should solve our problem entirely, thanks for the help!