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

↘锁芯ラ 提交于 2019-12-24 12:05:03

问题


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?


回答1:


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


来源:https://stackoverflow.com/questions/47179822/assertionerror-multiple-dist-info-directories-on-data-science-experience

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!