Crazyflie Client won't open

Post here to get support
Post Reply
bpospeck
Beginner
Posts: 14
Joined: Tue Jan 10, 2017 4:42 am

Crazyflie Client won't open

Post by bpospeck »

I can't get the Crazyflie client to open up at all. It's the same issue as viewtopic.php?f=5&t=2352. I have installed Pyqt5 as per the solution there, but now I'm getting the following error when trying to run it.

Code: Select all

Traceback (most recent call last):
  File "/usr/lib/python3.4/runpy.py", line 151, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name)
  File "/usr/lib/python3.4/runpy.py", line 104, in _get_module_details
    spec = importlib.util.find_spec(mod_name)
  File "/usr/lib/python3.4/importlib/util.py", line 86, in find_spec
    parent = __import__(parent_name, fromlist=['__path__'])
  File "/home/bitcraze/projects/crazyflie-clients-python/src/cfclient/__init__.py", line 45, in <module>
    VERSION = pkg_resources.require("cfclient")[0].version
  File "/usr/lib/python3/dist-packages/pkg_resources.py", line 725, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python3/dist-packages/pkg_resources.py", line 632, in resolve
    raise VersionConflict(dist,req) # XXX put more info here
pkg_resources.VersionConflict: (cflib 0.1.0 (/home/bitcraze/projects/crazyflie-clients-python/crazyflie-lib-python), Requirement.parse('cflib>=0.1.1'))
It looks like I need to update cflib? If so, what's the best way to do that? I've run update all projects and it's said everything is up to date. Thanks for your help!
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Crazyflie Client won't open

Post by arnaud »

Hi,

How to update cflib depends of how you installed it.

If you have it in a development folder, pulls the latest version and install it for development:

Code: Select all

cd folder/to/crazyflie-lib-python
git pull
pip install -e .
If you have installed it with pip:

Code: Select all

pip install cflib
bpospeck
Beginner
Posts: 14
Joined: Tue Jan 10, 2017 4:42 am

Re: Crazyflie Client won't open

Post by bpospeck »

Thanks for the quick response. I have done as you suggested with pip, but it wouldn't install anything, so I added the --upgrade flag to it. It said that it worked and told me cflib was up to date after subsequent upgrade attempts. I still get the same error code as above though and the client won't open.
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Crazyflie Client won't open

Post by arnaud »

You seems to be running on Linux so you should then use the python 3 version of pip (cfclient is using python3). Have you run the commands with pip3 as well?
bpospeck
Beginner
Posts: 14
Joined: Tue Jan 10, 2017 4:42 am

Re: Crazyflie Client won't open

Post by bpospeck »

I wasn't aware that pip had different versions like python. That does make sense though, since pip usually seems to come along with python installations. Using pip3 did get it to work after running it with the github pull and installation. Thanks for the help!
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Crazyflie Client won't open

Post by arnaud »

Glad that it worked. Since python 2 and 3 are not fully compatible there is 2 package repository in your computer, one for python2 one for 3, this is why there is 2 pip on linux. On other OS there might be only one PIP if only one version of python is installed.
Post Reply