I'd like to install the pymongo library but I'm getting the following error:
(C:\Users\xxxxxxx\AppData\Local\Continuum\anaconda3) C:\Users\xxxxxxx>
conda install -c anaconda pymongo
Fetching package metadata ...
CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://conda.anaconda.org/a
naconda/win-64/repodata.json>
Elapsed: -
An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your way.
ConnectTimeout(MaxRetryError("HTTPSConnectionPool(host='conda.anaconda.org', por
t=443): Max retries exceeded with url: /anaconda/win-64/repodata.json (Caused by
ConnectTimeoutError(<urllib3.connection.VerifiedHTTPSConnection object at 0x000
00000054D6128>, 'Connection to conda.anaconda.org timed out. (connect timeout=9.
15)'))",),)
Steps taken to resolve:
1. Update C:\Users\\xxxxxxx\.condarc file with the following:
channels:
- defaults
ssl_verify: false
proxy_servers:
http: http://sproxy.fg.xxx.com:1000
https: https://sproxy.fg.xxx.com:1000
2. (C:\Users\xxxxxxx\AppData\Local\Continuum\anaconda3) C:\Users\xxxxxxx>
conda config --set ssl_verify False
Additional Info:
(C:\Users\xxxxxxx\AppData\Local\Continuum\anaconda3) C:\Users\xxxxxxx>
conda info
Current conda install:
platform : win-64
conda version : 4.3.27
conda is private : False
conda-env version : 4.3.27
conda-build version : 3.0.22
python version : 3.6.2.final.0
requests version : 2.18.4
config file : C:\Users\xxxxxxx\.condarc
netrc file : None
offline mode : False
user-agent : conda/4.3.27 requests/2.18.4 CPython/3.6.2 Windows/7 W
indows/6.1.7601
administrator : False
A number of posts online simply reinstalled Anaconda, any other options apart from a fresh install?
This works a charm:-
Just copy these:-
libcrypto-1_1-x64.dll
libssl-1_1-x64.dll
from D:\Anaconda3\Library\bin to D:\Anaconda3\DLLs.
Execute the following command in the cmd prompt/terminal:
conda config --set ssl_verify no
I try to create a virtual env with python 2.7 with anaconda, the base env is python 3.7. I encounter the exactly same problem. It turns out that there isn't such problem with other virtual envs with python 3.7 or 3.6.
This post works perfectly to solve my problem on win7 with anaconda prompt.
It basically says you need to add the following directories into your user environment path in windows (go to Start and type in: View Advanced System Settings, then select Environmental Variables: then select Path and click Edit: finally you can click New and add a path):
C:\your_directory_to_anaconda3\Anaconda3\Scripts
C:\your_directory_to_anaconda3\Anaconda3\
C:\your_directory_to_anaconda3\Anaconda3\Library\bin -- This is the directory for openssl
If you added conda to your PATH variables, remove it and use the "Anaconda Prompt". This solved the problem for me.
See: https://github.com/conda/conda/issues/8046#issuecomment-450582208
I faced this issue when I tried to create environment. I solved it by first activating conda base environment by using:
conda activate base
then I created the environment
conda create -n myenv python=3.7
Check the proxy URL
Verify .condarc file
For me, the problem was with the indentation in the .condarc file.
proxy_servers:
http: http://testproxy:8080
https: https://testproxy:8080
My authenticated proxy server is configured with a domain whitelist for massive and repeated downloads so root or local sudoer doesn't need to be authenticated.
Adding conda.anaconda.org is not enough as this repo redirect its traffic to amazonaws.com.
In my case, adding ".amazonaws.com" to the whitelist solved the issue.
The issue was resolved by adding a username and password to file C:\Users\xxxxx.condarc
channels:
- defaults
ssl_verify: false
proxy_servers:
http: http://xxxxx:password#sproxy.fg.abc.com:yyyy
https: https://xxxxx:password#sproxy.fg.abc.com:yyyy
I had the same problem on Windows 10-64 bit and intuitively installed the 64-bit version of miniconda. However, it results in exactly the same error above. Installing 32 bit conda installer has resolved the issue
Before installing some package (pydicom) the installation run just fine. After
it I tried to install matplotlib, but I got the same error as yours.
I tried conda config --set ssl_verify no but it didn't solve the problem so I set it again to true.
Fortunately, I had a virtual environment where I installed my packages. I closed all Anaconda prompts and tried in a new test environment. Magically, the install worked. I came back to my original virtual env and run the install again, and it worked!.
It might be that I just had to wait for some time before I could use conda install again.
One other thing I could do is remove the package that caused the problem, but I didn't have the chance to try it. If it has anything to do with some virtual environments not being affected, then one possible way to guard against this is to clone the environment before installing any new package.
Edit: I tried the same solution but It did not work. But instead of showing the error immediately, it asks me whether I want to proceed. I deactivated the env, and re-opened anaconda prompt, then did the same steps as above and worked again.
I also had the Same Issue, I resolved by installing 32 bit Anaconda Installer.
Which resolved the CondaHTTPError: HTTP 000 CONNECTION, on Windows 64 bit.
I faced this issues after "conda clean -a" on win-64.
Activating and deactivating existing conda env resolved the issue.
You might need to upgrade your openssl installation
You can download it here (Try the latest version):
https://slproweb.com/products/Win32OpenSSL.html
Source:
https://github.com/ContinuumIO/anaconda-issues/issues/6424#issuecomment-464660808
My issue was simply not running the conda init command prior to attempting to create an environment.
Came across the CondaHTTP Connection error after installing Anaconda environment on a new Windows 10 computer. I tried virtually all the recommendations above unsuccessfully! Looking up the Anaconda archives ( https://repo.continuum.io/archive/ ), I downloaded the immediate previous release .... and on installation and rebooting my PC, all is now wellscreenshot of release
In short - installing Microsoft Visual C++ Redistributable for Visual Studio solved my problem.
In more detail: upon trying a suggested solution of installing a new version of OpenSSL, the installation process told me I was missing a dependency - the Visual Studio Redistributable package. The installer led me to a direct download page of the 2017 version. I can't find that page now, but the official release of 2019 can be found here, and should work as well (found under Other Tools and Frameworks).
Uninstalling and reinstalling anaconda for all users (instead, of current user only, requires admin privileges) and activating the option to add Anaconda to PATH during the installation process, fixed the issues for me.
Thank you everyone for your responses. In my case, I found out that my Kaspersky Internet Security was blocking it the whole time. The moment I quit the application all applications were downloaded. Please check your firewall settings before trying all the above options.
I tried all of these solutions and none worked for me. After running the command
conda config --remove-key channels
in the Anaconda Prompt, everything started working for me on my next attempt.
Adding that I had the same problem on ubuntu on WSL. None of the solutions worked for me, until I realized I was working on WSL version 1 (I thought I'd already upgraded). Upgrading from WSL 1 to WSL 2 solved the problem for me.
Running following these two commands worked for me.
conda config --remove-key proxy_servers
conda clean --source-cache
I'd tried all of the advice on this and many other webpages.
In the end I broadcast a "help me Obiwan Kenobi, you're my only hope message" to a large group of people at work and one of them who used python all the time was able to help me
The trick was to set several windows environmental variables
CURL_CA_BUNDLE
REQUESTS_CA_BUNDLE
SSL_CERT_FILE
To my company's root certificate (a .cer or .crt) which I had downloaded to a spot on my disk
You may also need to add (in my case)
C:\Users\kdalbey\Anaconda3\Scripts
(or your particular \Anaconda3\Scripts) to your path.
And then I set proxies just for good measure
note I previously copied libcrypto-1_1-x64.dll, libcrypto-1_1-x64.pdb, libssl-1_1-x64.dll, libssl-1_1-x64.pdb from anaconda3\Library\bin to anaconda3\DLLs so that could be part of the secret sauce
and it didn't work until I killed and restarted anaconda-navigator
Two steps to deal with this error.
The Anaconda prompt configures the path, to include all the necessary executable files (for instance Library\bin - On Windows, launch it with admin permission). So that you need to use it to execute conda :
Update conda with conda update conda
Exit my proxy software which solved the issue.
I would like summarize some of the proposed answers in this post and propose my experience on that. As it can be understood from the error explanation, the error is related to the connection and I strongly believe that no need to uninstall and reinstall anything if the real cause of the problem be known. My problem gone away after the system powered off and powered on again one day later. So, some possible causes and their solutions (these solutions could be tested in order based on the written bulleted order) could be as follows:
Crash in anaconda prompt:
Probable solutions:
Deactivating and activating the environment, without removing all packages or …, or
Closing/reopening the prompt (Michael Heidelberg) or
Using cmd.exe instead, perhaps
Non-responsiveness of the anaconda site:
Massive site traffics related probable issues, that could be the reason of non-responsiveness or to temporary block some IPs
Probable solutions:
Retying as recommended in the error: HTTP errors are often intermittent, and a simple retry will get you on your way. It solves my problem sometimes. or
Activate or deactivate VPNs or Proxies (like use in .condarc; see: Github sroder, Nandhan Thiravia, Vinod Sangale, Peter Lucas, Sunding Wei).
Try after a while if you have time
System firewall block the site:
That might be happened by activating and deactivating of VPNs, repeatedly or by some other works
Probable solutions:
Finding the issue in system firewall and allowing the connection in the firewall settings (ScienceJedi, Github)
Reboot, perhaps
If the aforementioned ways didn't solve the problem, testing the related answers in the following order:
Add ...\Anaconda3\Scripts, ...\Anaconda3\, and ...\Anaconda3\Library\bin to the path (talentcat, skerjj, Victor Ochieng, jankap), perhaps need a reboot after (lightarrow)
Copying libcrypto-1_1-x64.dll and libssl-1_1-x64.dll from D:\Anaconda3\Library\bin into D:\Anaconda3\DLLs (Swapnil)
I think it could be used in the first step because It is unlikely to be cause of any other problem. The reason I didn't mention this at the beginning is that the developers could placed these files in that directory during installation, too, in default, but they didn't; perhaps it had some reasons (Github).
Note: these files are for Python >3, and I didn't find them for Python 2. Perhaps they have another names.
It must be said that my problem didn't solve by this solution.
Keep your SSL stack up-to-date (kamal dua, Anaconda troubleshooting, update openssl, Abdulrahman Bres, Update to openssl 1.1.1)
I didn't recommend it at first because Its not a good idea to unset ssl verification unless you know what you are doing (Pratyush comment) and somewhere I read that it couldn't return to True again.
It must be said that my problem didn't solve by this solution, too.
conda config --set ssl_verify false
conda update openssl ca-certificates certifi
I gave the following command
library(reticulate)
py_install("pandas")
I am getting an error while installing python packages in RStudio :
Solving environment: ...working... failed
CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.anaconda.com/pkgs/main/noarch/repodata.json.bz2>
Elapsed: -
An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your way.
If your current network has https://www.anaconda.com blocked, please file
a support request with your network engineering team.
SSLError(MaxRetryError('HTTPSConnectionPool(host=\'repo.anaconda.com\', port=443): Max retries exceeded with url: /pkgs/main/noarch/repodata.json.bz2 (Caused by SSLError("Can\'t connect to HTTPS URL because the SSL module is not available."))'))
Error: Error 1 occurred creating conda environment r-reticulate
Please help in resolving this error.
Solved a similar error arising from install_tensorflow():
SSLError("Can't connect to HTTPS URL because the SSL module is not available."))'))
by adding the path of the openssl.exe to the %PATH% environment variable of Windows. In my pc, the path is like this (replace "[username]" by yours):
C:\Users\[username]\Anaconda3\pkgs\openssl-1.1.1b-he774522_1\Library\bin
If somehow your openssl is an old version (as discussed here: https://github.com/conda/conda/issues/8046), you can install an up-to-date version following the guides below:
https://jchornsey.wordpress.com/2015/03/17/installing-openssl-in-windows-8-1/
https://www.cloudinsidr.com/content/how-to-install-the-most-recent-version-of-openssl-on-windows-10-in-64-bit/
As these guides explain, "the official OpenSSL website offers Linux sources only." For Windows binaries, you can obtain from https://slproweb.com/products/Win32OpenSSL.html provided by Shining Light Productions. The github issue discussion mentions that this link is listed on the OpenSSL wiki (https://wiki.openssl.org/index.php/Binaries -- I went there two days ago to confirm but today that page does not load, perhaps due to the Easter holidays).
The guides also explain that "If you’re not developing software, you don’t need the full versions; the “Light” version is intended for end-users.
Installing Python from RStudio seems interesting. One way to go is use reticulatepackage in R which provides R interface to Python and use Python within R.
Python packages are generally installed either using pip or 'conda' if anaconda is being used.
Then to use it in R, mention the proper path where python is installed in the system.
library(reticulate)
use_python("/usr/local/bin/python")
Reticulate also provides a way to install package using py_install() function.
library(reticulate)
py_install("pandas")
Please look for more details about reticulatepackage here and about installing packages here.
Atom Package install issue.png
Hello,
I am using Atom to develop nodejs code for the very first time, problem with accessing the packages tab of the settings. Whenever I search for something, I get this error come up:
self signed certificate in certificate chain
I have tried uninstalling Atom and reinstalling it, and the same problem comes up.
Is this an Atom problem, or more likely something to do with my machine, and if so, what?
Am using win10 and my atom version is Atom 1.33.0x64
Any help would be most appreciated, since I don't seem to be able to add extensions any more.
Many thanks,
Sathiya
From the Atom FAQ:
I’m getting an error about a “self-signed certificate”. What do I do?
This means that there is a proxy between you and our servers where someone (typically your employer) has installed a “self-signed” security certificate in the proxy. A self-signed certificate is one that isn’t trusted by anyone but the person who created the certificate. Most security certificates are backed by known, trusted and certified companies. So Atom is warning you that your connection to our servers can be snooped and even hacked by whoever created the self-signed certificate. Since it is self-signed, Atom has no way of knowing who that is.
If you decide that unsecured connections to our servers is acceptable to you, you can use the following instructions.
apm config set strict-ssl false
https://www.juev.org/2018/07/27/atom-ssl/
Because of a poor software architecture decision early in the NPM project, there is an env var that that will reject self-signed certificates, even if you have strict-ssl set to none. The solution is to set NODE_TLS_REJECT_UNAUTHORIZED=0 in your init.coffee (you can test it by running NODE_TLS_REJECT_UNAUTHORIZED=0 atom . and then trying to install a package.
# $EDITOR $ATOM_HOME/init.coffee or ~/.atom/init.coffee
# Disable TLS Verification.
process.env.NODE_TLS_REJECT_UNAUTHORIZED = 0
Below instructions useful you are behind corporate proxy and
using Atom zip download.
If you are on windows, Locate you apm.cmd file.
mostly at -> cd 'C:\Atom\atom-x64-windows\Atom x64\resources\app\apm\bin\'
Execute below command at your windows power shell:
.\apm.cmd config set strict-ssl false
After this in your Atom,
File -> Settings -> init.coffee
ssl=false
process.env.NODE_TLS_REJECT_UNAUTHORIZED = 0
proxy = "http://your.proxy:8080"
Restart your Atom, at try to install
File -> Settings -> Install -> (for eg. minimap)
Restart your Atom.exe
I also had same issue in Window 10 with atom IDE .
Reason is the proxy server which was blocking the connection to install the packages I was looking for .
So to address this I downloaded the package using apm command from the command line instance .
I was looking for go-plus package so used command as apm install go-plus
On Mac, just setting strict-ssl to false might not work.
You may have to set proxy for this.
apm config set proxy http://*****.****.***:<<port>>
apm config set https_proxy http://****.****.****:<<port>>
If you can get a copy of the self-signed certificate, you may point NODE_EXTRA_CA_CERTS to the self-signed certificate, instead of apm config set strict-ssl false. Here are the steps:
Export the self-signed root CA certificate in PEM format (or Base-64 Encoded X.509 (.CER) on Windows). Sorry, I cannot upload images to illustrate the process. But you may easily find some references by searching "export certificate pem chrome".
Set environment varialble NODE_EXTRA_CA_CERTS:
# Windows
set NODE_EXTRA_CA_CERTS=<absolute-path-to-the-self-signed-root-ca>
# Linux
export NODE_EXTRA_CA_CERTS=<absolute-path-to-the-self-signed-root-ca>
Install the desired Atom plugin:
apm install <plugin-name>
This question has been asked in: Configure proxy on Rstudio. However, it was never resolved.
I am a user of RStudio 0.99.486 version and R 3.2.2 version. I have tried 2 ways to configure proxy settings in the office without success after reading several suggestions:
FIRST TRY:
Type in Rstudio as first line:
Sys.setenv(http_proxy="http://user_name:password#proxy.company_domain.es:8080/")
Go to:
-Tools, -Global Options, -Packages, and unmark option:
"Use internet library/proxy for HTTP"
I also unmarked the option: "Use secure download method for HTTP".
Besides, I right-clicked on the R x64 3.2.2 icon of the desktop and added after 1 space in the "Target" camp:
http_proxy=http://user_name:password#proxy.company_domain.es:8080/
It did not work as I received the message:
Warning in install.packages : cannot open: HTTP status was '407
Proxy Authentication Required'
SECOND TRY:
Create a notepad file with the name:
.Renviron
Saved it in: "C:\Users\username\Documents".
The file contains inside the following 2 lines:
http_proxy=http://proxy.company_domain.es/
http_proxy_user=user_name:password
When I try installing a package I receive:
"Warning in install.packages : unable to connect to
'cran.rstudio.com' on port 80.
Unable to access index for repository http://cran.rstudio.com/src/contrib"
After running code line: R.home() My R_HOME route is:
"C:/Program Files/R/R-32~1.2"
I appreciate before-hand for your advice and help.
Thank you for your question. It helped me to resolve my issue. I had to unmark the option to use the settings from the Internet Explorer and restart.
Maybe your .Renviron does not contain the proxy port, you have to write
http_proxy=http://proxy.company_domain.es:8080/
http_proxy_user=user_name:password
If you specify
http_proxy_user=ask
it should prompt you for user name and password - then you know that the file is read
I struggled with this when I initially started working behind a proxy. Here's what I believe is to be the solution. Disclaimer, I am working on a Windows 7 Workstation.
Even though when you read through the documentation, R suggests that .Renviron and .Rprofile should be in R.home(), that is not the case for Windows.
By default (I believe), the R.home() for Windows is actually the Documents folder for your user. You can check that with
path.expand("~/")
which defaults to "My Documents" directory.
Therefore, do place the .Renviron file with the content you
already have, disable the Internet Explorer option in RStudio, and
make sure you place the file in "My Documents."
Hope it helps!
I also nearly gave up on this problem until I found this simple solution (R3.3.1):
specify the system environment variables (in Windows Advanced System Settings add the variables http_proxy and https_proxy and set it to
http://user_name:password#proxy.company_domain.es:8080/ with your specific settings)
in the R console type
update.packages(ask='graphics',method="libcurl",checkBuilt=TRUE)