I started learning machine learning. I was stuck in the IDE where I was unable to add the module of sklearn in my Python file. It was showing ModuleNotFoundError: No module named 'sklearn.cross_validation'
Refer to this link on guide on how to install libraries in Spyder. If you are on ubuntu, then the best thing for you would be to install packages using pip as that will install and settle dependencies. You can also use conda for that. Make sure that python environment that spyder is using is same as the python environment you are installing the package for.
Great that you started learning machine learning, enjoy the journey!
I would advise you to install python using Anaconda https://www.anaconda.com/distribution/
If you do this most of the modules you will need will be pre-installed.
Related
installed mlflow on my windows machine with
pip install mlflow
followed by other dependent library pandas,numpy,sklearn
Ran a tutorial on wine quality model from the give link
https://www.mlflow.org/docs/latest/tutorials-and-examples/tutorial.html
I am getting the below error.
import mlflow.sklearn
ModuleNotFoundError: No module named 'mlflow.sklearn'; 'mlflow' is not a package
I thought it may be some firewall issue, so I tried on my personal system, and it's still the same error.
What could be the mistake I am doing here? or some library related issues I am facing here?
Please make sure you are installing the package at the correct PATH.
For example, if you have different versions of Python installed on your computer, installing packages can get a little tricky and thus, it's recommended to use a virtual environment to keep packages or different installations properly organised on your computer.
Since you are using a conda environment, I would suggest to use conda install mlflow with an appropriate channel instead of pip install mlflow i.e. conda install -c conda-forge mlflow.
For more details, please check https://anaconda.org/conda-forge/mlflow.
I tried to install GraphLab, but the result became like this:
AttributeError: module 'graphlab' has no attribute 'connect'
My python version is 3.6.1. And I also tried the code:
python -m pip install connect
But it didn't work.
Does anyone know how to solve this problems? Thanks!
This happens when Version in python on system is different from Anaconda. Anaconda Python is mixing in imports from the regular Python on the system. Make sure "which python" points to the right Python (whereever you installed Anaconda Python. And similarly "which pip" Otherwise you will want to run python (or pip) from [where ever you installed Anaconda]/bin/python. You can try the Dato Launcher which tries to set it all up for you.
Also, if you are not using Anaconda, on Graphlab support of installation, they recommended only two option for installation, one on Anaconda and the other on Virtualenv. I personally recommend you to use Anaconda for Graphlab as most of the development support and learning is totally based on Anaconda usage. You may follow this link to install Graphlab and Anaconda Here. I hope this helps.
Note: In installation of Anaconda, Python Version can be different like Python 2.7, but after installation of Anaconda, you can update to latest version of your choice.
I am trying to use caffe module with OpenCV. I am creating environment using Anaconda. I am not finding this module in Anaconda. Tried conda install caffe, it didn't work.
I am new to OpenCV and Python, please guide or provide reference on how to install caffe.
Please see the official install documentation directly on Caffe's site. You need to compile Caffe itself, and then compile the Python wrappers.
I am trying to install sklearn module through pip, but below is the error i am encountered.
I think error code 1 actually refers to missing Lapack/Blast dependencies on your windows installation. Lapack/BLAST are requirements for most scientific Python packages for example : numpy, scipy, sklearn etc...
You could either build these for source and then pip install sklearn
Instructions for this here > http://www.scipy.org/scipylib/building/windows.html
Or just install anaconda and not have any of these issues. If you want to do advanced data analytics with Python, I would recommend using Anaconda especially in windows machine where any scipy package installation will be like fighting with windmills
Instructions how to get Anaconda here > https://www.continuum.io/downloads#windows
Further tip. I would go with Anaconda full 3.6 for your dev machine so you have all that you might need out of the box. This includes popular science, data manipulation and math packages + Jupyper (iPython) notebooks and Spider IDE for development.
For server you only want required packages so use miniconda there.
Just install Anaconda and there type in conda install scikit-learn in the console.
I have install PyautoGui without any errors on my Windows 7 machine. When I am importing pyautogui, it is giving me "ImportError: No module named 'pyautogui'" error. I am using Python 3.6.0a1 shell.
I am a new bee at python, so your help will be much appreciated.
I have other versions of python before which I uninstalled and then reinstalled 3.6. Their folders are still in C drive. Thank you.
Look into Tim Reilly's blog.
You have a couple of environments which means you may not have pyautogui installed in Python 3.6.
Virtual environments mitigate this because you can run multiple versions of Python with different packages installed. Once you have an environment setup,
mkvirtualenv environmentName
workon environmentName
you can install a given package and ensure that you have a relatively standardized setup.
Alternatively, use something like pip install to make sure you have installed (or reinstall) this in your current python environment.