Failure to install packages due to duplicate RECORD files

Answered

I have a recurring problem with PyCharm Community 2019.1 and attempts to install, or upgrade python packages using pip, both through the settings interface and via the built in terminal on Windows 10 and . The error message given is, as an example:

Could not install packages due to an EnvironmentError: 'Path\to\venv\Lib\\site-packages\\setuptools-41.0.0.dist-info\\RECORD.pip' and 'Path\to\venv\\Lib\\site-packages\\setuptools-41.0.0.dist-info\\RECORD' are the same file

 

I am receiving this error for Python 3.7, 3.6 and 2.7. The error does not stop me installing the package, as a repeated attempt to install following the error will work, however for packages with multiple dependencies I have to restart the install for each package installed. Any help would be very much appreciated.

6 comments
Comment actions Permalink
Official comment

Just to share the knowledge - we highly discourage placing interpreter-related files in cloud folders (Google Driver, OneDrive e.t.c) or network shares.

Comment actions Permalink

Hi Rob,

Do you have the same problem if you try to install those packages from the system terminal (outside of PyCharm) using the same interpreter?

0
Comment actions Permalink

Hi Sergey, it works fine when using pip through the system command prompt, so i'm guessing the issue is with pip in PyCharm.

0
Comment actions Permalink

Is it a local drive or some network one like Google File Stream?

Try recreating your virtualenv from scratch (remove existing one and configure again).

0
Comment actions Permalink

Since there hasn't been any further updates.... I have the same issue, but it's because Google Drive is still syncing the files. If you allow the files to sync, pip installs packages without any issue only problem is you have to allow 1 package dependency at a time. Highly recommend not having this on a google drive or file stream.

0
Comment actions Permalink

Check if there's a space in the working dir where virtual env is created. Python doesn't like spaces in the path https://github.com/pypa/pipenv/issues/228

0

Please sign in to leave a comment.