Difference between revisions of "Psychopy/Installation"
m (E.vandenberge moved page Psychopy installation to Psychopy/Installation) |
|||
(38 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | =Installing Python and Psychopy for Windows= | + | =Installing Python 2 and Psychopy 2 for Windows= |
− | Do you want to install Psychopy? Please refer to the psychopy installation [http://www.psychopy.org/installation.html page] or keep reading. | + | 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 [https://www.socsci.ru.nl/wilberth/python/installation.html here] |
− | ==Windows stand-alone== | + | ==Windows (Vista and later) 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.4-win32.exe or something newer if present. | 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. | ||
− | ===Stand-alone post install=== | + | ===Stand-alone, post install=== |
− | You may want to install additional packages. For instance the RuSocSci for using the buttonbox. | + | You may want to install additional packages. For instance the RuSocSci package for using the buttonbox. |
The authors of Psychopy have written these [http://www.psychopy.org/recipes/addCustomModules.html instructions] for this. | The authors of Psychopy have written these [http://www.psychopy.org/recipes/addCustomModules.html instructions] for this. | ||
Line 16: | Line 16: | ||
* open a command window with administrative privileges (start -> 'cmd' -> run as administrator) | * open a command window with administrative privileges (start -> 'cmd' -> run as administrator) | ||
* Go to the folder containing ''pip.py'' (C: -> CD "Program Files(x86)\PsychoPy...\...\...") | * Go to the folder containing ''pip.py'' (C: -> CD "Program Files(x86)\PsychoPy...\...\...") | ||
− | * for each package that you want to install type ''python pip install < | + | * for each package that you want to install type ''python pip.py install <package name>'' |
− | ==Windows with PsychoPy 1.85 | + | ==Windows (Vista and later) with PsychoPy 1.85 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 | + | 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. |
− | + | '''Note''' that for the first two steps in the following instructions you need administrative privileges. | |
− | + | 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''. | |
− | # Install the newest 32 bit version of Python 2.7. You can download it [https://www.python.org/ftp/python/2.7. | + | # (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.14/python-2.7.14.msi here]. If that does not work, go [https://www.python.org/downloads/release/python-2714/ 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. | # 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 -> 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. | # Download this [https://www.socsci.ru.nl/wilberth/nocms/python/DEPS1853.txt file] (right-click -> 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. | ||
Line 31: | Line 32: | ||
I thank [http://www.lfd.uci.edu/~gohlke/pythonlibs/ Christoph Gohlke] for compiling the individual packages | 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 install more. Popular packages are in [https://www.socsci.ru.nl/wilberth/nocms/python/DEPS1853_extra.txt DEPS1853_extra.txt]. You can install them the same way you installed the psychopy dependencies. | ||
+ | |||
+ | For the Spyder IDE you may want to make a link that opens C:\Python27\Lib\site-packages\spyder\app\start.py with C:\Python27\pythonw.exe and has C:\Python27\Lib\site-packages\spyder\images\spyder.png as icon (In older Windows versions you may have to convert the image to icon format first). | ||
+ | |||
+ | 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] | ||
+ | |||
+ | =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 ''Programs and Features'' in the Control Panel. Also uninstall all Python packages that you see in ''Programs and Features''. Remove ''C:\Program Files(32)\Python3-32''. | ||
+ | # (skip this step if you have Python 3.7 32 bit installed already and you want to keep it) Install the newest 32 bit version of Python 3.7. You can download it [https://www.python.org/ftp/python/3.7.3/Python-3.7.3.tar.xz here]. If that does not work, go [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 -> 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, and see if there are any errors. | ||
+ | |||
+ | I thank [http://www.lfd.uci.edu/~gohlke/pythonlibs/ Christoph Gohlke] for compiling the individual packages. If you want to use 64 bit Python 3.7, use this [https://www.socsci.ru.nl/wilberth/nocms/python/DEPS3_64.txt dependency file]. | ||
+ | |||
+ | =Installing Python 2 and Psychopy 2, Linux= | ||
+ | If you 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 start the UI, or use the library from your favorite IDE or from the command line. | ||
+ | |||
+ | =Installing Python 3 and Psychopy 3, Linux= | ||
+ | In ''Ubuntu 20.04 Focal Fossa'' (and probably in other ubuntu versions too) type: | ||
+ | <pre> | ||
+ | sudo apt install python3 python3-pip python3-scipy python3-wxgtk-webview4.0 ffmpeg vlc python3-pygame python3-pyaudio | ||
+ | sudo -H pip3 install psychopy python-vlc rusocsci sounddevice pyo ptb | ||
+ | </pre> | ||
+ | Use the start menu or type ''psychopy'' to start the UI, or use the library from your favorite IDE or from the command line. |
Latest revision as of 18:02, 21 January 2021
Installing Python 2 and Psychopy 2 for Windows
Do you want to install Psychopy? Please refer to the psychopy installation page or keep reading. Instructions for non-Windows users and anaconda users are here
Windows (Vista and later) stand-alone
If you do not use Python for purposes other than PsychoPy experiments, you are advised to use the PsychoPy stand-alone Windows installer. Choose StandalonePsychoPy-1.85.4-win32.exe or something newer if present.
Stand-alone, post install
You may want to install additional packages. For instance the RuSocSci package for using the buttonbox.
The authors of Psychopy have written these instructions for this.
Alternatively you may want to install additional packages using the following method:
- open a command 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>
Windows (Vista and later) with PsychoPy 1.85 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. Note that for the first two steps in the following instructions you need administrative privileges. 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 here. If that does not work, go 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 wxwidgets 2.8 If that does not work, go 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 file (right-click -> 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:
pip install -r DEPS1853.txt
Enjoy watching, and see if there are any errors. - Now Psychopy is installed on your system. You may want to make a link that opens C:\Python27\Lib\site-packages\psychopy\app\psychopyApp.py with C:\Python27\pythonw.exe and has C:\Python27\Lib\site-packages\psychopy\app\Resources\psychopy.ico as icon.
I thank Christoph Gohlke for compiling the individual packages
As Library, post install
Many packages are already present. You have a working system now. You may want to install more. Popular packages are in DEPS1853_extra.txt. You can install them the same way you installed the psychopy dependencies.
For the Spyder IDE you may want to make a link that opens C:\Python27\Lib\site-packages\spyder\app\start.py with C:\Python27\pythonw.exe and has C:\Python27\Lib\site-packages\spyder\images\spyder.png as icon (In older Windows versions you may have to convert the image to icon format first).
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.
- PyCharm
- Psignifit
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 Programs and Features in the Control Panel. Also uninstall all Python packages that you see in Programs and Features. Remove C:\Program Files(32)\Python3-32.
- (skip this step if you have Python 3.7 32 bit installed already and you want to keep it) Install the newest 32 bit version of Python 3.7. You can download it here. If that does not work, go here and choose the 32 bit installer. During installation choose 'add python.exe to path'.
- Download this file (right-click -> 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:
pip install -r DEPS3.txt
Enjoy watching, and see if there are any errors.
I thank Christoph Gohlke for compiling the individual packages. If you want to use 64 bit Python 3.7, use this dependency file.
Installing Python 2 and Psychopy 2, Linux
If you have a Debian based Linux (such as Ubuntu), add the Neurodabian repository and then type:
sudo apt install psychopy
Use the start menu or type psychopy to start the UI, or use the library from your favorite IDE or from the command line.
Installing Python 3 and Psychopy 3, Linux
In Ubuntu 20.04 Focal Fossa (and probably in other ubuntu versions too) type:
sudo apt install python3 python3-pip python3-scipy python3-wxgtk-webview4.0 ffmpeg vlc python3-pygame python3-pyaudio sudo -H pip3 install psychopy python-vlc rusocsci sounddevice pyo ptb
Use the start menu or type psychopy to start the UI, or use the library from your favorite IDE or from the command line.