compatibility

Why is Colab still running Python 3.7?

Why is Colab still running Python 3.7? Question: I saw on this tweet that Google Colab move to Python 3.7 on February 2021. As of today however (January 2022), Python 3.10 is out, but Colab still runs Python 3.7. My (voluntarily) naive take is that this is quite a significant lag. Why are they not …

Total answers: 2

Update scikit model so it is compatible with newest version

Update scikit model so it is compatible with newest version Question: I have a question about scikit models and (retro-)compatibility. I have a model (saved using joblib) created in Python 3.5 from scikit-learn 0.21.2, which I then analyze with the package shap version 0.30. Since I upgraded to Ubuntu 20.04 I have Python 3.8 (and …

Total answers: 2

Can I use python3.4 modules in python3.6?

Can I use python3.4 modules in python3.6? Question: Is it possible to run python3.4 modules in python3.6? I’m not looking for installing the python3.6 equivalent package. Example: yum install python34-apsw and then in python3.6 to be able to do import apsw? Asked By: Radu NiĆŁescu || Source Answers: If modules that are used in your …

Total answers: 1

Python OpenCV package not compatible with Linux?

Python OpenCV package not compatible with Linux? Question: I tested some code on my windows who worked perfectly. When exporting it on my VPS (Debian) I had some errors. Does it means it’s not possible to make it work on linux at all (there’s nothing I can do about it ?) ? Here’s what I …

Total answers: 1

Eval scope in Python 2 vs. 3

Eval scope in Python 2 vs. 3 Question: I came across bizarre eval behavior in Python 3 – local variables aren’t picked up when eval is called in a list comprehension. def apply_op(): x, y, z = [0.5, 0.25, 0.75] op = “x,y,z” return [eval(o) for o in op.split(“,”)] print(apply_op()) It errors in Python 3: …

Total answers: 2

How to write Python 2.x as much compatible with Python 3.x as possible?

How to write Python 2.x as much compatible with Python 3.x as possible? Question: There are many ways to include Python 3.x features in Python 2.x, so code of Python 2.x scripts could be easily converted into Python 3.x in the future. One of these examples is replacing print statement with print() function: >>> from …

Total answers: 6

How to run multiple Python versions on Windows

How to run multiple Python versions on Windows Question: I had two versions of Python installed on my machine (versions 2.6 and 2.5). I want to run 2.6 for one project and 2.5 for another. How can I specify which I want to use? I am working on Windows XP SP2. Asked By: Bilal Basharat …

Total answers: 25