Changes

Jump to: navigation, search

Psychopy installation

796 bytes added, 23 January
Installing Python 3 and Psychopy 3, Linux
=Installing Python 2 and Psychopy2 for Windows=
Do you want to install Psychopy? Please refer to the psychopy installation [http://www.psychopy.org/installation.html page] or keep reading. Instructions for non-Windows users and anaconda users are below those for Linux users[https://www.socsci.ru.nl/wilberth/python/installation.html here]
==LinuxWindows (Vista and later) stand-alone==
===System If you do not use Python for purposes other than PsychoPy experiments, you are advised to use the PsychoPy stand-alone Windows [http://psychopy.org/installation.html installer===]. Choose StandalonePsychoPy-1.85.4-win32.exe or something newer if present.
If you have a debian===Stand-like system (Ubunutualone, Debian), The newest version of Psychopy is available from [http://neuro.debian.net/ neurodebian.] Adding the neurodebian installation source before continuing will improve your experience.post install===
On Linux systems installing Python and the required libraries is usually possible with your systems's software installer. Just click Psychopy and you are ready You may want to goinstall additional packages. The installer will make sure that all you need is installedFor instance the RuSocSci package for using the buttonbox.
The authors of Psychopy have written these [[Imagehttp:muon//www.png]psychopy.org/recipes/addCustomModules.html instructions]for this.
Additionally Alternatively you may want tot to install additional packages using the following method:* open a number of much used librariescommand window with administrative privileges (start -> 'cmd' -> run as administrator)* Go to the folder containing ''pip.py'' (C:-> CD "Program Files(x86)\PsychoPy...\...\...")* for each package that you want to install type ''python pip.py install <package name>''
* python-serial* python-opengl* python-qt4* python-wxgtk* python-pyglet* python-pygame* python-pyaudio ==Windows (portaudioVista and later)* python-opencv* python-pip* python-setuptoolswith PsychoPy 1.85 as library==
The names above are those for Ubuntu and friends (Kubuntu, Lubuntu). The names of then packages may slightly vary for other Unices. ===PyPI=== In addition to this you may want tot install some packages from the Python Package index (PyPI). The python-pip package contains a nice tool for this called ''pip''. To install for instance the RuSocSci type the following: ''sudo pip install RuSocSci''. The system will respond with something like:  example:~&gt; sudo pip install -U RuSocSci Downloading/unpacking RuSocSci Downloading RuSocSci-0.6.6.zip Running setup.py egg_info for package RuSocSci Downloading/unpacking pyserial (from RuSocSci) Downloading pyserial-2.7.tar.gz (122Kb): 122Kb downloaded Running setup.py egg_info for package pyserial Installing collected packages: RuSocSci, pyserial Found existing installation: RuSocSci 0.6.6 Uninstalling RuSocSci: Successfully uninstalled RuSocSci Running setup.py install for RuSocSci Found existing installation: pyserial 2.7 Uninstalling pyserial: Successfully uninstalled pyserial Running setup.py install for pyserial changing mode of build/scripts-2.7/miniterm.py from 644 to 755 changing mode of /usr/local/bin/miniterm.py to 755 Successfully installed RuSocSci pyserial Cleaning up... You are now ready to use PsychoPy. Packages you may want to install with pip include: * rusocsci* moviepy ==Windows stand-alone== If you do not use Python for purposes other than PsychoPy experiments, you are advised to use the PsychoPy stand-alone Windows [http://psychopy.org/installation.html installer]. Choose StandalonePsychoPy-1.85.2-win32.exe or something newer if present. After installation please continue at Windows post install ==Windows with PsychoPy 1.85.3 as library== If you already have Python 2.7 installed on your computer or if you want to use Python for other purposes as well, you are advised to install PsychoPy as library. This is substantially more work. Perhaps you would really prefer installing Linux on your system rather than doing thisDoing this has become simpler with psychopy 1.85.3. '''Note ''' that for the first two steps in the following instructions you need administrative privileges and for the third one it may be necessary. Chronological instructions:# (skip this step if you have Python 2.7 32 bit installed already and you want to keep it) Uninstall all versions of Python 2 that you installed previously. Use ''Programs and Features'' in the Control Panel. Also uninstall all Python packages that you see in ''Programs and Features''. Remove ''C:\Python27''. # (skip this step if you have Python 2.7 32 bit installed already and you want to keep it) Install the newest 32 bit version of Python 2.7. You can download it [https://www.python.org/ftp/python/2.7.1314/python-2.7.1314.msi here]. If that does not work, go [https://www.python.org/downloads/release/python-27132714/ here] and choose the 32 bit installer (Windows x86 MSI Installer). During installation choose 'add python.exe to path'. It is the last option in the list and may not be visible without scrolling down. # Logout and login again.
# Install [https://sourceforge.net/projects/wxpython/files/wxPython/2.8.12.1/wxPython2.8-win32-unicode-2.8.12.1-py27.exe/download wxwidgets 2.8] If that does not work, go [https://sourceforge.net/projects/wxpython/files/wxPython/2.8.12.1/ here] and choose wxPython2.8-win64-unicode-2.8.12.1-py27.exe. It is the ancient library used by PsychoPy for its IDE. It is essential that you do NOT install wxpython/wxwidgets from another source.
# Download this [https://www.socsci.ru.nl/wilberth/nocms/python/DEPS1853.txt file] (right-click -&gt; save link as...) with all other requirements. Use Windows file Explorer to go to the folder where you downloaded it. Shift-right-click to the right of the files (make sure the window is wide enough). Choose 'Open command window here'. From a command line type: <br /><tt>pip install -r DEPS1853.txt</tt><br /> Enjoy watching, and see if there are any errors.
I thank [http://www.lfd.uci.edu/~gohlke/pythonlibs/ Christoph Gohlke] for compiling the individual packages
==Windows As Library, post install== Many packages are already present. You have a working system now. You may want to consider installing many install more . Popular packagesare in [https://www.socsci.ru.nl/wilberth/nocms/python/DEPS1853_extra.txt DEPS1853_extra.txt]. Unless otherwise noted, they You can be install them the same way you installed with pipthe psychopy dependencies.
* lxml* dateutils* antigravity* kivy* expyriment* opencv2 (copy cv2.pyd For the Spyder IDE you may want to /make a link that opens C:\Python27\Lib)* PresPy\site-packages\spyder\app\start.pyd (copy /Lib) to use python scripts py with Neurobs presentation stimuli.* avbin5. You can download it [httpsC://code\Python27\pythonw.google.com/p/avbin/ here] or better [httpsexe and has C://github\Python27\Lib\site-packages\spyder\images\spyder.com/AVbin/AVbin/downloads here]. Choose Version 5 binary release, png as icon (In older Windows (32-bit x86versions you may have to convert the image to icon format first). Copy avbin.dll into WOW64.* pyo. You can download it [http://code.google.com/p/pyo/downloads/list here]. Choose a the newest ...py2.7_setup.exe.* PyQt/ PySide. You can download it [http://www.riverbankcomputing.com/software/pyqt/download here]. Choose the newest PyQt4 Python 2.7 32 bit Windows installer. PySide is available from pypi.* PyQtGraph. You can download it [http://www.pyqtgraph.org/ here].
==Anaconda==Some packages were not in the file, since installing them that way is not possible:* PresPy, Neurobs Presentation stimuli from Python. Make a login on the Neurobs website, download PresPy.pyd and put it in C:\Python27\Lib\site-packages\.* Kivy, installation is problematic in Windows. * [https://www.jetbrains.com/pycharm/download/ PyCharm]* [http://psignifit.sourceforge.net/INSTALL_WINDOWS.html Psignifit]
On all operating systems you can use Anaconda. After installation of anaconda:=Installing Python 3 and Psychopy 3 for Windows=
If you already have Python 3.7 installed on your computer or if you want to use Python for other purposes as well, you are advised to install PsychoPy as library. '''Note''' that for the first two steps in the following instructions you need administrative privileges. Chronological instructions:# (skip this step if you have Python 3.7 32 bit installed already and you want to keep it) Uninstall all versions of Python 3 that you installed previously. Use ''condaPrograms and Features'' or in the Control Panel. Also uninstall all Python packages that you see in ''Programs and Features''. Remove ''anacondaC:\Program Files(32)\Python3-navigator32'' . # (skip this step if you have Python 3.7 32 bit installed already and you want to installkeep it) Install the newest 32 bit version of Python 3.7. You can download it [https: wxpython//www.python.org/ftp/python/3.7.3/Python-3.7.3.tar.xz here]. If that does not work, pandas, lxmlgo [https://www.python.org/downloads/ here] and choose the 32 bit installer. During installation choose 'add python.exe to path'.# Download this [https://www.socsci.ru.nl/wilberth/nocms/python/DEPS3.txt file] (right-click -&gt; save link as...) with all other requirements. Ope a command window with administrative privileges and to go to the folder where you downloaded it. From the command line type: <br /><tt>pip install -r DEPS3.txt</tt><br /> Enjoy watching, opencv (opencv and vlc see if there are necessary for moviestim2)any errors.
Use ''conda'' or ''anaconda-navigator'' I thank [http://www.lfd.uci.edu/~gohlke/pythonlibs/ Christoph Gohlke] for compiling the individual packages. If you want to add the channel ''cogsci'' and install psychopy 1use 64 bit Python 3.7, use this [https://www.socsci.ru.nl/wilberth/nocms/python/DEPS3_64.82txt dependency file].
Do =Installing Python 2 and Psychopy 2, Linux=If you like this method? Ask me have a Debian based Linux (such as Ubuntu), add the [http://neuro.debian.net/ Neurodabian] repository and then type:<pre>sudo apt install psychopy</pre>Use the start menu or type ''psychopy'' to make a channel containing start the UI, or use the library from your favorite IDE or from the newest Psychopycommand line.
Your quest to =Installing Python 3 and Psychopy 3, Linux=In ''Ubuntu 18.04 Bionic Beaver'' (and probably in other ubuntu versions too) type:<pre>sudo apt install PsychoPy on Windows has finishedpython3 python3-pip python3-scipy python3-wxgtk-webview4. Welcome0 ffmpeg vlcsudo -H pip3 install psychopy python-vlc rusocsci</pre>Use the start menu or type ''psychopy'' to start the UI, brave sir Knight. Welcome to or use the library from your favorite IDE or from the Castle Anthraxcommand line.

Navigation menu