Crazyflie Python Problem

Discussions and questions about the Crazyflie Nano Quadcopter
Post Reply
Lama
Beginner
Posts: 12
Joined: Sun Jan 28, 2018 5:41 pm

Crazyflie Python Problem

Post by Lama »

Hello,

I want to start the Python-file "autonomousSequence" from the crazyflie-lib-python Folder. After running the python script, the System Shows me the following message

FIle: "autonomousSequence.py", line 37, in <module> Import cflib.crtp
Import Error: No module named cflib.crtp

Do i have to copy the file in the cflib.crtp Folder ?



Thanks for the help & kindly regards

Lama
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Crazyflie Python Problem

Post by arnaud »

Hi,

you need the lib installed in your system. You can install the stable version with "pip3 install cflib". If you plan to develop on the lib as well, you can install it from source by typing "pip3 install -e ." in the crazyflie-lib-python folder.

Depending on you system you have to use pip or pip3. On Linux and mac it is better to use pip3 and then run the script with python3. On windows, if you only have python3 installed you can use pip and python. If you need to use Python2, the lib is compatible with it too.
Lama
Beginner
Posts: 12
Joined: Sun Jan 28, 2018 5:41 pm

Re: Crazyflie Python Problem

Post by Lama »

Hello arnaud and thanks for your answer.

The lib was already installed. We upgraded the libary and used phyton3 to run the script instead of python.
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Crazyflie Python Problem

Post by arnaud »

Then I assume it is now working. Great!
Lama
Beginner
Posts: 12
Joined: Sun Jan 28, 2018 5:41 pm

Re: Crazyflie Python Problem

Post by Lama »

Yes this worked perfectly fine!

Thanks for your help.
Post Reply