Problems trying to install mingw python version - python

Greeting, I installed the mingw in MSYS2, but the python installed was the 3.8 version and I want to use TensorFlow with the GTK, but TensorFlow 2.0 is supported only with versions 3.6 and 3.7.
So, how should I install the python with a specific version? Spent a hour looking for the solving, but didn't find anything useful.
Thanks

Go to mysys2 repo site, http://repo.msys2.org/msys/x86_64/
Download a copy of older version, for example, http://repo.msys2.org/msys/x86_64/python-3.6.6-1-x86_64.pkg.tar.xz
Install the package with pacman -U python-3.6.6-1-x86_64.pkg.tar.xz
I am not sure if you need to uninstall python3.8 first before running commands above.

Related

How do I install python package tobii_research?

I am trying to install tobii_research for a project and I was following the instructions on http://developer.tobiipro.com/python/python-getting-started.html
I already have python 3.7.6 and pip 21.1.2 installed on my Mac.
When I run pip install tobii-research I get:
ERROR: Could not find a version that satisfies the requirement tobii_research (from versions: none)
ERROR: No matching distribution found for tobii-research
Was there something I forgot to install?
I can not for the life of me figure out how to install this manually either.
Help with pip, or installing manually would be greatly appreciated, but you might have to explain it to me like I am stupid.
Thanks in advance.
It appears that you are not running the correct python version for the versions of the package that are available. If you look at the wheel files available on the tobii-research Downloads page, the software is packaged for either python 2.7 or 3.6.
When trying to install this package myself, I get the same error message as you when trying to install it for python 3.8, but the package installs successfully with my python 2.7 installation.
I would recommend installing a compatible version of python and then running pip through that version using the following command:
[specific_python_installation] -m pip install tobii-research
Try doing it with pip again, but replace the underscore with a hyphen as shown below:
pip install tobii-research
I saw on the PyPi website that they only have it for Python 3.8, so I downloaded that Python version from their official website and installed it (do not add it to path).
Then, I created a virtual environment selecting 3.8 as the Python version (refer to this answer) and activated that virtual environment.
Finally, I run pip install tobii_research and it worked.
One thing that helped me - required Python version. For example, for the version 1.10.2 (which is current at the moment of writing this) only Python 3.10 is supported. Check the list of files distributed within this version.
I was able to install the package on Windows with Python 3.10 but on MacOS I had the same problem and wasn't able to resolve this - I assume it's a problem with the architecture, as there is no version for arm64 if you have a Mac with M1 processor.

How to manually remove pip on windows?

I am using Python 3.4 (I know it is deprecated, but don't have the power to upgrade version).
I had trouble installing some packages because of a old version of pip (1.5.6 I guess), so I went all
pip install -m pip
To upgrade version and... it broke.
Unfortunately, it installed the latest, incompatible 20.0.2 version, which now raises a RuntimeError asking me for Python 3.5, and now I'm stuck. I can't upgrade Python, I can't downgrade pip because it will not allow me to.
How can I remove or downgrade pip manually?
It is easier that it seems. You can actually use the same get-pip.py script used to install pip the first time.
The script, available here, actually contains a full working version of pip to be used to bootstrap the installation. This version is fully working, so it can be used to install packages with a different version that the one contained.
To solve, just use https://bootstrap.pypa.io/3.4/get-pip.py to recover a version of get-pip.py compatible with my python environment (note the 3.4 in the link) and run
get-pip.py pip==19.1.1
This removes the newer python version and installs the older one, restoring the usual functionalities.

How to use Homebrew to upgrade to a specific Python version?

I've been using Homebrew to install various packages on my Mac. Currently I have Python 2.7.13 installed via Homebrew but I'd like to upgrade to Python 3.5.x, not 3.6 which is brew's current default. At first, I just tried upgrading to Python 3:
brew install python3
Brew said "python 2.7.13 is already installed. To upgrade to 3.6.5, run brew upgrade python" which isn't the version I want.
I then tried to search to see what versions of Python brew has available:
brew search python
Now Homebrew tells me, "If you meant "python" specifically: It was migrated from caskroom/cask to homebrew/core."
I then looked at homebrew-core on Github but it doesn't appear to provide any instructions on how to do what I want to do. Does anyone know how to now display a list of Python versions that one can install using Homebrew and what command to use to install a specific version?
There are several discussions of this, here and elsewhere. There is no direct way to do what you want. The recommended approach is to install pyenv via brew, and use pyenv to manage the different versions of Python on your system.
The github repo has a very detailed and clear guide on usage:
https://github.com/pyenv/pyenv
To see the version of python use python --version, and for upgrade use sudo apt-get upgrade python.
I used this, and it's worked

How to use Gcovr Installed with pip on windows

So I followed this guide and managed to install Gcovr using pip (I already have Python installed along with Anaconda). I tried to use gcovr but this is what I got:
When I use pip list, Gcovr is already installed.
How do I use it?
I'm running Windows 7 64bit with Python 3.5.2 :: Anaconda 4.2.0 64bit
P.S:
I'm sorry if this has already been asked before but after searching around for days I've yet to found any solution to my problem.
Using gcovr 3.x is a bit more cumbersome on Windows because Windows doesn't seem to recognize the gcovr script as an executable. Instead: find out where gcovr was installed to (e.g. by running pip in --verbose mode), then explicitly invoke Python:
> python C:\path\to\gcovr
The path is probably something like C:\Python35\Scripts.
You can also write a batch file to wrap gcovr like this.
Please also consider updating (pip install -U gcovr), as gcovr 3.4 fixes some other bugs on Windows.
This installation issue will be fixed in the next release. If you want to, you can already install the development version directly from GitHub:
> pip install git+https://github.com/gcovr/gcovr.git

uninstall python compiled by source

My Centos installed two python2.7. I want to remove one. How can I do that?
Please note that both version are built from source I have viewed Uninstall python built from source? but it only talked about uninstall in Ubuntu.

Categories

Resources