Psychopy error on installation - overflowerror line number table is too long - psychopy

I am trying to install psychopy on linux mint from the default repositories (i.e. ubuntu jammy).
Installation fails with this error:
OverflowError: line number table is too long
Has anyone else encountered this error?

This only occurs when using Python 3.10 I believe and it's fixed in the current development branch of PsychoPy's github repository. You can see the required changes in the following pull request, but also note that the recommended version of Python to install PsychoPy is 3.8 not 3.10. I think there are going to be other points of pain using Python 3.10
https://github.com/psychopy/psychopy/pull/5185

Related

How can you install 3.11.x from 3.10?

I'm trying to upgrade my version of RabbitMQ using chocolatey. This package has Erlang as a dependency, so installs the relevant version required. I've gone from 3.9.19 to 3.10 fine. However, when I try and go from 3.10 to 3.11.7 I get the following error:
beam\beam_load.c(169): Error loading module elixir:
This BEAM file was compiled for a later version of the run-time system than 24.
To fix this, please recompile this module with an 24 compiler.
(Use of opcode 178; this emulator supports only up to 176.)
ERROR! Failed to start Elixir.
error: {error,
{elixir,
{bad_return,
{{elixir,start,[normal,[]]},
{'EXIT',
{undef,
[{elixir,start,[normal,[]],[]},
{application_master,start_it_old,4,
[{file,"application_master.erl"},
{line,293}]}]}}}}}}
I don't know why this is happening, or if it's even a problem. I've not been able to find anything on this error. When I run RabbitMQ it appears to be running ok with the right version of Erlang. However, this error suggests that it's attempting to use Erlang version 24 (which was already installed as part of installing 3.9.19). How is it deciding what version of Erlang to use here? I checked my environment variables and it the ERLANG_HOME is set correctly.
Update
I tried going through the process again and installing rabbitmq 3.9.19 from chocolatey, upgrading to 3.10.1, then using the choco command to uninstall just Erlang 24.0 (using force). I then upgraded rabbitmq to version 3.11.8. This got rid of the previous error but showed another one stating:
ERLANG_HOME not set correctly.
Please either set ERLANG_HOME to point to your Erlang installation or
place the RabbitMQ server distribution in the Erlang lib folder.
However, when I checked the ERLANG_HOME environment variable it seemed to be set correctly, in that it was pointing now at Erlang OTP and not erl-24.0. So why is this error thrown?

OSError: WinError 193 %1 is not a valid Win32 application

I have been working on a project in Visual Studio Code with Python 3.8.5, and I have a windows 64 bit operating system. I decided to upgrade to Python 3.11.1, and downloaded the official 64 bit installer and followed the instructions. All the packages I import at the beginning of my project that were previously working now give this error "[WinError 193] %1 is not a valid Win32 application" when I run the import statements for them.
For some of the packages (pandas, numpy, matploblib) this was solved by using an approach I saw on a few similar questions to this, by opening the command prompt and typing "pip uninstall pandas" etc and then doing "pip install pandas".
However, for the other packages (sklearn, umap, nltk), this isn't working even after trying that process a few times. I've also tried updating pip. Does anybody have any ideas on what could be causing this to work for some packages but not for others? It allows me to install all of the packages via the command prompt, the issue only arises when I actually try and import them via VSCode, and it's the same error for every package. I've seen some suggestions saying to ensure the environment path is clean, but I'm still quite a beginner so I'm a bit unsure as to what that means.
Any help would be really appreciated.

Import pandas could not be resolved from source Pylance(reportMissingModuleSource)

I've been trying to use the packages pandas, numpy, matplotlib, seaborn in my "Visual Studio Code", but the program keeps showing me the following message:
"import pandas could not be resolved from source Pylance(reportMissingModuleSource)"
Previously to Visual Studio Code I installed "Anaconda" to use Jupyter, and now it says that i have the existing packages (pandas, numpy...) but keeps appearing this message that doesn't allow me to use pandas in my Visual Studio.
Anyone could help me to solve this issue?
I tried installing again all the packages to check if they didn't exist but apparently are installed all of them but in another route. I can't find how is the way to put them so the Visual Studio Code recognizes them and I can use them.
I also received similar an error on my IDE VSCode and currently using mac m1 .First we need to make sure that the python3 interpreter version from terminal version is the same with our python version selection in VSCode.
open terminal.
type 'python3'
then you will see your python version.(my python3 version is 3.9.12)
python3 version
open your IDE VSCode
open any/current folder that related to python project on IDE VSCode
Check your python version at the bottom right on IDE VSCode (in my case the python version is 3.10.64)
change or switch VSCode python version from 3.10.64 to 3.9.12 (same with your python version on your pc)
done
I also had this problem and it was because of version mismatches.
I had installed Python AND Anaconda. If anyone else has done this and gets this error, you need to uninstall both. Then install Anaconda only; Python (the compatible version) is installed as part of that process.
See https://docs.anaconda.com/anaconda/install/windows/
Also, you can click on the interpreter version at the bottom left corner of the screen (Vs.code 2022) it should show a dropdown menu with a list of the available and selected python interpreter. Click on add interpreter path and paste the path to the python interpreter with all the required modules installed and click enter. This should resolve the problem.
I re-entered the path to Python interpreter and warning disappeared. Hope that helps you.
Another way I solved this issue having followed every other installation process to the letter was deactivating Pylance. Works a (py)charm now.
I encountered this problem in VSCode under remote to WSL2 of Windows 10. The Python version is correct as interpreter (3.9.13) and the terminal in VSCode is also under the same envs (ie. VSCode ran "conda activate xx" and (xx) is shown in prompt)
Originally, I tried to install the pandas by the following command.
sudo apt-get install python3-pandas
Pandas was installed successfully as stated in the terminal but the problem is still there.
When I try to install pandas by the following command, the problem solved.
pip install pandas

Forced to install GDAL 1.11 framework by package for QGIS, and failing

To install QGIS on my MacBook Pro I need to install the gdal framework; however, the 1.11 framework package needed for QGIS is an empty file at kyngchaos. I tried installing GDAL 1.10 complete, but QGIS is requiring 1.11. I have Mavericks. I've installed each individual package: UnixImageIO, PROJ, GEOS, SQLite2, numpy, rgdal, and on... Now when I run the GDAL 1.11 framework install, everything seems to run until the last page, where an "Install Fail" page shows up. When I try to view the error, I'm taken out of the installer.
After some googling, I tried installing using homebrew. (brew install gdal)... I got a little further, but it tells me to "brew link libpng libtiff" -- and when I run that command, I get:
Linking /usr/local/Cellar/libpng/1.5.14... Warning: Could not link libpng. Unlinking...
Error: Could not symlink file: /usr/local/Cellar/libpng/1.5.14/share/man/man3/libpngpf.3
/usr/local/share/man/man3 is not writable. You should change its permissions.
After some more searching, it seems I could change permissions from usr/local to me, but I'm not sure how to (exactly) and don't want to mess anything up. Any help would be greatly appreciated, and my apologies if I'm missing something painfully obvious! I'm a novice at the programming end of things, so am just kind of pushing through everything like a bull in a china shop.
UPDATE:
Okay, I found the answer, even though it didn't seem to be working initially--
I ran the following commands from the GDAL help documentation:
export PATH=/Library/Frameworks/GDAL.framework/Programs:$PATH
sudo ln -sfh [ver] /Library/Frameworks/GDAL.framework/Versions/Current
in Terminal, and the framework was updated. If I run the GDAL 1.11 installer it still shows up as a failed installation, BUT QGIS recognizes 1.11 as the installed, so that's great.
(I just needed to install matplotlib in addition, and QGIS was installed successfully.)
It seems that the GDAL Complete framework was just updated 3 days ago, so it should be a temporary error until they realize the package is empty.

Mac OS Snow Leopard, IPython Notebook matplotlib backend mismatch with libpng

The other day I was trying to delve deeper into this question and provide some insights. Maybe with the additional insights it can finally be solved.
Things to note:
Installing a different Python version is not an option for me (I'd do it in a heartbeat) because I need to use the Gurobi linear programming solver.
matplotlib is compiled with libpng 1.5.14 and linked at runtime just fine. In the IPython console I can use it to plot png figures perfectly.
Because of the previous point I believe the error must occur with the backend used in the IPython Notebook which is also compiled with matplotlib.
I'm trying the whole thing with the source for matplotlib 1.3, if someone can make it work with a previous, not too old version I'd be happy, too.
So, when I try to plot something in the Notebook I get the normal text output from matplotlib put no figure. In the terminal where I started the notebook, I can see the following error:
libpng warning: Application built with libpng-1.2.41 but running with 1.5.14
Since I concluded earlier that the problem must lie in the backend, I checked what libraries are linked there:
otool -L /Library/Python/2.6/site-packages/matplotlib-1.3.0-py2.6-macosx-10.6-universal.egg/matplotlib/backends/_tkagg.so
The output on my system was:
/Library/Python/2.6/site-packages/matplotlib-1.3.0-py2.6-macosx-10.6-universal.egg/matplotlib/backends/_tkagg.so:
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.11)
/System/Library/Frameworks/Tcl.framework/Versions/8.5/Tcl (compatibility version 8.5.0, current version 8.5.7)
/System/Library/Frameworks/Tk.framework/Versions/8.5/Tk (compatibility version 8.5.0, current version 8.5.7)
So the likely offending candidates are Tcl and Tk. Then I ran:
find /System -name libpng\*
and indeed I find:
/System/Library/Tcl/8.4/Img1.4/libpngtcl1.2.24.dylib
/System/Library/Tcl/8.5/Img1.4/libpngtcl1.2.24.dylib
as well as Python shipping its own:
/System/Library/Frameworks/Python.framework/Versions/2.6/lib/libpng.3.dylib
/System/Library/Frameworks/Python.framework/Versions/2.6/lib/libpng.dylib
/System/Library/Frameworks/Python.framework/Versions/2.6/lib/libpng12.0.dylib
/System/Library/Frameworks/Python.framework/Versions/2.6/lib/libpng12.dylib
I went ahead and downloaded the source code for Tcl/Tk 8.6 and compiled them myself in the hope of them compiling against libpng but that wasn't the case. I still got the same error:
libpng warning: Application built with libpng-1.2.41 but running with 1.5.14
When I compile matplotlib it says that due to patches it ships its own libagg and I can't find which tkagg it is using, so maybe that's where things go wrong? Or is the Python 2.6 provided by the system compiled with Tk which is linked against that older libpng?
I guess I could try compiling matplotlib against the libpng version of Tcl/Tk 8.5 or against the one available in the Python framework and see if then both run on libpng version 1.2.41.
Does anyone know where in the backend this might occur and how to fix the compilation to use the right libpng version?
Have you solved the problem yet? I have a similar issue, and I solved it by temporarily renaming the folder containing the header files of libpng shipped with Python (in my case, it's X11) when building matplotlib. After installing matplotlib, rename the folder back.