-
Notifications
You must be signed in to change notification settings - Fork 95
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
setup.py should not import pyscreeze #13
Comments
Hitting this issue when doing 'pip install -r requirements.txt' with a requirements.txt that includes pyautogui (which is dependant on pyscreeze); even when pillow is first listed in the requirements.txt. If I first 'pip install pillow' then install from my requirements.txt I can work around it. |
No idea how to work around this. Trying to install pyautogui, and it fails when trying to install pyscreeze due to the Just trying a simple |
@Wykleph : Installing pillow before installing pyautogui makes it work. |
@divkis01, I did try this when I was troubleshooting, however it did not work. I ended up giving up on this particular library, so I don't have any more information to provide. |
setup.py
importspyscreeze
to get the version info. This then fails if the dependencyPIL
(Pillow
) is not already installed when setup.py is run (which may be bypip
).Solution: put version info (and optionally any other distribution metadata) in an extra module file (e.g.
version.py
,release.py
ormetadata.py
) and do not import it, but read it with:BTW,
from pyscreeze.version import __version__ as version
does also not work, since this will implicitly importpyscreeze/__init__.py
.This also prevents the possible problem where
setup.py
is run with an already installed version of pyscreeze and the version info is read from the installed package, rather from the directory, from whichsetup.py
is run.The text was updated successfully, but these errors were encountered: