Page 1 of 1

Crazyflie Client won't open

Posted: Mon May 15, 2017 3:01 am
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!

Re: Crazyflie Client won't open

Posted: Mon May 15, 2017 7:25 am
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

Re: Crazyflie Client won't open

Posted: Mon May 15, 2017 10:38 pm
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.

Re: Crazyflie Client won't open

Posted: Tue May 16, 2017 9:52 am
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?

Re: Crazyflie Client won't open

Posted: Tue May 16, 2017 2:47 pm
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!

Re: Crazyflie Client won't open

Posted: Wed May 17, 2017 9:40 am
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.