using an older version of scikit-learn - python

I have conda 4.5.11 installed in my machine and Python 3.7.0 and I am trying to install scikit-learn 0.19 using the following procedure:
pip uninstall scikit-learn
pip install scikit-learn==0.19
but I get the following errors:
Failed building wheel for scikit-learn
Command "/anaconda3/bin/python -u -c "import setuptools, tokenize;file='/private/var/folders/x5/t6zy26vd4gq36xgq6yl45p2h0000gn/T/pip-install-7h06grkn/scikit-learn/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /private/var/folders/x5/t6zy26vd4gq36xgq6yl45p2h0000gn/T/pip-record-eem8zdll/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/x5/t6zy26vd4gq36xgq6yl45p2h0000gn/T/pip-install-7h06grkn/scikit-learn/
and a bunch of warnings too. How can I use an older version of sklearn with an anaconda installation of python?

conda install scikit-learn==0.19 worked.

I had a similar issue, needed scikit-learn==0.18.1. What worked for me was uninstalling the current Conda, going to https://repo.anaconda.com/archive/ and finding the version that I needed.
For reference, the one that worked for me was: Anaconda3-4.3.1-Windows-x86_64.exe from March 2017.
After that, restart the IDE, and all dependencies were on the version I needed.

Related

Can't install vowpalwabbit via pip in Windows

I am trying to install vowpalwabbit by using pip in Windows.
My python version is 3.7. As I am new in using vowpalwabbit, it is possible that I forget to configure some external dependencies. Therefore, can you please explain every single the step to make it work. I got the following error when I run the following:
pip install vowpalwabbit
raise Exception('Pre-built vw/python library for Windows is not supported for this python version')
Exception: Pre-built vw/python library for Windows is not supported for this python version```
----------------------------------------
Command "C:\Users\I516\Documents\Newsfeed\venv\Scripts\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\I336\\AppData\\Local\\Temp\\pip-install-3tgy0rvf\\vowpalw
abbit\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\I336\AppDa
ta\Local\Temp\pip-record-o5qdntld\install-record.txt --single-version-externally-managed --compile --install-headers C:\Users\I336\Documents\Newsfeed\venv\include\site\python3.7\vowp
alwabbit" failed with error code 1 in C:\Users\I336\AppData\Local\Temp\pip-install-3tgy0rvf\vowpalwabbit\```
A new version of vowpalwabbit (8.7.0) was released to PyPI last week. In addition, binary wheels for 64-bit Python 3.6/3.7 are available for Windows.
If you're using the 64-bit version of Python (or can switch to using it):
pip install vowpalwabbit
should work properly without any additional dependencies

Installing Scipy for Windows

I am trying to install Scipy on my computer. I did it by using the command pip install Scipy. (pip & numpy are up-to-date and I am using Python 3.6) I also tried it with Pycharm, but it didn't worked either.
I always do get this Error:
Command
"c:\users***\appdata\local\programs\python\python36\python.exe -u -c
"import setuptools,
tokenize;file='C:\Users\***\AppData\Local\Temp\pip-build-x3s21920\scipy\setup.py';f=getattr(tokenize,
'open', open)(file);code=f.read().replace('\r\n',
'\n');f.close();exec(compile(code, file, 'exec'))" install
--record C:\Users***\AppData\Local\Temp\pip-gr9ppj_q-record\install-record.txt
--single-version-externally-managed --compile" failed with error code 1 in C:\Users***\AppData\Local\Temp\pip-build-x3s21920\scipy\
Does anyone has an idea of what I can do?
Try to install it from the following binaries
http://www.lfd.uci.edu/~gohlke/pythonlibs/
These are unofficial precompiled binaries

can't install mysql-connector on Python 3.5.3 with pip3

I have successfully installed mysql-connector using 'pip install mysql-connector', however it installs to the Mac OSX standard version of Python (2.7).
I need it installed to my latest version of Python (3.5.3).
When I use 'pip3 install mysql-connector' or 'pip3 install --allow-external mysql-connector mysql-connector' I get the following errors:
Error 1:
Failed building wheel for mysql-connector
Error 2:
Command "/Library/Frameworks/Python.framework/Versions/3.5/bin/python3.5 -u -c "import setuptools, tokenize;__file__='/private/var/folders/ch/vzgxn0n119zggbgnb0_vg5400000gn/T/pip-build-po0zonwm/mysql-connector/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/ch/vzgxn0n119zggbgnb0_vg5400000gn/T/pip-q6b3vmy3-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/ch/vzgxn0n119zggbgnb0_vg5400000gn/T/pip-build-po0zonwm/mysql-connector/
Does anyone know how to resolve this problem? I don't want to have to switch back to Python 2.7.
Thanks.
This will do the thing:
pip3 install mysql-connector-python

Trying to install wxPython Phoenix for python 3

When I tried to install wx Phoenix via pip with this command
pip3 install --upgrade --trusted-host wxpython.org --pre -f http://wxpython.org/Phoenix/snapshot-builds/ wxPython_Phoenix
Well, after a long time trying to build it I get this error:
Command "/usr/local/bin/python3.4 -u -c "import setuptools, tokenize;
__file__='/tmp/pip-build-q1ih5z3f/wxPython-Phoenix/setup.py';
exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))"
install --record /tmp/pip-wygy2a7y-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1
in /tmp/pip-build-q1ih5z3f/wxPython-Phoenix/
Anyone have the same problem? How I can fix this?
I suppose you are on a Unix plattform. In that case the command as entered by you will not find any wheel, download the source package and try to compile it. See in the README.txt what to do to get wxPython Linux wheels:
Wheels for Linux
----------------
Since there are various options for distro and wx port (GTK2 or GTK3) then the
files can not all be located in the same folder like we can do for the Windows
and OSX builds. This just simply means that you'll need to drill down a
little further to find the URL to give to pip. For example, to get the GTK3
Phoenix builds for Ubuntu 16.04 (and 16.10, LinuxMint 18, and probably others)
you can use a pip command like this:
pip install -U --pre \
-f https://wxpython.org/Phoenix/snapshot-builds/linux/gtk3/ubuntu-16.04 \
wxPython_Phoenix

Installing scikit learn python package for Cloud9

Just wanted to learn more about the scikit-learn package for Python, whilst learning about ML in an online course I'm doing. I'm currently using the Cloud9 online ide as I'm using a chromebook.
However, when I try to install the scikit-learn package for my ide, the access is always denied. I tried the following piece of code ...
pip install -U scikit-learn
And, I got this response ..
running install_lib
creating /usr/local/lib/python2.7/dist-packages/sklearn
error: could not create '/usr/local/lib/python2.7/dist-packages/sklearn': Permission denied
----------------------------------------
Cleaning up...
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_ubuntu/scikit- learn/setup.py';exec(compile(getattr(tokenize, 'open', open) (__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-Oo3fnX-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_ubuntu/scikit-learn
Does anyone have any experience in installing the sklearn package for the Cloud9 IDE? It's mentioned using the pythonpath and this is what it currently contains ...
/usr/local/lib/python2.7/dist-packages:/usr/local/lib/python3.4/dist-packages:/usr/local/lib/python3.5/dist-packages
If anyone has any clues / tutorials I can follow to get this installed, I would really appreciate the help!
The problem is not related to scikit-learn or python.
you need to use sudo before your pip command, like so:
sudo pip install -U scikit-learn

Categories

Resources