[yt-users] Import error 'module' object has no attribute 'extern'

Ben Thompson bthompson2090 at gmail.com
Sun Nov 16 14:48:29 PST 2014


Hi Sam.

Just to add.. I have quickly rebuilt YT on my laptop... following Nathans
instructions myself, my newly remade YT build imports fine. Sounds like it
might be a build issue (uninstalling YT and rebuilding it from scratch)
should do the trick (and yes, you may need sudo access for the python
setup.py develop since python wants to (by default) build these packages
within /usr/lib/python2.7/dist-packages ).

Ben.

On Sun, Nov 16, 2014 at 7:35 PM, Sam Geen <samgeen at astro.ox.ac.uk> wrote:

>  Thanks, will try that out! And yeah, I'm using the default python install
> directory on my laptop, hence the sudo (I should start using virtualenv,
> etc, I guess) Sam
>
>
> On 16/11/14 20:33, Nathan Goldbaum wrote:
>
>     Hey Sam,
>
> I'm unable to reproduce this over here using "setup.py install" from
> 7d39049.  It's a little suspicious that you needed to use sudo to install
> things, but that might also be a red herring depending on how your python
> environment is set up.
>
>  FWIW, here's the sequence of commands I would use:
>
>  hg clone https://bitbucket.org/yt_analysis/yt
>  cd yt
>  hg pull -r 7d39049 https://bitbucket.org/cosmosquark/yt
>  hg up 7d39049
>  python setup.py develop
>
>  Depending on how you've set up your python installation, that last
> command might need a "sudo" so it can put the egg-info file for the
> installation into your path.
>
>  It might also be a good idea to clean out any old yt installations your
> have by repeatedly doing "pip uninstall yt".
>
> Python packaging, fun!
>
>  -Nathan
>
>
> On Sun, Nov 16, 2014 at 11:16 AM Sam Geen <samgeen at astro.ox.ac.uk> wrote:
>
>>  Hi Nathan,
>>
>> I ran hg clone -r  7d39049 https://bitbucket.org/cosmosquark/yt
>> then inside the yt folder
>> sudo python setup.py install
>>
>> I'll try your suggestion of cloning the main repo first instead.
>>
>> Cheers,
>>
>> Sam
>>
>>
>> On 16/11/14 20:14, Nathan Goldbaum wrote:
>>
>> Hi Sam,
>>
>> Can you give a little bit more detail about how exactly you ran the setup
>> script?
>>
>> The easiest way to do this is to clone the yt mercurial repository, pull
>> Ben's changes into your local copy, then do "python setup.py develop" in
>> the root of the repository.
>>
>> More detail here under "installing using pip or from source":
>>
>> http://yt-project.org/doc/installing.html
>>
>>   On Sun, Nov 16, 2014 at 7:23 AM Sam Geen <samgeen at googlemail.com>
>> wrote:
>>
>>   Hi,
>>>
>>> I'm trying to test a pull request, and when I try to run yt after
>>> installing the setup script, it gives me this error (below). The folder
>>> "extern" is in the dist-packages folder. The version I'm testing is
>>>
>>> https://bitbucket.org/cosmosquark/yt/commits/7d390496848a01fa113d24d1af249fac14c759a7
>>>
>>> Any ideas?
>>>
>>> Thanks,
>>>
>>> Sam
>>>
>>> In [2]: import yt
>>>
>>> ---------------------------------------------------------------------------
>>> AttributeError                            Traceback (most recent call
>>> last)
>>> <ipython-input-2-59dfcfe9846c> in <module>()
>>> ----> 1 import yt
>>>
>>>
>>> /usr/local/lib/python2.7/dist-packages/yt-3.1dev-py2.7-linux-x86_64.egg/yt/__init__.py
>>> in <module>()
>>>       79 import numpy # In case anyone wishes to use it by name
>>>       80
>>> ---> 81 from yt.funcs import \
>>>       82     iterable, \
>>>       83     get_memory_usage, \
>>>
>>>
>>> /usr/local/lib/python2.7/dist-packages/yt-3.1dev-py2.7-linux-x86_64.egg/yt/funcs.py
>>>
>>     in <module>()hg clone -r  7d39049
>>> https://bitbucket.org/cosmosquark/yt
>>
>>
>>>
>>>       25 from yt.utilities.exceptions import *
>>>       26 from yt.utilities.logger import ytLogger as mylog
>>> ---> 27 import yt.extern.progressbar as pb
>>>       28 import yt.utilities.rpdb as rpdb
>>>       29 from yt.units.yt_array import YTArray, YTQuantity
>>>
>>> AttributeError: 'module' object has no attribute 'extern'
>>> _______________________________________________
>>> yt-users mailing list
>>> yt-users at lists.spacepope.org
>>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>>>
>>
>>
>> _______________________________________________
>> yt-users mailing listyt-users at lists.spacepope.orghttp://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>>
>>  _______________________________________________
>> yt-users mailing list
>> yt-users at lists.spacepope.org
>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>>
>
>
> _______________________________________________
> yt-users mailing listyt-users at lists.spacepope.orghttp://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>
>
>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20141116/4e2ef1a9/attachment.html>


More information about the yt-users mailing list