Sam_B
Posts: 1
Joined: Tue Mar 25, 2014 11:03 am

Pi import errror!

Tue Mar 25, 2014 11:16 am

Hi.

quick question this time, When i got the latest DexterInd image, i tried (as part of installation) typing import BrickPi, its brings up. bash:import: command not found? how can i get this to work?

Sam

User avatar
DeeJay
Posts: 2027
Joined: Tue Jan 01, 2013 9:33 pm
Location: East Midlands, UK

Re: Pi import errror!

Tue Mar 25, 2014 12:24 pm

Sam_B wrote:Hi.

quick question this time, When i got the latest DexterInd image, i tried (as part of installation) typing import BrickPi, its brings up. bash:import: command not found? how can i get this to work?

Sam
The command import BrickPi looks like something you would type into a python script.

The error bash:import: command not found shows that you must have typed it into the shell (command line)
How To Ask Questions The Smart Way: http://www.catb.org/~esr/faqs/smart-questions.html
How to Report Bugs Effectively: http://www.chiark.greenend.org.uk/~sgtatham/bugs.html

User avatar
williamhbell
Posts: 291
Joined: Mon Dec 26, 2011 5:13 pm
Contact: Website Twitter

Re: Pi import errror!

Wed May 21, 2014 8:16 pm

Sam_B wrote:Hi.

quick question this time, When i got the latest DexterInd image, i tried (as part of installation) typing import BrickPi, its brings up. bash:import: command not found? how can i get this to work?

Sam
Hi Sam,

The BrickPi Python code has since been packaged as a PyPi package:
https://pypi.python.org/pypi/BrickPi
You can just use Raspbian and then follow the instructions at the top of the BrickPi article in Issue 23 of The MagPi. As DeeJay says, the import command should be part of the top of the example code rather than an installation step.

Best regards,

Will

Return to “Troubleshooting”