fprime: Installation Guide Clarifications (Virtual Env Troubleshooting, Werkzeug Import Error)
A couple clarifications/additions I thought might be helpful after running through the installation guide myself (I don’t think any of these changes are urgent):
Possible Clarifications
- Changing
cd <path/to/fprime/checkout>
tocd <path to fprime checkout>
, to be clear that there isn’t a folder calledfprime/checkout
- This should already be clear to most Git users but IMO would be slightly clearer if changed
Errors Encountered (Add to Troubleshooting?)
I ran the tutorial on a Ubuntu 18.04 VM (run via Vagrant/VirtualBox on a Windows 10 machine). The VM was run in headless mode (i.e. without a GUI, used via SSH).
-
While installing F’, I ran into an error when trying to create the virtual environment via
python3 -m venv ./fprime-venv
in a shared folder. The error read as follows:Error: [Errno 71] Protocol error: 'lib' -> '/vagrant_data/<...folder path...>/fprime-venv/lib64'
I eventually solved this by following this StackOverflow post and moving to the (non-shared) home directory; I’m not sure if this error is Vagrant-specific or not, but creating the virtual environment folder in a non-shared folder fixed the error.
It might be worth noting to not try running this command in a shared folder if problems arise.
-
While testing the installation by running
fprime-gds -g html -d <path/to/fprime/checkout>/Ref
after a successful build, I encountered the following error:Error: While importing "fprime_gds.flask.app", an ImportError was raised: Traceback (most recent call last): File "/home/vagrant/fPrimeTut/fprime-venv/lib/python3.6/site-packages/flask/cli.py", line 240, in locate_app __import__(module_name) File "/home/vagrant/fPrimeTut/fprime-venv/lib/python3.6/site-packages/fprime_gds/flask/app.py", line 12, in <module> import flask_uploads File "/home/vagrant/fPrimeTut/fprime-venv/lib/python3.6/site-packages/flask_uploads.py", line 26, in <module> from werkzeug import secure_filename, FileStorage ImportError: cannot import name 'secure_filename' [ERROR] Failed to run application: python3 -u -m flask run. Error: python3 stopped with code 2 sooner than 2 seconds.
I’m still not sure what the solution to this is (updating requirements.txt didn’t fix it).
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 15 (4 by maintainers)
…but you didn’t create a new virtual environment? If not: