I’ve downloaded a module called objgraph to track for a memory leak: https://mg.pov.lt/objgraph/
I downloaded it using pip on the main terminal (following this instructional video: https://www.youtube.com/watch?v=yBdZZGPpYxg )
objgraph now works in python (using IDLE), but if I call it in PsychoPy it doesn’t. Sorry if this is a stupid question, but how do I get it to work in PsychoPy?
Hi @Sam_Leak , how have you installed PsychoPy?
Hi @dvbridges - I’ve been downloading the StandalonePsychoPy versions from https://github.com/psychopy/psychopy/releases
Could that be the problem?
Cesco
August 6, 2018, 11:56am
4
Just a wild guess (from not knowing your exact error message), but could it be that your IDLE uses a different path than Psychopy?
Type
import sys
print(sys.path)
In both your PsychoPy shell and your IDLE interface. Are they listing the same directories?
Thanks @Cesco
Yes, the system path is different for PsychoPy and IDLE:
IDLE:
[’’, ‘/Users/sam/Documents’, ‘/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip’, ‘/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7’, ‘/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin’, ‘/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac’, ‘/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages’, ‘/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk’, ‘/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old’, ‘/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload’, ‘/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages’]
PsychoPy:
[’/Applications/PsychoPy2.app/Contents/Resources/lib/python27.zip’, ‘/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7’, ‘/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/plat-darwin’, ‘/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/plat-mac’, ‘/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/plat-mac/lib-scriptpackages’, ‘/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/lib-tk’, ‘/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/lib-old’, ‘/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/lib-dynload’, ‘/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/site-packages.zip’, ‘/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/site-packages’, ‘/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/site-packages’]
What do you reckon I should do?
jon
August 7, 2018, 10:43am
6
You’ve installed that package to your standard python installation but standalone PsychoPy stands alone! You can add other modules to the PsychoPy path (if the module is compatible with this python version) as described below
http://www.psychopy.org/recipes/addCustomModules.html
1 Like