"python" in the PATH

I am new to Docker, just started few days ago and with my first try.

I installed python2 on the Ubuntu server and when run this command " npm install" I get the error below. I am not sure where to add the “python” in the PATH

npm ERR! gyp verb check python checking for Python executable “python” in the PATH

I tried to add the PATH in Docker, but it seems that is not enough.

Can python --version be found when running from the command line where you run npm install? How did you add it to the PATH?

And as you posted in the Docker forums, you’re probably somehow using Docker? We need many more details about what you’re doing (including Docker file and Compose file if applicable) to help you.

Aside, are you sure you need the old Python 2?

I am trying to install AcaWriter and it needs 2.7 as it is an old application. GitHub - genieza/acawriter: Academic Writing Analytics

i added the path in Ubuntu, it is a fresh Ubuntu 20.04 install

Yes I am using Docker.

everything is fine up to this point

Setup acawriter

Login to workspace (should take to the root /var/www)
$ composer install $ npm install

That is a 4-year-old project with outdated instructions. For example you should not follow the instructions to install Docker. Follow the official documentation. Install Docker Engine on Ubuntu | Docker Docs

And I don’t understand what this is in the README:

docker docker-compose exec workspace bash

I don’t know if it ever worked.

the command you run

is also invalid. These are two different commands and the dollar sign is probably supposed to be the prompt and the real command is this:

composer install
npm install

Since your error message indicates you did not copy and paste the commands from the README, can you share what you ran exactly? Please, don’t refer to the readme instead of sharing what you ran, because we need to see how you interpreted the instructions. For example the above command should be executed from the “workspace” service (container) so python should be in the container and not on your Ubuntu host.

On the other hand, this project is a fork of a fork… so you may want to check the original source code which is only 4 months old, however there is no new release since 2018.

docker-compose exec workspace bash

sorry typing error

i started from scratch and it seems that python2 is available now, thanks for the help.

I see. I didn’t know that the project is yours.