Fresh Ubuntu 20.04 setup, dependencies not installed
aaronchongth opened this issue · 2 comments
Bug report
Required information:
- Operating system and version:
- Ubuntu 20.04
- OpenRMF installation type:
- source
- OpenRMF version or commit hash
- main
- ROS distribution and version:
- galactic
- ROS installation type:
- binaries
- Package or library, if applicable:
- api-server
Description of the bug
With a freshly installed Ubuntu 20.04, following the steps to setup rmf-web
, I found that I had to manually install a few extra packages to get api-server
to work,
# source rmf
git clone https://github.com/open-rmf/rmf-web
cd rmf-web
sudo apt update && sudo apt install curl
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash
source ~/.bashrc
nvm install 14
source ~/.bashrc
pip3 install pipenv
npm install -g npm@latest
source ~/.bashrc
./script/bootstrap.sh
cd packages/api-server
npm run start
I get,
> api-server@0.0.0 start
> ../../scripts/nws.sh build -d && rm -rf run && mkdir -p run && RMF_API_SERVER_CONFIG=sqlite_local_config.py pipenv run python -m api_server
sh: 1: pipenv: not found
npm ERR! Lifecycle script `start` failed with error:
npm ERR! Error: command failed
npm ERR! in workspace: api-server@0.0.0
npm ERR! at location: /home/aaron/workspaces/ncs/ncs-rmf-web/packages/api-server
Uninstalled pipenv
and installed using apt
,
pip3 uninstall pipenv
sudo apt install pipenv
npm run start
I get,
> api-server@0.0.0 start
> ../../scripts/nws.sh build -d && rm -rf run && mkdir -p run && RMF_API_SERVER_CONFIG=sqlite_local_config.py pipenv run python -m api_server
Creating a virtualenv for this project…
Using /usr/bin/python3.8 (3.8.10) to create virtualenv…
⠋ModuleNotFoundError: No module named 'virtualenv.seed.via_app_data'
Error while trying to remove the /home/aaron/.local/share/virtualenvs/ncs-rmf-web-C144gG1b env:
No such file or directory
Virtualenv location:
Warning: Your Pipfile requires python_version 3.8, but you are using None (/bin/python).
$ pipenv check will surely fail.
Warning: There was an unexpected error while activating your virtualenv. Continuing anyway…
Error: the command python could not be found within PATH or Pipfile's [scripts].
npm ERR! Lifecycle script `start` failed with error:
npm ERR! Error: command failed
npm ERR! in workspace: api-server@0.0.0
npm ERR! at location: /home/aaron/workspaces/ncs/ncs-rmf-web/packages/api-server
Install python-is-python3
,
sudo apt install python-is-python3
npm run start
After that I got missing dependencies on tortoise-orm
, pydantic
, fastapi
, uvicorn
, rx
, after fixing those, npm run start
works.
pip3 install tortoise-orm pydantic fastapi uvicorn rx
npm run start
Unfortunately, after messing around with virtualenv
for a bit, I could not get the same behaviors any more, and it keeps complaining that tortoise-orm
cannot be found. The fix was to manually install these packages into the virtual environment,
pipenv run pip3 install tortoise-orm pydantic fastapi uvicorn rx jwt socketio flask-socketio numpy pyyaml
npm run start
Some updates, I realized I needed to run
pipenv run pip3 install tortoise-orm pydantic fastapi uvicorn rx jwt socketio flask-socketio numpy pyyaml uvicorn[standard]
npm run start
with the additional uvicorn[standard]
which carried the websocket libraries
Closing this as it has gone stale, as far as I know #633, is the only fix we require for fresh systems at the moment