Skip to content
Advertisement

Not able to install python modules due to multiple issues

I work behind a corporate firewall. I need pymssql library to use some queries. I try installing via pip, which gives me the error:

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

I install openssl as mentioned by multiple answers in this site from https://slproweb.com/products/Win32OpenSSL.html. I get the same error even after installation.

I set http_proxy and https_proxy in the system variable and try again. I get the same error

I set the above proxies via command prompt and do a pip/easy_install. Same issue

I try the –trusted host method in pip. Same issue.

After this, I download the package manually and do a python setup.py install, which gives me an error:

‘Microsoft 14+ build tools are required’

I download the build tools, hoping this will solve the issue, But i get the same error

How can I solve this? I tried with proxy, without proxy and all combinations of the above. Why is my build tools installation not recognised?

Note: I do not have anaconda and i have never used it.

Advertisement

Answer

What finally worked for me was the note in the question. All other answers just gave a vague idea. So here is a more detailed answer 1) Install Anaconda. 2) Install openssl. The openssl from the link in many answers did not work for me. What worked for me was installing mosquitto( Make sure the commands, where python, where pip , where openssl and where libssl-1_1-x64.dll all yields results in command prompt. If you get libssl and libcrypto dll in system 32 path as the result to where command, delete them from system32). After installing mosquitto, it will take the openssl and libssl dll from mosquitto folders. If the command yields results without mosquitto, do not install it. 3) Add the anaconda path, anaconda scripts path and anacondaLibbin paths to path variable. 4) Pip install module name in anaconda command prompt. This will be a success

After all this, you have to change your virtual envt in pycharm with conda envt. Give the path of conda executable( the path to python.exe in anaconda) and your test will run. If it does not try to install the module from pycharm itself after clicking on add module in python interpreter. After the above changes, module will be installed.

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement