{"action":"created","issue":{"url":"https://api.github.com/repos/QuantEcon/QuantEcon.py/issues/123","labels_url":"https://api.github.com/repos/QuantEcon/QuantEcon.py/issues/123/labels{/name}","comments_url":"https://api.github.com/repos/QuantEcon/QuantEcon.py/issues/123/comments","events_url":"https://api.github.com/repos/QuantEcon/QuantEcon.py/issues/123/events","html_url":"https://github.com/QuantEcon/QuantEcon.py/issues/123","id":57568746,"number":123,"title":"quantecon.models.__init__.py problem","user":{"login":"davidrpugh","id":2219562,"avatar_url":"https://avatars.githubusercontent.com/u/2219562?v=3","gravatar_id":"","url":"https://api.github.com/users/davidrpugh","html_url":"https://github.com/davidrpugh","followers_url":"https://api.github.com/users/davidrpugh/followers","following_url":"https://api.github.com/users/davidrpugh/following{/other_user}","gists_url":"https://api.github.com/users/davidrpugh/gists{/gist_id}","starred_url":"https://api.github.com/users/davidrpugh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidrpugh/subscriptions","organizations_url":"https://api.github.com/users/davidrpugh/orgs","repos_url":"https://api.github.com/users/davidrpugh/repos","events_url":"https://api.github.com/users/davidrpugh/events{/privacy}","received_events_url":"https://api.github.com/users/davidrpugh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-02-13T07:38:29Z","updated_at":"2015-02-13T14:46:45Z","closed_at":null,"body":"@jstac \r\n\r\nI report your initial error for reference...\r\n```python\r\n\r\nIn [1]: import quantecon\r\n---------------------------------------------------------------------------\r\nImportError                               Traceback (most recent call last)\r\n<ipython-input-1-ca57accf01d0> in <module>()\r\n----> 1 import quantecon\r\n\r\n/home/john/anaconda/lib/python2.7/site-packages/quantecon/__init__.py\r\nin <module>()\r\n      3 \"\"\"\r\n      4\r\n----> 5 from . import models as models\r\n      6 from .compute_fp import compute_fixed_point\r\n      7 from .cartesian import cartesian, mlinspace\r\n\r\n/home/john/anaconda/lib/python2.7/site-packages/quantecon/models/__init__.py\r\nin <module>()\r\n     10            \"solow\"]\r\n     11\r\n---> 12 from . import solow as solow\r\n     13 from .asset_pricing import AssetPrices\r\n     14 from .career import CareerWorkerProblem\r\n\r\nImportError: cannot import name solow\r\n```\r\n\r\nNow here is what I have done to try and replicate your error message. I created a completely new `conda` environment using...\r\n```\r\n$ conda create -n quantecon-test anaconda\r\n$ source activate quantecon-test\r\n```\r\n...then changed into my local clone of `quant-econ` and run...\r\n```\r\npip install -e .\r\n```\r\n... which installs `quantecon` from my local repo in editable mode (i.e., for dev work).  \r\n\r\nNow I check the contents of the offending `__init__.py` script...\r\n```python\r\n\"\"\"\r\nmodels directory imports\r\n\r\nobjects imported here will live in the `quantecon.models` namespace\r\n\r\n\"\"\"\r\n\r\n__all__ = [\"AssetPrices\", \"CareerWorkerProblem\", \"ConsumerProblem\",\r\n           \"JvWorker\", \"LucasTree\", \"SearchProblem\", \"GrowthModel\",\r\n           \"solow\"]\r\n\r\nfrom . import solow as solow\r\nfrom .asset_pricing import AssetPrices\r\nfrom .career import CareerWorkerProblem\r\nfrom .ifp import ConsumerProblem\r\nfrom .jv import JvWorker\r\nfrom .lucastree import LucasTree\r\nfrom .odu import SearchProblem\r\nfrom .optgrowth import GrowthModel\r\n```  \r\n\r\nI then change back to my root, head into `ipython` and am able to import `quantecon` and access the `solow` module without issue...\r\n```\r\n(quantecon-test)Davids-MacBook-Pro:~ drpugh$ ipython\r\nPython 2.7.8 |Anaconda 2.1.0 (x86_64)| (default, Aug 21 2014, 15:21:46) \r\nType \"copyright\", \"credits\" or \"license\" for more information.\r\n\r\nIPython 2.2.0 -- An enhanced Interactive Python.\r\nAnaconda is brought to you by Continuum Analytics.\r\nPlease check out: http://continuum.io/thanks and https://binstar.org\r\n?         -> Introduction and overview of IPython's features.\r\n%quickref -> Quick reference.\r\nhelp      -> Python's own help system.\r\nobject?   -> Details about 'object', use 'object??' for extra details.\r\n\r\nIn [1]: import quantecon as qe\r\n\r\nIn [2]: from quantecon.models import solow\r\n\r\nIn [3]: solow.\r\nsolow.CESModel          solow.ces               solow.model\r\nsolow.CobbDouglasModel  solow.cobb_douglas      \r\nsolow.Model             solow.impulse_response  \r\n\r\nIn [3]: solow.\r\n```\r\n...I can't replicate your issue on my machine.  I did get your email saying that @cc7768 had been able to replicate the issue.  I am a bit bamboozled..."},"comment":{"url":"https://api.github.com/repos/QuantEcon/QuantEcon.py/issues/comments/74263893","html_url":"https://github.com/QuantEcon/QuantEcon.py/issues/123#issuecomment-74263893","issue_url":"https://api.github.com/repos/QuantEcon/QuantEcon.py/issues/123","id":74263893,"user":{"login":"davidrpugh","id":2219562,"avatar_url":"https://avatars.githubusercontent.com/u/2219562?v=3","gravatar_id":"","url":"https://api.github.com/users/davidrpugh","html_url":"https://github.com/davidrpugh","followers_url":"https://api.github.com/users/davidrpugh/followers","following_url":"https://api.github.com/users/davidrpugh/following{/other_user}","gists_url":"https://api.github.com/users/davidrpugh/gists{/gist_id}","starred_url":"https://api.github.com/users/davidrpugh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidrpugh/subscriptions","organizations_url":"https://api.github.com/users/davidrpugh/orgs","repos_url":"https://api.github.com/users/davidrpugh/repos","events_url":"https://api.github.com/users/davidrpugh/events{/privacy}","received_events_url":"https://api.github.com/users/davidrpugh/received_events","type":"User","site_admin":false},"created_at":"2015-02-13T14:46:45Z","updated_at":"2015-02-13T14:46:45Z","body":"Phew.  Serious self-doubt was starting to creep in for a bit! Just to be sure I did another fresh conda environment where I built `quantecon` using a brand new clone (i.e., not my \"normal\" local repo). \r\n\r\nI then changed the `quantecon.models.__init__.py` file to read:\r\n```python\r\n\"\"\"\r\nmodels directory imports\r\n\r\nobjects imported here will live in the `quantecon.models` namespace\r\n\r\n\"\"\"\r\n\r\n__all__ = [\"AssetPrices\", \"CareerWorkerProblem\", \"ConsumerProblem\",\r\n           \"JvWorker\", \"LucasTree\", \"SearchProblem\", \"GrowthModel\",\r\n           \"solow\"]\r\n\r\nfrom . import solow\r\nfrom .asset_pricing import AssetPrices\r\nfrom .career import CareerWorkerProblem\r\nfrom .ifp import ConsumerProblem\r\nfrom .jv import JvWorker\r\nfrom .lucastree import LucasTree\r\nfrom .odu import SearchProblem\r\nfrom .optgrowth import GrowthModel\r\n```\r\nand everything worked fine:\r\n```python\r\n(quantecon-test)Davids-MacBook-Pro:~ drpugh$ cd Downloads/QuantEcon.py/quantecon/models/\r\n(quantecon-test)Davids-MacBook-Pro:models drpugh$ nano __init__.py\r\n(quantecon-test)Davids-MacBook-Pro:models drpugh$ cd\r\n(quantecon-test)Davids-MacBook-Pro:~ drpugh$ ipython\r\nPython 2.7.8 |Anaconda 2.1.0 (x86_64)| (default, Aug 21 2014, 15:21:46) \r\nType \"copyright\", \"credits\" or \"license\" for more information.\r\n\r\nIPython 2.2.0 -- An enhanced Interactive Python.\r\nAnaconda is brought to you by Continuum Analytics.\r\nPlease check out: http://continuum.io/thanks and https://binstar.org\r\n?         -> Introduction and overview of IPython's features.\r\n%quickref -> Quick reference.\r\nhelp      -> Python's own help system.\r\nobject?   -> Details about 'object', use 'object??' for extra details.\r\n\r\nIn [1]: import quantecon as qe\r\n\r\nIn [2]: qe.models.\r\nqe.models.AssetPrices          qe.models.career\r\nqe.models.CareerWorkerProblem  qe.models.ifp\r\nqe.models.ConsumerProblem      qe.models.jv\r\nqe.models.GrowthModel          qe.models.lucastree\r\nqe.models.JvWorker             qe.models.odu\r\nqe.models.LucasTree            qe.models.optgrowth\r\nqe.models.SearchProblem        qe.models.solow\r\nqe.models.asset_pricing        \r\n\r\nIn [2]: qe.models.solow.\r\nqe.models.solow.CESModel          qe.models.solow.cobb_douglas\r\nqe.models.solow.CobbDouglasModel  qe.models.solow.impulse_response\r\nqe.models.solow.Model             qe.models.solow.model\r\nqe.models.solow.ces               \r\n\r\nIn [2]: qe.models.solow.\r\n```\r\n\r\nPerhaps @jstac an/or @cc7768 could create a fresh conda environment and see if that fixed the problem for them as well."}}