Skip to content
This repository has been archived by the owner on Jan 20, 2022. It is now read-only.

Unable to find certain pip installations after changing the python version #471

Closed
njriasan opened this issue Feb 13, 2019 · 1 comment · Fixed by #840
Closed

Unable to find certain pip installations after changing the python version #471

njriasan opened this issue Feb 13, 2019 · 1 comment · Fixed by #840

Comments

@njriasan
Copy link

njriasan commented Feb 13, 2019

So I am working on trying to run a project in Graphene SGX that requires a specific anaconda environment to build. In doing so I am running into an issue where some of the pip installed packages (but not all of them) are not able to be imported as modules. Curiously the issue appears to be that the site-packages directory doesn't contain the same contents inside and outside of Graphene.

I have gotten the anaconda version to work in general and with some pip installed packages, but not all of them.

When running a simple script to print the contents of site packages using os.listdir outside of Graphene I see that the direct contains 426 files or directories, but when run inside Graphene it only contains 204, excluding many packages I need. For example I cannot import past inside Graphene but I can do so outside and looking at the contents past is not a directory this is listed inside Graphene.

Its possible that I may be doing unnecessary imports because I was trying multiple path additions in order to try and locate these pip packages (and admittedly not doing so in the safest manner as I am still just trying to get it to run). Is it possible that memory sizes are restricting my imports? Based on some unscientific testing changes to the enclave size don't seem to effect the number of files imported. Any suggestions are appreciated.

@njriasan njriasan changed the title Unable to find certain pip installations with a modified python Unable to find certain pip installations after changing the python version Feb 13, 2019
@donporter
Copy link
Contributor

We just noticed an issue that the PAL equivalent of readdir does not accept an offset. #469

I suspect this may be a case where the directory is big enough to span two getdent/readdir calls, and you are losing the output of the second. Would you mind posting the script, and/or doing an strace on the script to see if it is doing multiple getdent calls? You can also then run graphene in debug mode and see if it is only doing one.

I am not sure how quickly we will debug this particular issue, but knowing whether it affects a real user might bump up the priority.

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

Successfully merging a pull request may close this issue.

2 participants