toomore / grs

📈 台灣上市上櫃股票價格擷取(Fetch Taiwan Stock Exchange data)含即時盤、台灣時間轉換、開休市判斷。
http://pypi.python.org/pypi/grs
MIT License
430 stars 164 forks source link

Fail to run "pip install -U grs" on Windows 8.1 #38

Open snowuyl opened 7 years ago

snowuyl commented 7 years ago

Dear Toomore,

    I run the following command on Windows 8.1

pip install -U grs

But the following error occurred. Collecting grs Downloading grs-0.7.0.tar.gz (96kB) 42% |█████████████▋ | 40kB 91kB/s eta 0:00:01 53% |█████████████████ | 51kB 112kB/s eta 0:0 63% |████████████████████▌ | 61kB 134kB/s eta 74% |███████████████████████▉ | 71kB 119kB/s 85% |███████████████████████████▎ | 81kB 136k 95% |██████████████████████████████▊ | 92kB 1 100% |████████████████████████████████| 102k B 166kB/s Complete output from command python setup.py egg_info: Traceback (most recent call last): File "", line 1, in File "C:\Users\snowuyl\AppData\Local\Temp\pip-build-mcrgjp54\grs\setup.py", line 4, in import grs File "C:\Users\snowuyl\AppData\Local\Temp\pip-build-mcrgjp54\grs\grsinit .py", line 33, in from .fetchdata import Stock File "C:\Users\snowuyl\AppData\Local\Temp\pip-build-mcrgjp54\grs\grs\fetch data.py", line 497 raise ConnectionError(), u'IN OFFLINE, NO DATA FETCH.' ^ SyntaxError: invalid syntax

----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in C:\Users\snowuyl\A ppData\Local\Temp\pip-build-mcrgjp54\grs\

Do you have any suggestion?

Thanks in advance!

snowuyl

snowuyl commented 7 years ago

I run moving_average.py again with Python 2.7.12. But it fail now. But moving_average.py can be run after I type "pip install -U grs" on Dos terminal first time. My moving_average.py is as follows. from grs import Stock

stock = Stock('6278')
tuple = stock.moving_average(1)

The error log is as follows. C:\Users\snowuyl>cd \workspace_Python

C:\workspace_Python>python moving_average.py Traceback (most recent call last): File "moving_average.py", line 1, in from grs import Stock ImportError: cannot import name Stock

C:\workspace_Python>pip install -U grs Requirement already up-to-date: grs in c:\python27\lib\site-packages Requirement already up-to-date: ujson in c:\python27\lib\site-packages (from grs ) Requirement already up-to-date: urllib3 in c:\python27\lib\site-packages (from g rs) Requirement already up-to-date: python-dateutil==1.5 in c:\python27\lib\site-pac kages (from grs)

C:\workspace_Python>python moving_average.py Traceback (most recent call last): File "moving_average.py", line 1, in from grs import Stock ImportError: cannot import name Stock

C:\workspace_Python>

Do you have any suggestion?

Thanks in advance!

snowuyl