Thomas Fauskanger
Thomas Fauskanger

Reputation: 2656

Why is installing packages with conda resulting in internal exception (out of memory / shutdown issue)?

Whenever I install a package with conda install <package-name> I get the following message:

extern "Python": function Cryptography_locking_cb() called, but got internal exception (out of memory / shutdown issue). Returning 0.

If I install more than one package (e.g. with conda update --all) then I get multiple messages: apparently the same number as number of packages. I get the messages at the end of installation, and it appears as though everything is installed fine; but I am not sure.

System info:

The current environment is Python 3.6, and I tried to install opencv3 as talked about here: Installing opencv 3.1 with anaconda python3?. Windows 10 64-bit.

Perhaps a related issue:

Perhaps unrelated, but I have another suspicious behaviour. Whenever I try to install a package that is not found in conda repository I get a truncated error message:

Fetching package metadata .............

PackageNotFoundError: Package not found: Conda could not find '

The Questions:

I doubt I am the only one experiencing this. I tried to search for the first message, but found no real answers. I've used Anaconda before, and on other machines, without problems. I've tried to reinstall Anaconda, but the errors persist.

  1. Is this really a problem?
  2. What can I do about this?

Thanks in advance.

Upvotes: 3

Views: 11513

Answers (3)

Upendra Jha
Upendra Jha

Reputation: 109

I also got the error NoSpaceLeftError: No space left on devices. Then I checked the space taken by conda(See below). I was surprised that conda takes this much space. I was having multiple environments in the same machine. So, I had to use a machine which has more space.

$ sudo du -shc ./miniconda3/*
18M     ./miniconda3/bin
4.0K    ./miniconda3/compiler_compat
4.0K    ./miniconda3/condabin
704K    ./miniconda3/conda-meta
176M    ./miniconda3/envs
12K     ./miniconda3/etc
5.4M    ./miniconda3/include
197M    ./miniconda3/lib
12K     ./miniconda3/LICENSE.txt
2.0G    ./miniconda3/pkgs
776K    ./miniconda3/share
4.0K    ./miniconda3/shell
0       ./miniconda3/ssl
0       ./miniconda3/x86_64-conda_cos6-linux-gnu
0       ./miniconda3/x86_64-conda-linux-gnu
2.4G    total

Upvotes: -1

Jialiang Cai
Jialiang Cai

Reputation: 1

I tried to use "deactivate" in the command line to exit the default environment; then I used "pip install (some package name)", it worked! Therefore, I suppose this issue is about the environment and library. (Hope it may help you~)

Upvotes: 0

Thomas Fauskanger
Thomas Fauskanger

Reputation: 2656

This answer is a summary of the comments thread on the question and how I solved the issue.

Suggested solutions:

  • do pip install cryptography>=1.7 --upgrade ref this question.
  • remove and reinstall Anaconda

Working solution:

Upgrading cryptography didn't fix my issue.

After I completetly removed and reinstalled Anaconda, and all environments, the problem was fixed. Why this didn't work the first time I reinstalled Anaconda I don't know, but assumable there must have been some residual files or settings somewhere on my system.

When I first removed the installation, I discovered that indeed the 32-bit version, and not the 64-bit version of Anaconda was installed. However, I don't know if that contributed to the issue because uzelusp had the same issue on a 64-bit installation.

Upvotes: 2

Related Questions