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

v0.10.1 broke Ubuntu 16.04 install via pip #635

Closed
mDuo13 opened this issue Feb 6, 2020 · 6 comments · Fixed by #642
Closed

v0.10.1 broke Ubuntu 16.04 install via pip #635

mDuo13 opened this issue Feb 6, 2020 · 6 comments · Fixed by #642

Comments

@mDuo13
Copy link

mDuo13 commented Feb 6, 2020

I manage a package (Dactyl) that uses watchdog as a dependency. Starting with the release of Watchdog v0.10.1, our Dockerized builds (Ubuntu 16.04) are failing on an ImportError for pathtools that ultimately comes from watchdog.

After some investigation, it appears to be that pip3 install watchdog no longer installs the necessary pathtools dependency because pip doesn't look at the setup.cfg file. This issue may be masked on some OSes because it's common for pathtools to be installed by default, but I was able to reproduce as follows:

  1. Creating a fresh Ubuntu 16.04 install (I did it on a VM)

  2. sudo apt-get install python3-pip

  3. pip3 install watchdog

  4. python3

  5. At the Python prompt:

     from watchdog.observers import Observer
    

    The result is similar to this error:

       File "/home/username/.local/lib/python3.5/site-packages/watchdog/observers/__init__.py", line 63, in <module>
         from .inotify import InotifyObserver as Observer
       File "/home/username/.local/lib/python3.5/site-packages/watchdog/observers/inotify.py", line 83, in <module>
         from watchdog.events import (
       File "/home/username/.local/lib/python3.5/site-packages/watchdog/events.py", line 91, in <module>
         from pathtools.patterns import match_any_paths
     ImportError: No module named 'pathtools'
    

Manually installing pathtools with pip fixes the error.

I suspect the changes in commit 6baa210 to remove pathtools from install_requires are the cause.

@BoboTiG
Copy link
Collaborator

BoboTiG commented Feb 6, 2020

Hello,

Could you tell us the setuptools version please?

@mDuo13
Copy link
Author

mDuo13 commented Feb 6, 2020

Seems to happen with the system-default setuptools version on Ubuntu 16.04, which, I think, is 20.x?

@BoboTiG
Copy link
Collaborator

BoboTiG commented Feb 6, 2020

Could you post the output of python -c "import setuptools; print(setuptools.__version__)" (or using python3, the Python you are using for your tests)?
I would like to check if we need to pin a minimum setuptools version before installing watchdog.

@mDuo13
Copy link
Author

mDuo13 commented Feb 6, 2020

Using Python 3, yes.

I'll have to get back to you on the exact setuptools version; I don't have the VM up and running at the moment. But, again, this is whatever the default one that comes on Ubuntu 16.04.

Since Watchdog does run great when you install the dependency and Ubuntu 16.04 is going to be supported (therefore common in cloud providers) for another 14 months or so, I would urge you to change the way you specify the dependency (back to how it was) to make it "just work" rather than pinning a minimum version.

@BoboTiG
Copy link
Collaborator

BoboTiG commented Feb 7, 2020

The thing is that if we move back to how it was done before the commit, it will break elsewhere (again, because of outdated setuptools).
I will need to do more tests in order to find a good fix for everyone.

@BoboTiG
Copy link
Collaborator

BoboTiG commented Feb 7, 2020

I found the right minimum version: 36.2.7.

But I do not know yet how to deal with that :)

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

Successfully merging a pull request may close this issue.

2 participants