Cannot run standalone psychopy if PYTHONPATH and PYTHONHOME set for different python version - psychopy

I thought that the standalone PsychoPy install could coexist happily if Python was installed separately on the PC to but I can't get it to, nor can I find any docs. (I'm using Windows 7)
I have the lastest standalone version installed and the shortcut to run it is
"D:\Program Files (x86)\PsychoPy2\pythonw.exe" "D:\Program Files (x86)\PsychoPy2\Lib\site-packages\PsychoPy-1.81.02-py2.7.egg\psychopy\app\psychopyApp.py"
This works fine if my system env variables for PYTHONHOME & PYTHONPATH aren't set but I also use Python for other apps and need them setting to point to the other version of Python I have installed natively. When these env vars are set, Psychopy fails to load and gives no error messages at all.
Can anyone advise how I get them to play together nicely? (I thought it used to work last year, has something changed?)
[ I've tried a full uninstall of psychopy and freshly installed the latest standalone version v1.81.02

Yes, this is an unfortunate consequence of the way that PsychoPy is currently bundled with it's own closed environment in it's own python and dependencies installed seperately.
However, a new option to install psychopy using the conda package manager was introduced recently for Mac OS but some have also got it to work on Windows with a bit of tweaking.. Work is currently ongoing for this feature. I doubt that it was working previously unless you manually installed all dependencies in your default python, or ran linux:
On linux you can simply install psychopy from the neuro.debian repository, making it available for python system-wide. See PsychoPy documentation.

Thinking about it, I don't think it would ever worked if you had set PYTHONPATH (I don't know about PYTHONHOME).
BUT I did have a 'regular' python installation running alongside my Standalone PsychoPy install by not using the PYTHONPATH variable. You can add further paths to your python importing path (I assume that's the aim here) without setting any environment variable by adding text files ending in .pth to your site-packages directory. Essentially any lines in a .pth file that is found while navigating the existing path will also be added to the path!
Actually, according to the python docs you can also set a flag -E to ignore the environment variables:
https://docs.python.org/2/using/cmdline.html
To use that solution for the Standalone PsychoPy installation you'd have to alter the application shortcut to add this (that should get the app to load), but also make a couple of changes to the code for running scripts so that they also run with the flag set.
I still think not setting those variables is the easier solution though.
cheers,
Jon

Related

How to download Keras_contrib (and other packages that is not avaliable in conda) to Pycharm?

I am quite familiar with Pycharm except 1 thing that I can't seem to figure out how to download Keras_contrib which is not availble in conda's channel and conda-forge channel which is also often used.
I have read the following article which suggest to add additional channel to conda.
"How to Install a Package in PyCharm when project interpreter is set to conda, and the package is not provided/listed by conda? 1"
but as I mentioned Keras_contrib is not provided, and I am not sure quite sure how to download it.
I managed to install Keras_contrib sucessfully to my environment which is also used by Pycharm interpreter, but for some reason, Pycharm does not recognize it.
I follow instruction given in https://github.com/keras-team/keras-contrib
which is running setup.py install
Here are the questions
By doing this Does it get install in the site_packages automatically? because I do not see it.
if I have to do it manually, how come my environment can recognize it, but Pycharm cannot.
Is there a default location in which environment and Pycharm usually look at?
because it would make sense in this case that one may recognize it while other may not.
How can I download Keras_contrib which is not avaliable in well known channel?
Is there other way to check that Pycharm Interpreter is compatible with my anaconda environment other than looking folder it is linked to?
In my case they link to the same environment, but Pycharm just cannot recognize
I just figured it out.
so Pycharm looks at site-packages of your environment.
I solved by problem that Pycharm cannot recognize the packages while anacoda env can by copy and past the Keras_contrib to the site-packages. (I still find this to be strange if any one answer to this. Feel free to comment)

Redhawk IDE will not display Components

When I launch the REDHAWK IDE via Eclipse, I cannot see the installed components (SigGen, fastFilter, etc). I can see the components just fine if I use the command line to create a project. I'm convinced it has to be a path or variable issues, but I just don't know what to reconfigure.
I'm using REDHAWK Version 2.1.0 and on CentOS7
OSSIEHOME is set to the /usr/local/redhawk/core
SDRROOT is set to /var/redhawk/sdr
Any suggestions?
I found a solution by reinstalling and including every Redhawk package that I could find using "yum list redhawk*"
I have the same problem and it turns out I was using a Java version higher than 8 which is not supported by RedHawk. Make sure you use Java 8 to launch the IDE otherwise it does not work. Submitted a DR but because JDK8 still supported they do not feel the need to fix it.
I followed the official installation instructions for RedHawk 2.3.0 on Centos 7.9 and had this same issue, I fixed it by opening a terminal in the Redhawk installation directory and running
sudo yum install redhawk-basic-components-2.3.0-5.el7.x86_64.rpm
After which the components appeared in the IDE without a restart

Gnuradio companion not installed after running build-gnuradio script

I tried installing Gnuradio 3.7.9.2 using build-gnuradio script and apart from a few hiccups due to some packages (which I installed and re-ran the script again) , the script completed its run successfully (I enabled the verbose option of the script to check the output). I even added the PYTHONPATH to the .bashrc script after completing the installation. When I tried launching gnuradio-companion though, it doesnt recognise the command.
:~$ gnuradio-companion
The program 'gnuradio-companion' is currently not installed. You can install it by typing:
sudo apt-get install gnuradio
So, I was wondering whether I need to install grc separately after the build-gnuradio script installation ?. I apologise if this is too simple, I have tried the installation many times and searched the web for problems like this. To the best of my efforts, I was not able to find any. It would be great, if anyone can point to any existing question similar to this, or guide me in fixing this issue. Thank you.
It is advised to use PyBOMBS to install GNU Radio. Installing Out-of-Tree modules (OOTs) will be much easier afterwards. As for your problem: Did you check if your $PATH variable (echo $PATH) contains /usr/local/bin/? This should be the default installation path for a non-system install of GNU Radio.
Alternatively you can try to run /usr/local/bin/gnuradio-companion.

Run linux distro of choice inside existing distro

Just wondering if it's possible and what the best route might be to run a full-on Linux distro within my existing distro? It would be great to for instance run Arch Linux within a chroot, jail, etc.. I believe people are doing this on Chromium for example.
I would require that whatever fs loaded, I can install packages using pacman and that my changes are kept intact.
I have tried the Virtualbox route by the way and there is a pretty nasty bug involving double mouse pointers on rotated host screens that I can't seem to get around.
I should mention that I'll be using this chroot environment for development, maybe running the odd X client to be exported remotely, etc..
I followed the chroot guide at https://wiki.archlinux.org/index.php/Change_Root and basically installed a whole Arch system within a nested chroot according to the Arch Linux installation guide and I'm now able to switch to the environment at will.
There is a tool https://github.com/fsquillace/junest that does everything automatically for you (downloads and unpacks ArchLinux distro inside some folder and chroots there).

Install mod_mono on Mac OSX

I just started to develop website with mono+asp.net mvc2 on mac osx but I am quite new to mono and mac.
I have got things working from MonoDevelop. My website is running ok with XSP when I run it from MonoDevelop.
Now, I am trying to test it from Apache server, but I don’t know how to set things up. Some instruction I can found are all very old or incomplete. I tried a few of them, but none worked.
Could anyone please help me out?
The best way to install mod_mono on OS X is from source. To do this there are a couple steps.
First, make sure you've installed XCode (which can be found on the DVD or the 2nd CD that came with the machine or the App Store) which will provide you with gcc and the rest of the standard toolchain.
Most of the normal in-between steps can be skipped, assuming you've already installed Mono and MonoDevelop from their stable release packages. If you encounter an error later on, you'll want to install updated versions of XSP and Mono and try again.
Next, download the latest stable release of mod_mono, extract the contents of the archive (by double clicking on the icon) and follow steps 1, 2 & 3 in the INSTALL file, and you should be good to go. This entire process took about ~5 minutes to get up and running :)
I am a novice with mono but followed some instructions. I downloaded and installed everything from here:
http://www.go-mono.com/mono-downloads/download.html
To get Apache to work with mod_mono.so I downloaded source from this page:
http://download.mono-project.com/sources/mod_mono/
You have to compile it. I went into the unpacked directory and wrote this in termminal:
./configure --prefix=/usr
make
sudo make install
This puts the mod_mono.so in correct Apache dir and the mod_mono.conf file. To include it you must add this to your httpd.conf (I put it at the end of the file):
# mod_mono_configuration
Include /etc/apache2/mod_mono.conf
MonoServerPath /Library/Frameworks/Mono.framework/Versions/Current/bin/mod-mono-server2