python doesn't recognize packages from a site-packages on a volume
up vote
0
down vote
favorite
Im trying to have 2 docker containers. one of them holding the dependencies and one of them running code that is using these packages.
I installed all the necessary packages in the first container, on the mounted folder that the two containers share. I then set the PYTHONPATH on the second container to point to the shared directory as well.
but when I try to import a module it is not available.
Even more so, the packages are not available to me in the first container when trying to import them (even though I set the PYTHONPATH)
how can I make this work so that one container will install the dependencies and the other will just point to them?
python docker installation pip docker-compose
add a comment |
up vote
0
down vote
favorite
Im trying to have 2 docker containers. one of them holding the dependencies and one of them running code that is using these packages.
I installed all the necessary packages in the first container, on the mounted folder that the two containers share. I then set the PYTHONPATH on the second container to point to the shared directory as well.
but when I try to import a module it is not available.
Even more so, the packages are not available to me in the first container when trying to import them (even though I set the PYTHONPATH)
how can I make this work so that one container will install the dependencies and the other will just point to them?
python docker installation pip docker-compose
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
Im trying to have 2 docker containers. one of them holding the dependencies and one of them running code that is using these packages.
I installed all the necessary packages in the first container, on the mounted folder that the two containers share. I then set the PYTHONPATH on the second container to point to the shared directory as well.
but when I try to import a module it is not available.
Even more so, the packages are not available to me in the first container when trying to import them (even though I set the PYTHONPATH)
how can I make this work so that one container will install the dependencies and the other will just point to them?
python docker installation pip docker-compose
Im trying to have 2 docker containers. one of them holding the dependencies and one of them running code that is using these packages.
I installed all the necessary packages in the first container, on the mounted folder that the two containers share. I then set the PYTHONPATH on the second container to point to the shared directory as well.
but when I try to import a module it is not available.
Even more so, the packages are not available to me in the first container when trying to import them (even though I set the PYTHONPATH)
how can I make this work so that one container will install the dependencies and the other will just point to them?
python docker installation pip docker-compose
python docker installation pip docker-compose
edited Nov 19 at 16:16
asked Nov 19 at 16:00
NotSoShabby
17312
17312
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53378445%2fpython-doesnt-recognize-packages-from-a-site-packages-on-a-volume%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown