alonho / pytrace

pytrace is a fast python tracer. it records function calls, arguments and return values. can be used for debugging and profiling.
Other
447 stars 21 forks source link

doesnt seem to respect virtualenv #11

Open techdragon opened 11 years ago

techdragon commented 11 years ago

several dependencies in my django project that I had customised inside a virtualenv for django 1.5 compatibility, break when the django is launched with pytrace.

Updating my system wide site-packages seems to fix the issue leading to the conclusion that somehow pytrace is breaking out of the virtualenv. The virtualenv was created with no site packages and set to not use globals, aiming for a clean isolated virtualenv.

Not sure how pytrace is doing this. Both pytrace initially & the reader are launched from inside the virtualenv.

If this is intended behaviour please document it. Non standard behaviour in a virtualenv is pretty important to know as it limits the possible uses for pytrace pretty severely.

alonho commented 11 years ago

Are you sure pytrace was installed using the virtualenv? if it was installed globally it will use the global python interpreter and libraries.