Skbio python module to support python 2 - python

I have python 2 installed on my machine. I want to use the skbio module for some part of my code. I tried installing skbio (pip install scikit-bio) but it says it does not support python 2 it is only available in python 3. I even tried importing skbio from future in my code but it did not work. Is there any way out I can install and use skbio module for my python 2 version?
Thanks in advance.

scikit-bio dropped Python 2 support in version 0.5.0 and is now only compatible with Python 3.4+. Versions 0.4.2 and earlier are Python 2/3 compatible, so you could try out an older version:
pip install scikit-bio==0.4.2

Related

Update Python to 3.8 and the modules doesn't work

I had Python3.5.2 installed on /usr/bin/.
All the modules include scipy and numpy works well.
But, after I installed Python3.8 the modules scipy and numpy doesn't work.
I saw that Python3.8 is in usr/local/bin instead usr/bin.
So, how can I run Python3.8 using all the modules like I used with Python3.5.2?
Python 3.8.0 was just released on 2019-10-14, so several modules are not yet supported (as of 2019-10-31). SciPy, Matplotlib, and SciKit-Learn are not yet supported. These may be supported by the time 3.8.1 is released in 2019-12-16.
Numpy and Pandas are supported, but for the others you will need to continue using a supported version of Python. To keep both versions on your machine, I would recommend using a virtual environment.

Numpy package error

It is showing numpy package installed
and when I am running a code having the numpy package imported, it's showing an error message
install numpy+mkl if you using python 3.5 64bit numpy-1.12.1+mkl-cp35-cp35m-win_amd64 if you using python 3.5 32 bit install numpy-1.11.3+mkl-cp35-cp35m-win32
from this link you can find bit http://www.lfd.uci.edu/~gohlke/pythonlibs/

Matplotlib won't install properly on Python 3.5

I've just installed Python 3.5 to experience its functionality. The problem is that all the modules I use in my daily programming have been installed and run very well on it except Matplotlib. I installed it via pip and never faced any errors while installing, but when I wanted to import it, the error saying, DLL load failed: The specified module could not be found. popped up.
What's the matter with Python 3.5, or Matplotlib?
Uninstall the module using pip uninstall matplotlib then install it again using http://matplotlib.org/downloads.html
Obtain the .exe file that best fits your machine, in my case it would be matplotlib-1.4.3.win-amd64-py3.4.exe. This will be a more complete version of matplotlib for windows rather than using pip.
I would also consider rolling back to Python 3.4 unless you absolutely need 3.5. There shouldn't be a compatibility issue between 3.4 and 3.5 for Python, but as far as matplotlib it's been tested with 3.4, but if you run through problems on 3.5 I would roll back.
If you have Python 3.5 you should install MS's Redistributable DLLs to make matplotlib working on Windows... In my case, no need to reinstall matplotlib even...
Try this example without. If error appears install that and try with it (you must log in MS site and download version for arch you using - i tested x86 only, Windows 7, Python 3.5).
That case is included in matplotlib install documentation!
Remember, you should always read documentation before you ask!

Creating Graphs in Pythons using matplotlib: ERROR Module 6

I am trying to create a graph on Python (version 3 and above) using matplotlib, however I keep getting the error saying
ImportError: No module named 'six'
Does anyone know how to fix this? I have already tried downloading the module. And I still get this error.
Are you sure you've installed six?
If you have both python 2.x and 3.x installed, it may be that when running easy_install or pip, you're installing six for 2.x rather than 3.x. If you have pip, try running pip3 install six in a shell, or for easy_install, run easy_install-3.4 six (replace 3.4 with your 3.x python version).

Can import objc module in python 2.6 but NOT in python 2.7

My system: Mac OS X 10.6.8, gcc 4.2, python 2.7, xcode 3.2.3
I use python 2.7 and I got error when tried to do: import objc, it returns: ImportError: No module named objc.
It looks like the objc module is not there. But actually I have the objc module installed already. Snow Leopard has got pyobjc preinstalled and I have also checked this using python2.6 (I have python 2.7 and 2.6 in my Mac). So if I invoke import objc using python2.6, I got no error which means objc exists and I can use that module without problems ... but if I import using python 2.7, I will got the ImportError: No module named objc error.
Does anyone have any solution? FYI, the python2.6 is coming preinstalled with OS X while 2.7 is manually installed. I've been using the 2.7 for couple of months without problems.
Python C extension modules like objc cannot be re-used between python versions. You'll have to install the objc module for 2.7 separately.
Generally, different python installations (such as 2.6 or 2.7, or 3.2) use separate module import locations, and you normally install extensions per python setup.
In general, packages installed with one python installation are not available to other python installations. You can make them available by messing with sys.path (or by setting PYTHONPATH in your environment) and installing your modules to a common place, however, as pointed out by #MartijnPieters, if it is a C extension, you'll need to re-build the module for python 2.7 (and then you can't put it in a common place). Usually, this is as easy as:
<sudo> python2.6 setup.py install #install for python 2.6
<sudo> python2.7 setup.py install #install for python 2.7
since the command python is generally just a (soft) link to your preferred python installation.
sudo may or may not be necessary depending on where your python implementations live on your path.
This works for pure python modules too by the way. Since the source code generally doesn't take up too much space, this may be a good way to install all your modules if you'll be switching back and forth between python 2.6 and python 2.7.
The same thing goes if you're using easy_install to install your packages:
easy_install-2.6 somepackage
easy_install-2.7 somepackage

Categories