Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache entry deserialization failed, entry ignored #540

Closed
Deena-B opened this issue Dec 17, 2018 · 3 comments
Closed

Cache entry deserialization failed, entry ignored #540

Deena-B opened this issue Dec 17, 2018 · 3 comments

Comments

@Deena-B
Copy link

Deena-B commented Dec 17, 2018

I'm noting my steps here with the hope of integrating this workflow into the docs.

I am using anaconda (version 1.7.2) on a macOS High Sierra (version 10.13.6)

In a terminal that opens up to the conda "base" environment:

Create a virtual environment called "biocommons"
conda create -n biocommons

Activate your biocommons virtual environment
conda activate biocommons

Install pip
conda install pip

Install postgresql
conda install -c anaconda postgresql

Install hgvs
pip install hgvs

Red text that appears during installation:

  • Numerical Python (NumPy) is not installed, therefore, failed to build biopython.
  • kaggle 1.5.0 requires python-dateutil, which is not installed.

Test your installation
hgvs-shell

In [1]: v = hp.parse_hgvs_variant("NM_033089.6:c.571C>G")

In [2]: am37.c_to_g(v)
Out[2]: SequenceVariant(ac=NC_000020.10, type=g, posedit=278801C>G)

In [3]: am38.c_to_g(v)
Out[3]: SequenceVariant(ac=NC_000020.11, type=g, posedit=298157C>G)

Exit the hgvs-shell
ctrl+d

Deactivate the biocommons virtual env
conda deactivate

Create a biocommons kernel for jupyter notebooks
python -m ipykernel install --user --name biocommons --display-name "biocommons stable"

  • --name biocommons tells it to install the biocommons virtual env
  • --display-name "..." is what the kernal is referenced as in a jupyter notebook

Open a jupyter notebook
jupyter notebook

In your notebook:

Change the Kernal to "biocommons stable"

import hgvs
Error: ModuleNotFoundError: No module named 'hgvs'

hgvs-shell
NameError: name 'hgvs' is not defined

@reece
Copy link
Member

reece commented Dec 18, 2018

No. This is an innocuous error in pip that is annoying many people in many contexts.

The first Google hit when searching for "Cache entry deserialization failed, entry ignored" leads to this comment in pip:

I found that on Python 2, pip is able to use a cache populated by a Python 3 run but not vice versa.

A response cached on Py2 results in the cache storing a header that loads on Py3 as bytes instead of str. This causes the deserialization to fail. Working on a PR to fix it upstream.

@reece reece closed this as completed Dec 18, 2018
@Deena-B Deena-B changed the title pip install returns multiple "Cache entry deserialization failed, entry ignored" install hgvs in a conda virtual environment Dec 18, 2018
@reece
Copy link
Member

reece commented Dec 18, 2018

@Deena-B: Changing the question and topic of an existing issue is confusing. My reply above made sense in response to the original question, but makes absolutely no sense now. Editing an issue for clarity is fine, but please don't reuse existing issues for new questions.

I'll email you the original subject and text. Please restore those here, then create a new issue with the new question. Thanks.

@Deena-B Deena-B changed the title install hgvs in a conda virtual environment Cache entry deserialization failed, entry ignored Dec 20, 2018
@Deena-B
Copy link
Author

Deena-B commented Dec 20, 2018

@reece Thanks for calling me on this. I restored the original subject and text and posted my new issue, which resolves this issue here: #543

(Sorry, I didn't see that you had already replied to this issue)

The fix for this issue (#540) was to install pip inside my virtual env with
conda install pip

I also installed postgresql with
conda install -c anaconda postgresql

Then pip install hgvs worked

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants