[Personal memo] pip install fails, so solve it

Introduction

The other day, a Twitter follower bought a new PC, so I sometimes got an old PC that I no longer need. Therefore, I would like to install Python, which is strong in data science, using Anaconda to solve integer programming problems on the PC I received, and solve the problem using PuLP! have become. However, conda install pulp doesn't have such a thing! When I tried to install pulp from a place called conda-forge, I got a message saying "Internet connection is not working ...". I haven't started programming yet, so I thought that it would be pip install pulp and "Danger of mixing conda and pip Despite being told, I typed the command pip install pulp. However,

cmd.exe


WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available. 

And it became "I have seen such a message in the past ...". However, I forgot the solution at that time, so I wanted to summarize the solution this time.

The environment is Windows 10 Home conda 4.8.0 Python 3.7.4 is. I'm sorry if it has already appeared. Well, then, I'm looking forward to working with you.

Missing libssl-1.1-x64.dll in C: \ Windows \ System32

First of all, I tried Google search with this error sentence above, but as a solution, I found the following site.

https://qiita.com/hasht/items/29a0a1bdb665e356ce66 https://github.com/pypa/virtualenv/issues/1139#issuecomment-481847818

Well, it says that if you remove libssl-1.1-x64.dll and libcrypto-1.1-x64.dll directly under System32, it works, so the meaning of remove is "remove", so should I remove them? So, when I looked into my System32 folder, the corresponding file was not found.

(Addition) On this github site, it says "I tried to put PATH in Anaconda3 \ Library \ bin, but it didn't work" ...! I should have read the message properly and tried it from here (regret) Since it was already mentioned, this article will be deleted soon (Addition so far)

In addition to this

https://qiita.com/atsonic/items/be5cdc7cf066ae947426

There was a solution such as, but this folder called iCLS does not exist on my PC, so I was in a lot of trouble.

solution

In the previous chapter, from the search of the error statement, it was found that the cause was per SSL (?) (Even if I tried import ssl, an error was thrown). Also, on my PC, the files libssl-1.1-x64.dll and libcrypto-1.1-x64.dll shown above exist in the C: \ Users \ [user name] \ Anaconda3 \ Library \ bin folder. I found out that. Furthermore, on another PC where import ssl was successful, this C: \ Users \ [user name] \ Anaconda3 \ Library \ bin was in the PATH, so maybe this is the cause. I thought about it and tried it, and it was right. When I added C: \ Users \ [user name] \ Anaconda3 \ Library \ bin to the system environment variables, both import ssl and pip install worked fine.

To myself

To install PuLP, search for Anaconda Cloud instead of pip install and do conda install -c conda-forge pulp.

in conclusion

Sorry for the shit article. I wrote it because it didn't apply to either removing the System32 one or replacing the one in iCLS. I think it has already appeared, but please miss it.

Recommended Posts

[Personal memo] pip install fails, so solve it
When pip install fails
Pip install --ugrade pip fails on Windows
`pip install pygraphviz` fails to find graphviz
Install Memo
I got an SSL related error with pip install, so I solved it
I tried to publish my own module so that I can pip install it
Note: What to do if pip install fails
sudo pip install
I got an error when pip install pandas on Mac, so I dealt with it
What to do if pip install fails in Xcode 5.1
What to do if pip install fails to install dependent libraries
Install tweepy with pip and use it for API 1.1
I got an error when pip install tweepy on macOS Sierra, so I dealt with it