简体   繁体   中英

AssertionError: Multiple .dist-info directories on Data Science Experience

In a Python 3.5 notebook, backed by an Apache Spark service, I had installed BigDL 0.2 using pip . When removing that installation and trying to install version 0.3 of BigDL, I get this error: (linebreaks added for readability)

AssertionError: Multiple .dist-info directories:
/gpfs/fs01/user/scbc-4dbab79416a6ec-4cf890276e2b/.local/lib/python3.5/site-packages/BigDL-0.3.0.dist-info,
/gpfs/fs01/user/scbc-4dbab79416a6ec-4cf890276e2b/.local/lib/python3.5/site-packages/BigDL-0.2.0.dist-info

However, neither of these directories exists:

!ls -al /gpfs/fs01/user/scbc-4dbab79416a6ec-4cf890276e2b/.local/lib/python3.5/site-packages/
total 0
drwx------ 2 scbc-4dbab79416a6ec-4cf890276e2b users 4096 Nov  8 06:12 .
drwx------ 3 scbc-4dbab79416a6ec-4cf890276e2b users 4096 Nov  8 06:12 ..

What's wrong? How can I install the new version of the package after removing the old one?

The directory paths in the error message are wrong. The Python 3.5 kernel on DSX specifies a build directory for pip by setting the environment variable PIP_BUILD. The multiple dist-info directories are there:

!printenv PIP_BUILD ; ls -l $PIP_BUILD/*
/tmp/scbc-4dbab79416a6ec-4cf890276e2b/pip-build
total 0
drwx------ 8 scbc-4dbab79416a6ec-4cf890276e2b users 117 Nov  7 02:02 bigdl
drwx------ 2 scbc-4dbab79416a6ec-4cf890276e2b users 135 Nov  7 02:02 BigDL-0.2.0.dist-info
drwx------ 2 scbc-4dbab79416a6ec-4cf890276e2b users 135 Nov  8 06:12 BigDL-0.3.0.dist-info

To fix the problem, remove the build directory:

!rm -rf $PIP_BUILD

After that, pip can install the package without problems:

!pip install --no-dependencies bigdl==0.3
Collecting bigdl==0.3
  Using cached BigDL-0.3.0-py2.py3-none-manylinux1_x86_64.whl
Installing collected packages: bigdl
Successfully installed bigdl

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM