econ-ark / HARK

Heterogenous Agents Resources & toolKit
Apache License 2.0
315 stars 195 forks source link

Re-write the installation guide #1350

Closed AA-Turner closed 1 month ago

AA-Turner commented 8 months ago

This PR re-writes the installation guide for new users:

A

cc: @MridulS, @DominicWC

MridulS commented 8 months ago

Reccomend always using a venv, as best practice

Just a personal preference, but for econ-ark we should really be recommending conda/mamba. Especially because it also takes care of python installations, no one should be fighting around with setting PATH. We also have in the past run into cases where there were no pypi wheels available for one of our dependencies, and conda-forge did have a proper built package.

llorracc commented 8 months ago

Yes, conda environments are what I've been doing and it will take a lot to convince me to switch to yet another package manager ...

On Fri, Sep 22, 2023 at 11:34 AM Mridul Seth @.***> wrote:

Reccomend always using a venv, as best practice

Just a personal preference, but for econ-ark we should really be recommending conda/mamba. Especially because it also takes care of python installations, no one should be fighting around with setting PATH. We also have in the past run into cases where there were no pypi wheels available for one of our dependencies, and conda-forge did have a proper built package.

— Reply to this email directly, view it on GitHub https://github.com/econ-ark/HARK/pull/1350#issuecomment-1731624293, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKCK7YETXGAOCHYA4EHRR3X3WVYFANCNFSM6AAAAAA47GRFYY . You are receiving this because you are subscribed to this thread.Message ID: @.***>

--

AA-Turner commented 8 months ago

recommending conda/mamba

Brill, I'll rewrite. Do you want to keep the reccomendation of the Anaconda Distribution, or just prefer conda-forge instead?

a

sidd3888 commented 7 months ago

@MridulS on the point of using conda-forge vs pip, I was just testing two instances of the HARK package: one in a conda env and another in a PyPI virtualenv. The first instance was installed using conda-forge and the second using pip, and I noticed some inconsistencies between the two. For instance, the function CRRAutility() is available in the HARK.utilities module in the conda-forge installation. However, it has been moved to the HARK.rewards module in the pip version. Per the current API reference documentation, the function should be in HARK.rewards.

The two screenshots below show what I am referring to:

Anaconda

Screenshot 2023-10-07 163048

pip

Screenshot 2023-10-07 164200

Since the function CRRAutility() is among the first ones used in the ARKitecture documentation, it may hinder the process of becoming familiar with HARK for new users, say like me.

EDIT: I realized that the problem is an incompatibility with Python 3.11, which does not allow the installation of the latest version of HARK using conda-forge. Then, the older versions of HARK try to import time.clock(), which the new Python does not have. This might be an issue to look into, though you can ignore the previous bits.

llorracc commented 7 months ago

Yes, we've had a longstanding problem with the conda installer. Something to do with python 3.9 vs 3.10. Mridul, is this fixable now?

On Sat, Oct 7, 2023 at 7:15 AM sidd3888 @.***> wrote:

@MridulS https://github.com/MridulS on the point of using conda-forge vs pip, I was just testing two instances of the HARK package: one in a conda env and another in a PyPI virtualenv. The first instance was installed using conda-forge and the second using pip, and I noticed some inconsistencies between the two. For instance, the function CRRAutility() is available in the HARK.utilities module in the conda-forge installation. However, it has been moved to the HARK.rewards module in the pip version. Per the current API reference documentation https://docs.econ-ark.org/reference/tools/rewards.html, the function should be in HARK.rewards.

The two screenshots below show what I am referring to:

Anaconda

[image: Screenshot 2023-10-07 163048] https://user-images.githubusercontent.com/72447516/273382173-fd2f059e-f5d1-4e9a-98fd-e19f02523f47.png

pip

[image: Screenshot 2023-10-07 164200] https://user-images.githubusercontent.com/72447516/273382477-14fbd6ba-3768-4535-8e3a-7462443077d0.png

Since the function CRRAutility() is among the first ones used in the ARKitecture documentation, it may hinder the process of becoming familiar with HARK for new users, say like me.

— Reply to this email directly, view it on GitHub https://github.com/econ-ark/HARK/pull/1350#issuecomment-1751684995, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKCK74BNEXVOKPQMOVAQP3X6E2WXAVCNFSM6AAAAAA47GRFY2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJRGY4DIOJZGU . You are receiving this because you commented.Message ID: @.***>

--

sidd3888 commented 2 months ago

Having looked at the installation guide and the quick-start guide, both in their current forms seem to be nearly identical. The only case in which it makes sense to retain the two is if we change the installation guide to contain instructions to install econ-ark via both pip and conda-forge. Else, we might as well remove one.

@AA-Turner @alanlujan91 thoughts?

llorracc commented 1 month ago

Sid,

I see you've closed this. Your point seems a good one. Did it get incorporated or have you just given up?

sidd3888 commented 1 month ago

I still stand by the idea that we should remove the installation guide. The contents were the same as the quick start guide.