[PYTHON] [PyCaret] Installation method Failed with pip-> Solved by creating virtual environment!

Here are some examples of Pycaret installation failures and successes. Success stories are listed below Failure stories.

1. 1. Failure case-1

** 1) Tried **: Run pip install at the command prompt.

cmd


pip install pycaret

** 2) Result **: "SSL Error" occurred and installation was not possible. image.png

2. Failure case-2

** 1) Tried **: Run pip install with Anaconda Prompt.

AnacondaPrompt


pip install pycaret

** 2) Result **: I get the error message "Cannot uninstall llvmlite." And cannot install. It seems that those that are not installed with pip cannot be uninstalled with pip. image.png

3. 3. Failure case-3

** 1) Tried **: Ignore only "llvmlite" that gave an error in 2, and execute pip install with Anaconda Prompt.

AnacondaPrompt


pip install pycaret --ignore-installed llvmlite

** 2) Result **: "Could not install packages due to an EnvironmentError: [WinError 5]" I get an error message and cannot install. image.png

4. Success stories

** 1) Tried **: Create a new virtual environment in Anaconda and install pycaret there.

** 2) Procedure **: (1) Execute the new virtual environment creation command from Anaconda Prompt.

AnacondaPrompt


#Enter the name of the newly created virtual environment in yourenvname. This time it will be Running.
conda create --name yourenvname python = 3.6

(2) You will be asked Proceed ([y] / n)? In the flow of (1), so enter y and press Enter. image.png

At this point, the creation of the virtual environment is complete. image.png

(3) Make the environment created in (2) Active.

AnacondaPrompt


#Enter the name of the newly created virtual environment in yourenvname. This time it will be Running.
conda active yourenvname

I get an error message for some reason, Now you can make the newly created virtual environment Active. image.png

(4) Execute pip install for the newly created virtual environment.

AnacondaPrompt


pip install pycaret

Running screen. I don't know if the terminal you are using is old or the speed of the line, It took 30 minutes to complete the installation. image.png

It's hard to tell if it ended normally, but the installation is now complete! image.png

(5) Install Jupyter Notebook in the newly created virtual environment.

From "Applications on" at the top left of the Anaconda Navigator screen Select the newly created virtual environment name ("Running" this time).

Click the Install button on Jupyter Notebook. image.png

(6) Open Jupyter Notebook.

When the installation is completed in (5), the Install button changes to the Launch button. Click the Launch button.

image.png

(7) Check if pycaret can be imported with Jupyter Notebook.

If the import is successful, you can use PyCaret on Jupyter. image.png

If you get an error message like this, PyCaret has not been installed. image.png

◆ Summary

It took longer than expected just to install PyCaret I'm sure there are a certain number of people who are having trouble with the same thing.

How to create and install a new virtual environment in Anaconda It is also recommended on the PyCaret official page, so please check if necessary.

Recommended Posts

[PyCaret] Installation method Failed with pip-> Solved by creating virtual environment!
How about creating a virtual environment with Anaconda and doing pip install?
Flow of creating a virtual environment with Anaconda
PIL installation with pip
Notes on creating a virtual environment with Anaconda Navigator
Virtual environment with Python 3.6
Building a virtual environment with pyenv-virtualenv/Python (installation, environment settings, packages) Mac environment
Switch virtual environment with jupyter
Activate Anaconda's virtual environment with PowerShell
Build python virtual environment with virtualenv
Command installation destination with pip, easy_install
Create a virtual environment with Python!
Building a virtual environment with Python 3
Installation method using the pip command of the Python package (library) Mac environment