akapur / pyiqfeed

Python LIbrary for reading DTN's IQFeed
GNU General Public License v2.0
168 stars 108 forks source link

Update requirements.txt #42

Closed peterfig closed 5 years ago

peterfig commented 5 years ago

pypiwin32 is required when performing a clean install e.g. a new virtualenv, else:

File "C:\Users\peter\pyiqfeed\pyiqfeed\service.py", line 137, in launch
ShellExecute = __import__('win32api').ShellExecute
ModuleNotFoundError: No module named 'win32api'

Cleverly, the module is named differently (win32api) than the required package (pypiwin32).

akapur commented 5 years ago

I think this is a Windows/virtualenv issue. With most sane non-broken installations of Python on Windows, win32api and win32con should be installed by default with the Python installation. Not really sure how this works with a virtualenv on Windows, but I think the right thing to do here is for virtualenv to add those packages to a base environment on Windows since it's essentially the equivalent of the package os on other platforms.

Adding this package to requirements.txt would cause problems on non-Windows platforms so I can't merge the pull request as is. Really appreciate the pull request thought. If there were a Windows platform specific way to do this, I'd accept that pull request.

peterfig commented 5 years ago

Agreed, perhaps this is best as a footnote in the documentation.