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

PATH to per user Python install area should not be relative. #57

Closed
GrahamDumpleton opened this issue Aug 28, 2015 · 1 comment
Closed

Comments

@GrahamDumpleton
Copy link
Contributor

The Dockerfile's contain:

ENV PYTHON_VERSION=2.7 \
        PATH=.local/bin/:$PATH

Thus a relative path and not an absolute path is used to the per user Python install area used when running:

pip install --user -r requirements.txt

Presumably that relative path for the bind directory would become invalid if the web application being run changed the working directory to another directory. The consequence then would be that the web application would not then be able to find any programs which were installed as part of the Python modules installed by pip from the requirements.txt file.

Any directories in PATH should be absolute.

It should therefore use:

ENV PYTHON_VERSION=2.7 \
        PATH=$HOME/.local/bin/:$PATH
@GrahamDumpleton
Copy link
Contributor Author

Issue #58 shows why a relative path is a problem, as pip changes the working directory when installing packages. As such, installation of a package may not work if relying on being able to find a program installed by a previously installed package.

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

No branches or pull requests

3 participants