Closed jason-riddle closed 8 years ago
Again, thanks for finding this! Having a knowledgable python developer to test the engine with real use cases is invaluable. We'll be sure to get these resolved as quickly as we can.
@notxarb Do you think this is related to the PATH issue you mentioned before? I wonder if /data/bin/python is still taking precedence over /code/env/bin/python?
@jason-riddle Could you provide the $PATH value that's set in there? echo $PATH
Thanks!
Here is the $PATH
.
[gonano@api /code]$ echo $PATH
/data/sbin:/data/bin:/opt/gonano/sbin:/opt/gonano/bin:/code/env/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
ah yep, that's the issue. Just to confirm, can modify your PATH and retry?
export PATH=/code/env/bin:$PATH
Thanks!
Looks good! :+1:
Thanks for the unbelievably quick responses, liking nanobox so far.
ok cool. I think we already have a fix in for this.
@glinton I'm pretty sure I saw a pull request from you in the last couple of weeks that would ensure that engine-provided PATHs would be before the default PATH. Does this sound right?
@jason-riddle awesome! Glad to hear it. We're still in our infancy but it's stabilizing quickly! We could really use your help to vet these fixes if you're willing.
@tylerflint That's correct we did have that fix in. I'm not a collaborator on the official engine so I couldn't publish. And i'm not sure if it got merged even or not
@glinton Let me fix the collaborator issue right now...
Also, my mistake, it actually has nothing to do with the engine, its nanobox-io/nanobox-docker-code#3, I'll merge that. then @jason-riddle if it doesn't work once dockerhub finishes building the image, you can just run nanobox update-images
@glinton It looks like nanobox-server will use the build image for the dev containers: https://github.com/nanobox-io/nanobox-server/blob/master/api/develop.go#L33
Does the change mentioned above need to be made for the build image as well?
@glinton ok cool, looks like that should work then. As far as launching dev from the current build container, we tried that early on and realized they had different requirements for where and what to mount. It was different enough that it was cleaner and easier to just launch a new container from the build image and mount the /data dir from the build container into it.
@jason-riddle this issue should be resolved. To get the fix you can do the following:
nanobox update-images
nanobox dev --rebuild
Note: This is without using
virtualenv
.Installing a package with the following
and attempting to import the module leads to an error.
Looking at
sys.path
, I noticed the followingwhich does not include the path where the package was actually installed (which is
/code/env/lib/python2.7/site-packages
).and looking in the directory did indeed reveal the package.