Install scikit-learn on Mac - python

I am new to the developer world. I tried to install Python and scikit-learn on my Mac for a new project. I installed the other packages (NumPy, pandas, etc.) which worked. However with scikit-learn I am getting an error. I used pip install sickt-learn and the installation start. For whatever reason I got the error message below.
I am using Python version 3.8.0 (global) on a OSx machine 10.14.6. What did I wrong?
Thank you for your support!
enter image description here

Maybe you should run first:
pip install Cython

Related

How to install SciPy on MacOS with M1

I am trying to install keras in a virtual env but was getting errors. I then tried to install it following the steps on this site: https://www.tutorialspoint.com/keras/keras_installation.htm. The first few installs work but when I ran pip install SciPy I kept getting errors. I found others have encountered issues with installing SciPy on apple silicon online and saw a few recommendations but haven't been able to get anything to work so far. Can anyone help me out? Will I just have to wait for SciPy to release a compatible version?
If its helpful, I am working on a M1 processor with MacOS 11.3.1, and using python 3.8.2.
I have tried using homebrew as outlined here:
https://stackoverflow.com/a/66536896/16461391.
I have tried using miniforge as outlined here:
https://stackoverflow.com/a/66768260/16461391.
I managed to find a way to do it. I'm just posting my answer here in case someone else is stuck on the problem.
The way I did it was by running in terminal:
conda install -c conda-forge keras
then I checked it was installed in my condo env using the anaconda navigator, then I opened the condo environment in pycharm by following the steps here:
https://www.jetbrains.com/help/pycharm/conda-support-creating-conda-virtual-environment.html.

Cannot install Shapely on Windows

ERROR: Shapely-1.6.4.post2-cp36-cp36m-win_amd64.whl is not a supported wheel on this platform.
I cannot install Shapely with:
pip install "C:/path.../Shapely-1.6.4.post2-cp36-cp36m-win_amd64.whl
This is what I have tried so far:
* pip install --upgrade pip
* Python version 3.6.4, Windows 64 bit
Should I be installing another version? cp36 and win_amd64 looks correct. Unless amd means the CPU? In that case I have Intel i5. I don't see that version so I don't think that's it...
Any other suggestions on what I am doing wrong?
EDIT: Downloaded wheel from here: https://www.lfd.uci.edu/~gohlke/pythonlibs/#shapely
There's a helpful complete guide here to do so. Windows have many problems with python wheel files. If you want my advice, you better don't use Windows for python programming, Linux is perfect for such a thing. You can use Ubuntu which is great and stable.
If you really want to program python in Windows, I suggest you to install and use Anaconda. It's a great tool and helps you with installing python packages and programming in python.
EDIT: I tried the Anaconda way and it works fine. After installing Anaconda I opened Anaconda Powershell Prompt as admin (cause there was permission problem for me in installing Shapely!) and then ran the command conda install shapely. Once installation completed, I ran the command jupyter notebook and in jupyter I was able to use Shapely.
I installed the Shapely in the base environment of conda which is not good. If you want use Anaconda, you better learn how to manage environments in conda.

Ta-Lib python: installation failed

I'm trying to install TA-Lib module on my 3.6 Python, but i'm facing many problems. First of all, i already made sure that it's the x32 version. I have two versions of python installed, 2.7 and 3.6.
Here is what i tried:
pip install ta-lib
I got the error error: command 'cl.exe' failed: No such file or directory.
After that, i tried downloading it from here, but after running pip install TA_Lib-0.4.15-cp36-cp36m-win32.whl, i got the following error: requirement 'TA_Lib-0.4.15-cp36-cp36m-win32.whl' looks like a filename, but the file does not exist.
Did anyone else experience a similar problem or knows how to solve it? Thanks in advance
Try installing the cp38 wrapper (0.4.19) instead if cp39 doesn't work.
Worked for me.
I am using Anaconda 4.9.2 with Python 3.8.5, 64 bit version.
Download - TA_Lib‑0.4.19‑cp38‑cp38‑win_amd64.whl
Link : https://www.lfd.uci.edu/~gohlke/pythonlibs/#ta-lib
pip install TA_Lib‑0.4.19‑cp38‑cp38‑win_amd64.whl
Clone the GitHub repository and run setup.py.
$> https://github.com/mrjbq7/ta-lib
$> python setup.py install
Found this solution on a githib repo and it worked for me.
Download TA_Lib-0.4.10-cp27-cp27m-win_amd64.whl from http://www.lfd.uci.edu/~gohlke/pythonlibs/#ta-lib.
And use command
pip install TA_Lib-0.4.10-cp27-cp27m-win_amd64.whl
I was using anaconda with Python 3.6 64 bit version.
Link to github repo : https://github.com/mrjbq7/ta-lib/issues/127

Installing SciPy for Python 3.7 on Mac Os High Sierra

please help installing SciPy. I think i've tried almost any advice i could find, but still no luck.
I am using Mac High OS Sierra 10.13.1, python 3.7, trying to make this work for IntellIJ IDEA 2017.2 IDE. I have Xcode version 9.2 if that helps.
I've tried instaling from IDE, using package installer -> fails with error status code 1.
I've tried installing using pip3 install scipy
I've installed brew install gcc ( I have version 7.2.0 installed)
I've installed numpy.
I've tried to install using Macports as suggested on official site - didn't help.
I've tried to instal using brew install scipy.
I've tried to install using Conda. It installed somewhere to Conda Dir, but i still cannot access library from python file using import scipy, error: No module named scipy.
Looks like i am just going in loops now, can some one suggest any idea please?
Topics i researched:
SciPy build/install Mac Osx
Can't install Scipy through pip
"failed with error code 1" while installing scipy
Some other ones i lost links to.
Ok looks like i made it work.
This thread: helped me.
It appeared I was actaully able to install scipy package using conda. But my Python didn't see the package. So i had to:
Change Right Click on my project in IDE > Project > New > Python SDK > Add Local
Select Python in Conda dir. In my case it was /Users/[my user ]/miniconda3/bin/python3.6
Restart IDE just in case and my python script was able to see import scipy.
The downside of this - that I cannot install packages the clean way from IDE anymore for some reason. I.e. Tools > Manage Python Packages > + > doesn't find any. And I have to reinstall all the packages i had using conda install [package name] from terminal . But I am fine with it, as long as it works.
Hopefully my quest might be useful for someone.

getting python pyobcd installed

I'm a little lost on how to get pyodbc installed in my computer.
I have python 3.6.1
The link
http://support.esri.com/en/technical-article/000011656
pointed me to another link
https://github.com/mkleehammer/pyodbc
Which is vague.
I'm used to downloading and running an exe for install.
This link is unclear and says all I have to do is:
"pip install pyodbc"
What exactly do I need to do to get this working?
Since you have not mentioned which OS you are using,
I will assume that you are on windows (as you have mentioned that you are used to install using .exe).
Firstly you need to know what a pip is:
pip is basically a package manager for python packages used to install 3 rd party packages which do not bundle along with the python distribution.
On linux pip comes pre installed also if you are using python version 3.4 onwards or python 2.7.9 you will be having pip pre installed on your system.
All you have to do it to open the command prompt issue the command
pip install package-name(pyobdc here)
it will do the job.
If you do not find pip in your distribution you can refer this link
How do I install pip on Windows?
open cmd in your computer and type
pip install pyobdc
Hello there and welcome to python programming. Basically python comes with its package installer so either you can go to any interpreter that you are using and type pip install pyobdc or use the command prompt in windows and type in pip install pyobdc. This would install your module and just remember to put import pyobdc at the top of the code if you want to use this package. Further information can be found on here

Categories