title | page_id |
---|---|
Installation |
install |
This project requires Python 3.10+.
To install on Python 3.13, build tools and Python development headers are required.
See below sections for more platform-specific requirements.
git clone https://github.com/bitcraze/crazyflie-lib-python.git
cd crazyflie-lib-python
pip install -e .
pip uninstall cflib
Note: If you are developing for the cflib you must use python3. On Ubuntu (20.04+) use pip3
instead of pip
.
The following should be executed in the root of the crazyflie-lib-python file tree.
This section contains a very short description of how to use virtualenv (local python environment) with package dependencies. If you don't want to use virualenv and don't mind installing cflib dependencies system-wide you can skip this section.
-
Install virtualenv:
pip install virtualenv
-
create an environment:
virtualenv venv
-
Activate the environment:
source venv/bin/activate
-
To deactivate the virtualenv when you are done using it
deactivate
If you want some extra help with keeping to the mandated Python coding style you can install hooks that verify your style at commit time. This is done by running:
$ pip3 install pre-commit
go to crazyflie-lib-python root folder and run
$ pre-commit install
$ pre-commit run --all-files
This will run the lint checkers defined in .pre-commit-config-yaml
on your proposed changes and alert you if you need to change anything.
For information and installation of the toolbelt.
- Check to see if you pass tests:
tb test
- Check to see if you pass style guidelines:
tb verify
Note: Docker and the toolbelt is an optional way of running tests and reduces the work needed to maintain your python environment.
With linux, the crazyradio is easily recognized, but you have to setup UDEVpermissions. Look at the usb permission instructions to setup udev on linux.
Look at the Zadig crazyradio instructions to install crazyradio on Windows
If you're using Python 3.13, you need to install Visual Studio. During the installation process, you only need to select the Desktop Development with C++ workload in the Visual Studio Installer.
If you are using python 3.12 on mac you need to install libusb using homebrew.
$ brew install libusb
If your Homebrew installation is in a non default location or if you want to install libusb in some other way you might need to link the libusb library like this;
$ export DYLD_LIBRARY_PATH="YOUR_HOMEBREW_PATH/lib:$DYLD_LIBRARY_PATH"