Changing the default python version on Mac - Installing Biopython - python-3.x

My Mac came installed with python 2.7 as the default python version. But, this version is no longer supported by many packages and software. I searched several online forums regarding how to change the default python version on mac. But, none of them seem to work. I also installed the latest version of python, and if I type:
python --version
It returns the version as python 3.8. But if I try to install packages like Biopython, I get an error like this -
defaulting to user installation because normal site-packages is not
writeable
Collecting biopython Using cached biopython-1.77.tar.gz (16.8 MB)
ERROR: Command errored out with exit status 1:
Biopython requires Python 3.6 or later. Python 2.7 detected
I am really finding it difficult to install many packages required for my work. Any help or suggestions would be greatly appreciated.
Thank you.

Probably, you just have to change your Python symbolic link.
Please check this, and you will get it: https://dev.to/malwarebo/how-to-set-python3-as-a-default-python-version-on-mac-4jjf

Related

Is there currently any way to install mypy for python 3.7 and use with PyDev?

I tried to install mypy with "phyton -m pip install mypy" but it fails with an error about typed_ast that says it needs Visual C++ compiler but after installing that the error remains. I found several similar reports and notes that it can't be fixed due to the typed_ast thing, I don't know any details about that.
Is there a way to install mypy manually? Just copy a bunch of files somewhere?
I use Windows 10, Python 3.7, I updated to the latest pip.
Any help or hint is welcome
Thanks a lot
Martin
I found an answer myself.
I have python 3.7-32 installed and there is no appropriate wheel for typed -ast for this. This video
https://www.youtube.com/watch?v=XZrThBBpFlo
explains the problem and also gives a solution. I installed a 32-bit wheel from the link given and then installed mypy again and it finished successfully.
Now I will try mypy.
Good luck

Getting Error When installing Kivy Modules

So to be honest I started to learn to code like two weeks ago. If anyone could help me with this problem that would be great!
so Basically when I try to install kivy-deps.angle, kivy-deps.glew, or kivy-deps.gstreamer I get a message like the one below.
ERROR: Could not find a version that satisfies the requirement kivy-deps.angle-dev==0.2.0 (from versions: none)
ERROR: No matching distribution found for kivy-deps.angle-dev==0.2.0
enter image description here
enter image description here
I Tried everything I could think of and of course the proposed solutions are a joke i get the same Error in the terminal, I have the latest version of pip
$ pip --version
pip 20.1.1 from /Users/colemanschnaak/Library/Python/3.7/lib/python/site-packages/pip (python 3.7)
Since Im using a mac I already have python 2.7 pre installed I tried switching the python3 to the default.(which wasted my time)
I saw online that some people just have to type
$ python3 -m pip install [kivy module name]
but that still didnt work.
since i just started getting in to coding thats all I can think of.
The current version kivy-deps.angle-dev 0.2.0 provides wheels for Python 3.6-3.8 for w32 and w64 only. No other wheels and no source code at PyPI.
If you need kivy-deps.angle-dev for a different Python or a different OS you have to compile from sources. If there is something to compile — I downloaded a wheel and didn't find any code inside it.

Twisted for python3.5?

There is no Twisted for python 3.5 at https://pypi.python.org/pypi/Twisted ,I am using python 3.5.2,what should I do?
I recently encounter a similar problem.
try this Unofficial Windows Binaries for Python Extension Packages
http://www.lfd.uci.edu/~gohlke/pythonlibs/#twisted
Use command "pip install yourfilename.whl"
I used it to fix the problem while installing scrapy
Each new release of Twisted includes updates that bring full equal functionality to the python3 version. Releases are roughly monthly, so you may find that the module already works for you.
It is possible (for example with virtualenv) to install both python2 and 3 How to install both Python 2.x and Python 3.x in Windows 7
Twisted support of python 3 on windows is lagging a little behind support on other systems. So if you have access to another OS you may find that it will allow you to install twisted for python 3.

Anaconda Python for Gurobi 6.0.4 installation _Py_FalseStruct error

In order to run an optimization problem we set up Gurobi 6.0.4 together with
Anaconda (Version 2.2.0) Python (Python 2.7.9.) on
Linux CentOS release 6.6 (Final) with the 2.6.32-504.16.2.el6.x86_64 Kernel
Following the installation guidelines of Gurobi (listed here: http://www.gurobi.com/documentation/6.0/quickstart_linux.pdf)
everything worked out in the first step. Gurobi was installed, could obtain a license. Also the PATH variables have been set (in the .bashrc) according to the manual, with a little extension for the referal to anaconda python (and not the other local Versions of python (being 2.7 and 3.4):
export GUROBI_HOME="/opt/gurobi604/linux64"
export PATH="${PATH}:${GUROBI_HOME}/bin:${PATH}:opt/anaconda/bin"
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${GUROBI_HOME}/lib"
Following the procedure we executed: python2.7 setup.py install in the respective directory /opt/gurobi604/linux64. After this usually you could run the import gurobipy command in the python interpreter wihtout errors. For older Versions of Gurobi (as 5.6.3) this works out very well.
For 6.0.4 though we constantly receive the error:
ImportError: /opt/anaconda/lib/python2.7/site-packages/gurobipy/gurobipy.so: undefined symbol: _Py_FalseStruct
This is very reproducible, no matter if we put anaconda also in the global path, and check the bash for any overwriting of the environment variables, which is not the case.
On Windows 8 the Gurobi 6.0.4 and Anaconda Python 2.2.0 work together without any problems.
Also applying hints from here: Python Module Error on Linux did not work out.
Did anyone else experience these problems with this tooling combination? thx.
The error message indicates that you use the Python module for version 3.4 in your Python 2.7 package directory. This can happen if you do not clean your Python module build directory between builds. Please try the following:
Completely remove the 2.7 package from your Python 2.7 installation (e.g. remove /opt/anaconda/lib/python2.7/site-packages/gurobipy)
Completely remove the Python module build directory from your Gurobi installation (e.g. /opt/gurobi604/linux64/build)
Re-run the build process for the Python 2.7 module (e.g. run "python2 setup.py install" in /opt/gurobi604/linux64)
Please note that CentOS is currently a non-supported platform for Gurobi.
Thank you for the hint, I think we tried that, but did not finish the procedure in this way. We tried to clean the system but in that particular case still hat both python Versions (due to other applications that use 3.4) on the machine. Our solution in this case was just to reinstall everything clean on a Ubuntu 14.04 VM. Since then no further problems occured. (I know not the cleanest solution.)
We had some similar issues when we updated to Gurobi 6.5, but that could be solved when corrctly addressing the usual path issues.
Thank you in any case for the reply, I think this really will help us with the next, then clean deployment :-)

PyFITS installation error python version 3.3 is needed, which was not found in registry

When I try to install PyFITS I get the following error
python version 3.3 is needed, which was not found in registry
But I do have python 3.3 installed as well as numpy and Scipy. I would appreciate any help sorting this out. Thanks
OS---Windows 7 64bit
Python----3.3.2
This problem is actually addressed in the latest Astropy installation troubleshooting docs: http://docs.astropy.org/en/v0.2.4/install.html#the-windows-installer-can-t-find-python-in-the-registry
This issue is not unique to PyFITS, and has to do with whether or not the installation executable was built with UAC support, as well as whether your Python installation was installed "For all users" or "For the current user", as that affects which registry hierarchy Python installs its relevant keys into.
The script linked to in that documentation should fix up your registry with the correct entries so that the correct Python installation can be found regardless of how it was installed. But as with anything that messes with the registry please do handle with care.

Resources