Open dschreij opened 5 years ago
This is simply due to the fact of OpenSesame not having write permission in its own folder, unless it's run as Administrator. That's one of the many things that's not ideal about the Python package manager.
What happens if you install it locally? If that works, perhaps that should be the default behavior.
pip.main(['install','Faker', '--user']
PS. The package manager lives in https://github.com/smathot/python-qtpip
I expected the first one to be the case. However, I once went as far as reinstalling OpenSesame to Program Files, and tried again afterwards to install a package with qt-pip and then it worked. It seems that the permission 'lock-up' happens some period after the installation. Additionally, on my main PC this problem occurs, while on a Windows laptop on which I tested this too it didn't. I also suspect virus scanners being the culprit here.
This is also related to the problem that Simona described some time ago about OpenSesame not running on some (but not all) of their lab PCs. These were also permission-related errors.
I understand that there is little you can do about this, as this is all up to the OS on which OpenSesame needs to run. Still it's good to keep an eye out for the ways these permission error manifest themselves on various systems.
Oh! And I'll try again using the --user
flag. I think that is the recommended way of installing pip packages now anyway, although they may end up outside of the OpenSesame folder when installed like that.
Installing with the --user flag gives no errors, but the package does not get picked up by OpenSesame. If you try to import the installed package afterwards, it says it hasn't been installed.
Since the 3.2.8 I am experiencing some weird PermissionErrors on Windows when trying to install packages through the Python Package Manager. For instance, I tried to install the package Faker.
When attempting to install this via the GUI of the PPM, a notification shows up that the installation failed.
When trying to install the module via
pip.main(['install','Faker'])
, the following is output to the debug window:The installation does succeed when OpenSesame is run in elevated mode (e.g. as an Administrator). Any idea what causes this?