Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python test bindings don't work with setup.py #1358

Open
knmcguire opened this issue Mar 28, 2024 · 2 comments
Open

Python test bindings don't work with setup.py #1358

knmcguire opened this issue Mar 28, 2024 · 2 comments

Comments

@knmcguire
Copy link
Member

If I install the python bindings via these instructions and run python tests with python3 -m pytest test_python/ I get the following error:

_____________________________________ ERROR collecting test_python/test_pptraj.py ______________________________________
ImportError while importing test module '/home/knmcguire/development/bitcraze/c/crazyflie-firmware/test_python/test_pptraj.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
test_python/test_pptraj.py:4: in <module>
    import cffirmware
/home/knmcguire/.local/lib/python3.8/site-packages/cffirmware-0.1-py3.8.egg/cffirmware.py:15: in <module>
    ???
E   ModuleNotFoundError: No module named '_cffirmware'

I'll need to put the python bindings in PYTHONPATH in order to make it work:
export PYTHONPATH=<PATH_TO_>/crazyflie-firmware/build:$PYTHONPATH

@rares99
Copy link

rares99 commented Apr 5, 2024

Hello. I am trying to solve this issue myself and I have a quick question. What is PYTHONPATH in this case?

@knmcguire
Copy link
Member Author

not sure! but you can read it out by echo $PYTHONPATH 😄 its a collection of multiple paths in which python searches for any scripts. (this only works in ubuntu)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants