Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Python (http://www.chiefdelphi.com/forums/forumdisplay.php?f=187)
-   -   New to Python: wpilib doesn't exist. (http://www.chiefdelphi.com/forums/showthread.php?t=142624)

climavarus 26-01-2016 21:51

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?

virtuald 26-01-2016 22:18

Re: New to Python: wpilib doesn't exist.
 
Quote:

Originally Posted by climavarus (Post 1530691)
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:

Code:

py -3 -m pip list
Or on linux/OSX:

Code:

pip3 list

climavarus 27-01-2016 09:40

Re: New to Python: wpilib doesn't exist.
 
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
Code:

py robot.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.

virtuald 27-01-2016 09:47

Re: New to Python: wpilib doesn't exist.
 
Quote:

Originally Posted by climavarus (Post 1530874)
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.

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.

climavarus 27-01-2016 13:56

Re: New to Python: wpilib doesn't exist.
 
That should solve our problem entirely, thanks for the help!


All times are GMT -5. The time now is 19:52.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi