switch-model / switch

A Modern Platform for Planning High-Renewable Power Systems
http://switch-model.org/
Other
130 stars 85 forks source link

About installing the "advanced" dependencies #111

Closed KevinXo closed 5 years ago

KevinXo commented 5 years ago

Dear sir, I want to use certain advanced features of SWITCH, when I install the advanced dependencies via "pip install --upgrade --editable .[advanced]",the following situation has occurred. (base) C:\ProgramData\Anaconda2\Lib\site-packages\switch-2.0.2>pip install --upgrade --editable .[advanced] DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. Obtaining file:///C:/ProgramData/Anaconda2/Lib/site-packages/switch-2.0.2 Requirement already satisfied, skipping upgrade: Pyomo>=4.4.1 in c:\programdata\anaconda2\lib\site-packages (from switch-model==2.0.2) (5.6.5) Requirement already satisfied, skipping upgrade: testfixtures in c:\programdata\anaconda2\lib\site-packages (from switch-model==2.0.2) (6.9.0) Requirement already satisfied, skipping upgrade: pandas in c:\programdata\anaconda2\lib\site-packages (from switch-model==2.0.2) (0.24.2) Requirement already satisfied, skipping upgrade: numpy in c:\programdata\anaconda2\lib\site-packages (from switch-model==2.0.2) (1.16.2) Requirement already satisfied, skipping upgrade: scipy in c:\programdata\anaconda2\lib\site-packages (from switch-model==2.0.2) (1.2.1) Collecting rpy2 (from switch-model==2.0.2) Using cached https://files.pythonhosted.org/packages/8d/7c/826eb74dee57e54608346966ed931674b521cf098759647ed1a103ccfa79/rpy2-3.0.4.tar.gz Complete output from command python setup.py egg_info: rpy2 is no longer supporting Python < 3.Consider using an older rpy2 release when using an older Python release.

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

Command "python setup.py egg_info" failed with error code 1 in c:\users\kevin_xo\appdata\local\temp\pip-install-3etqdj\rpy2\

So what should I do? Thanks a lot!

mfripp commented 5 years ago

It looks like you have most of the optional packages already installed, so you should do OK just installing without the [advanced] option. Alternatively, you could install rpy2 before Switch, via pip install rpy2==2.8.6. Or you could change 'rpy2' to 'rpy2<2.9.0' in setup.py before running pip install. I will update the main codebase with that change soon. (And hopefully this summer we can upgrade Switch to work on Python 3).

Matthias

On Jun 12, 2019, at 11:03 PM, KevinXo notifications@github.com wrote:

Dear sir, I want to use certain advanced features of SWITCH, when I install the advanced dependencies via "pip install --upgrade --editable .[advanced]",the following situation has occurred. (base) C:\ProgramData\Anaconda2\Lib\site-packages\switch-2.0.2>pip install --upgrade --editable .[advanced] DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. Obtaining file:///C:/ProgramData/Anaconda2/Lib/site-packages/switch-2.0.2 Requirement already satisfied, skipping upgrade: Pyomo>=4.4.1 in c:\programdata\anaconda2\lib\site-packages (from switch-model==2.0.2) (5.6.5) Requirement already satisfied, skipping upgrade: testfixtures in c:\programdata\anaconda2\lib\site-packages (from switch-model==2.0.2) (6.9.0) Requirement already satisfied, skipping upgrade: pandas in c:\programdata\anaconda2\lib\site-packages (from switch-model==2.0.2) (0.24.2) Requirement already satisfied, skipping upgrade: numpy in c:\programdata\anaconda2\lib\site-packages (from switch-model==2.0.2) (1.16.2) Requirement already satisfied, skipping upgrade: scipy in c:\programdata\anaconda2\lib\site-packages (from switch-model==2.0.2) (1.2.1) Collecting rpy2 (from switch-model==2.0.2) Using cached https://files.pythonhosted.org/packages/8d/7c/826eb74dee57e54608346966ed931674b521cf098759647ed1a103ccfa79/rpy2-3.0.4.tar.gz https://files.pythonhosted.org/packages/8d/7c/826eb74dee57e54608346966ed931674b521cf098759647ed1a103ccfa79/rpy2-3.0.4.tar.gz Complete output from command python setup.py egg_info: rpy2 is no longer supporting Python < 3.Consider using an older rpy2 release when using an older Python release.


Command "python setup.py egg_info" failed with error code 1 in c:\users\kevin_xo\appdata\local\temp\pip-install-3etqdj\rpy2\

So what should I do? Thanks a lot!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/switch-model/switch/issues/111?email_source=notifications&email_token=AB4PSFQQS76CITWV75ASUELP2IEN5A5CNFSM4HXXNSGKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4GZIG6YQ, or mute the thread https://github.com/notifications/unsubscribe-auth/AB4PSFT7ZU2BCBJNGO626QTP2IEN5ANCNFSM4HXXNSGA.

KevinXo commented 5 years ago

Thank you sir.

josiahjohnston commented 5 years ago

FYI, our latest release (2.0.4) supports python 3. If you install switch with python 3, this should fully address your rpy issue.