how to install python 3.9.6 using homebrew on Mac m1 - python-3.x

Im new to programming and stuff and was looking to install python 3.9.6 using home-brew. To do that would I just have to type in brew install python#3.9 into the terminal, or is there some other way? Thanks!

You can't ensure a specific version 3.9.6 with brew package python#3.9. Homebrew is a package manage designed to get latest pacakge. python#3.9 will be kept updating to the latest patch version 3.9.x.
If you REALLY to stick with specific python version, choose conda (miniconda is preferred) or pyenv.

Related

How to update Python version of my conda environment without loosing packages

I have Python 3.6 installed in my conda environment but I have to update it to the newer 3.10 version to be able to install newest versions of some packages. How can I update Python version in such a way that my already installed packages will also be updated if necessary?
Within the environment:
conda install python=3.10
... and as always read the docs

How to uninstall and install a specific python version

Am using ubuntu 20.04 LTS by default I have 3.8.2 as python version but when I issue sudo apt-get update its getting updating to 3.8.5 I need 3.8.2 as the version.How to uninstall 3.8.5 and install 3.8.2?
It might not directly answer your question, but it's an alternative solution. You could install something like pyenv which simplifies the process of handling different python versions. After installing it, pyenv install 3.8.2 && pyenv global 3.8.2 should do the trick.

How to update OpenCV 3.4.2 to OpenCV 4 or latest stable version?

I have installed OpenCV 3.4.2 successfully by following the tutorial given here:
https://www.pyimagesearch.com/2015/07/20/install-opencv-3-0-and-python-3-4-on-ubuntu/
Now, I would like to update to openCV 4 or the latest stable version.
Do I need to uninstall 3.4.2 first?
If so, how should I uninstall it.
I am afraid to creating another virtual environment and installing version 4 or master package from github by following the same steps might create conflicts. Please advice.
Working on Ubuntu 16.04 LTS, python 3.5
For Python interface, I guess you can try something like pip install opencv-python==4.0.0.21. Note, you might need to run pip3 install opencv-python==4.0.0.21 depending upon your pip version.

How do I install OpenCV without it upgrading my python version on Mac?

I tried to install opencv for Python 3.6.5 on Mac OS. I tried brew install opencv, but it updates my python version to 3.7.
I tried brew pin python and then tried the installation but it just fails as it can't update the dependency.
Error: You must `brew unpin python` as installing opencv requires the latest version of pinned dependencies
I don't want to use pip install opencv-python as I read somewhere that it is not official.
Can someone help me out?

Twisted setup in Fedora or CentOS

Is there a source tarball of Twisted available for download which could be used to build it in Fedora or CentOS? I see the download for Ubuntu/Debian on the site, of course.
It would be an 'rpm'; Try rpmfind [.net]
https://www.rpmfind.net/linux/RPM/fedora/secondary/devel/rawhide/src/p/python-twisted-15.4.0-3.fc24.src.html
To get the latest version of Twisted requires Python 2.7+ because 2.6 support has finally been EOL. So if you're running an old Python, then I'd suggest you build your own Python 2.7+ and alt install it. It's very important you don't override CentOS's default Python as this could lead to a disastrous situation. Once Python is updated, then you can do pip install twisted. Alternatively, you could get a yum repo with a updated versions of Python and Twisted.
You can use python pip to install twisted in centos or fedora.
Make sure you have python-pip installed then just do sudo pip install twisted in terminal

Resources