DVC exception raised at any command

Hello!
I have just installed dvc and it looks for me that I face some dependency error.
Exception is raised at any command launch, e.g. at ‘dvc status’ (traceback is applied).
At the same time there is no such exception when I install and use dvc in just-created virtualenv.
Unfortunately there are quite a lot of packages in broken env and I am not sure which one could cause an exception, but if you had any guess I could check it.

I can’t apply .txt files because of file extension restrictions: traceback, pip freeze for env where dvc is broken:

Fedora 29(4.20.16-200.fc29.x86_64), python 3.6, dvc==0.32.1

Hi @zimka !

Looks like it is a problem in your futures package. Try running

pip uninstall -y futures

That should fix the issue. Let us know if that worked for you. :slight_smile:

Thanks,
Ruslan

1 Like

Hi @kupruser, you are right, future deletion has solved the problem, thanks!
However, should I report such behaviour as a bug somehow? In my opinion it would be nice to catch exception somehow or add some version requirements for futures.

@zimka Glad to hear it works! :slight_smile: From futures package description at futures · PyPI :

This is a backport of the concurrent.futures standard library module to Python 2.
It should not be installed on Python 3, although there should be no harm in doing so, as the standard library takes precedence over third party libraries.

Dvc only requires futures for python 2.7 https://github.com/iterative/dvc/blob/master/setup.py#L51 and doesn’t require it for py3. In your case, there was some other package that installed futures (i’m not sure which, but you might be able to find out with pipdeptree) and it somehow took precedence over the standard library. But if you look at an updated warning in the github repo for futures you could find Upgraded the Python 3 warnings · agronholm/pythonfutures@1f9c23f · GitHub

It does not work on Python 3 due to Python 2 syntax being used in the codebase. Python 3 users should not attempt to install it, since the package is already included in the standard library.

So futures should simply not be installed on python3, so it is a bug in some other package that we should report this bug to. Also, if you google this error, it seems like people are experiencing it in other packages too. From our side, we could detect that package is installed and warn about it, but that feels like a bit of a hack. We will consider doing that if we see that it is a common issue.

Thanks,
Ruslan

Thank you for such detailed explanation. I think futures could be installed as azure-sdk dependency
Not sure if azure-sdk widespread enough among dvc users to justify the hack you mentioned (dvc[azure] does not install it).

1 Like