Error on installation of yt on system python

Dear yt users, I usually install yt on system python, following the procedure suggested me in this mailing list some months ago. In general everything goes fine with the installation and I can normally use yt. Now I installed Ubuntu from scratch in my computer (where previously yt was installed and running!) and the installation seems to fine, but when I insert the command "from yt.mods import * ", I get the following error: *--------------------------------------------------------------------------- * *ImportError Traceback (most recent call last) * * * */usr/local/lib/python2.7/dist-packages/yt/<ipython console> in <module>()* * * */usr/local/lib/python2.7/dist-packages/yt/yt/mods.py in <module>()* * 56 np.seterr(all = 'ignore')* * 57 * *---> 58 from yt.data_objects.api import \* * 59 BinnedProfile1D, BinnedProfile2D, BinnedProfile3D, \* * 60 data_object_registry, \* * * */usr/local/lib/python2.7/dist-packages/yt/yt/data_objects/api.py in <module>()* * 29 """* * 30 * *---> 31 from grid_patch import \* * 32 AMRGridPatch* * 33 * * * */usr/local/lib/python2.7/dist-packages/yt/yt/data_objects/grid_patch.py in <module>()* * 33 from yt.utilities.definitions import x_dict, y_dict* * 34 * *---> 35 from yt.data_objects.data_containers import YTFieldData* * 36 from yt.utilities.definitions import x_dict, y_dict* * 37 from .field_info_container import \* * * */usr/local/lib/python2.7/dist-packages/yt/yt/data_objects/data_containers.py in <module>()* * 41 from yt.config import ytcfg* * 42 * *---> 43 from yt.data_objects.derived_quantities import GridChildMaskWrapper * * 44 from yt.data_objects.particle_io import particle_handler_registry* * 45 from yt.utilities.lib import find_grids_in_inclined_box, \* * * */usr/local/lib/python2.7/dist-packages/yt/yt/data_objects/derived_quantities.py in <module>()* * 33 from yt.data_objects.field_info_container import \* * 34 FieldDetector* *---> 35 from yt.utilities.data_point_utilities import FindBindingEnergy* * 36 from yt.utilities.parallel_tools.parallel_analysis_interface import \* * 37 ParallelAnalysisInterface* * * *ImportError: No module named data_point_utilities* * * I would like to ask if someone has an idea of how can I solve this problem. Thanks, Roberto

Hi Trobolo, data_point_utilities is a c extension that gets auto generated from a cython file and then compiled into a shared library when you run the yt setup script: $ cd $YT_HG $ python setup.py install Here $YT_HG is the directory containing the yt source code repository you cloned from bitbucket. Please let us know if you continue to have difficulties installing yt after running the setup script. Cheers, Nathan On Feb 13, 2013, at 10:49 PM, trobolo dinni <trobolo.trobolo.dinni5@gmail.com> wrote:

Hi Nathan, sorry for the delay in replying. To install yt on the system python I followed the procedure you mentioned: entered the yt directory cloned from bitbucket, run "python setup.py install". I did that again to check another time but the error persists. As I said I just reinstalled the same Ubuntu version on the same computer where before yt was usually installed by following the procedure above and it was normally running. Could reinstall cython help to solve the problem? Thanks, Roberto On 14 February 2013 17:57, Nathan Goldbaum <nathan12343@gmail.com> wrote:

Hi Mark, On Sun, Feb 17, 2013 at 11:07 AM, Mark Kremenetsky <mdk@sgi.com> wrote:
I haven't, personally. However, I do know that several people are actively using Enzo on Stampede, even if not yet on the MIC components. I would suggest bringing this question to the enzo-dev mailing list: https://groups.google.com/forum/#!forum/enzo-dev People here may have an idea, and I'd also be happy to correspond with you about this off-list, but since you're working specifically with Enzo it might be a higher cross-section of interested parties on enzo-dev. The HDF-forum might also have a few interested people: http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org who can provide some insight. Best wishes, -Matt

Hi Roberto, Sorry my advice didn't help. It's possible that reinstalling Cython will fix the issue, although if you already have Cython 0.17.1 installed it's probably fine as is. One possible way around this would be to install yt using the install script. We've recently added the option to have the install script build isolated LAPACK and BLAS installations which scipy can link against. The option is turned on by setting INST_SCIPY=1 in the install script. Again, sorry I can't be of more assistance, I'm not sure what's going wrong in your case. -Nathan On Sun, Feb 17, 2013 at 3:58 PM, trobolo dinni < trobolo.trobolo.dinni5@gmail.com> wrote:

You might also check out the Ubuntu PPAs that Mike Kuhlen set up. The PPA method is described at the bottom of the 'Get yt' section of the yt website: http://yt-project.org/#getyt I've never used Mike's PPA myself, though, so I can't speak to the state of it at the moment. On Mon, Feb 18, 2013 at 12:49 PM, Nathan Goldbaum <nathan12343@gmail.com>wrote:

Hi Nathan, just to let you know, the PPA suggested in the website is not working. What I get after sudo add-apt-repository ppa:kuhlen and sudo apt-get update is sudo apt-get install yt Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package yt Looks like it cannot find the repository. Cheers, Roberto On 19 February 2013 09:27, trobolo dinni <trobolo.trobolo.dinni5@gmail.com>wrote:

On 02/18/2013 12:58 AM, trobolo dinni wrote:
Hi Roberto, could you run the following command in your $YT_HG directory: find . -name "data_point_utilities.*" and post the output? Also if you could try installing again but provide us with build.log.gz from: cd $YT_HG bash ./clean.sh python setup.py build | gzip --fast > build.log.gz What version of ubuntu are you using? Cheers, Kacper

Hi Roberto I'm the maintainer of that ubuntu PPA, sorry you're having trouble with it. I think maybe all you need to do is to run 'sudo add-apt-repository ppa:kuhlen/ppa'. Note the trailing '/ppa'. Can you give that a try? Otherwise, can you look under /etc/apt/sources.list.d/ and see if there's a file named 'kuhlen-ppa-precise.list'? If there is, what is its content? I've been a bit remiss in keeping these packages up-to-date, but spurned by your email I just re-packaged updates to the most recent versions (yt: 329d11eeff22, yt-devel: 09a0fd75818b). Should be available there some time tomorrow. Cheers, Mike On Tue, Feb 19, 2013 at 11:32 PM, Kacper Kowalik <xarthisius.kk@gmail.com>wrote:
-- ********************************************************************* * * * Dr. Michael Kuhlen Theoretical Astrophysics Center * * email: mqk@astro.berkeley.edu UC Berkeley * * cell phone: (831) 588-1468 B-116 Hearst Field Annex # 3411 * * skype username: mikekuhlen Berkeley, CA 94720 * * * *********************************************************************

OK, the updated Ubuntu packages are available. I just tried them out on my ubuntu 12.04.2 LTS and yt-devel works great. With the stable version (yt) I get an import error: In [1]: from yt.mods import * --------------------------------------------------------------------------- ImportError Traceback (most recent call last) <ipython-input-1-c31905f7fc2e> in <module>() ----> 1 from yt.mods import * /usr/lib/pymodules/python2.7/yt/mods.py in <module>() 97 GDFStaticOutput, GDFFieldInfo, add_gdf_field 98 ---> 99 from yt.frontends.athena.api import \ 100 AthenaStaticOutput, AthenaFieldInfo, add_athena_field 101 ImportError: No module named athena.api This is weird, because when I install that exact same changeset (329d11eeff22) from source (with python ./setup.py develop --prefix=$HOME/local) it works just fine. I'll have to investigate. But if you're ok with using the development package (yt-devel), then you should be good to go. Mike On Wed, Feb 20, 2013 at 2:02 AM, Michael Kuhlen <mqk@astro.berkeley.edu>wrote:
-- ********************************************************************* * * * Dr. Michael Kuhlen Theoretical Astrophysics Center * * email: mqk@astro.berkeley.edu UC Berkeley * * cell phone: (831) 588-1468 B-116 Hearst Field Annex # 3411 * * skype username: mikekuhlen Berkeley, CA 94720 * * * *********************************************************************

Yeah, I did figure out the problem. It's that the debian/ubuntu packaging program dpkg-source doesn't include newly created empty files into the diff that it uses to build the updated package: dpkg-source: warning: newly created empty file 'yt/frontends/_skeleton/misc.py' will not be represented in diff dpkg-source: warning: newly created empty file 'yt/frontends/_skeleton/definitions.py' will not be represented in diff dpkg-source: warning: newly created empty file 'yt/frontends/athena/misc.py' will not be represented in diff dpkg-source: warning: newly created empty file 'yt/frontends/athena/__init__.py' will not be represented in diff The last one is the culprit, because as a result the athena/__init__.py file doesn't make it into the package, and hence the import fails. Arrgh. For the life of me I couldn't figure out how to force dpkg-source to include those newly created empty files, and so in the end I opted for the slightly hackish fix of adding a comment ("### comment to allow inclusion in dpkg-source diff file.") to those files. Now the package works, and I've just uploaded it to my PPA. Should be available in a few hours, once it's built. Cheers, Mike On Wed, Feb 20, 2013 at 11:25 AM, Matthew Turk <matthewturk@gmail.com>wrote:
-- ********************************************************************* * * * Dr. Michael Kuhlen Theoretical Astrophysics Center * * email: mqk@astro.berkeley.edu UC Berkeley * * cell phone: (831) 588-1468 B-116 Hearst Field Annex # 3411 * * skype username: mikekuhlen Berkeley, CA 94720 * * * *********************************************************************

Hi all, sorry for the delay in replying and thanks for the help! :) @ Kacper If I run the command you suggested in the YT egg directory i get: *cthulhu@42828678:/usr/local/bin/yt-hg$ find . -name "data_point_utilities.*"* *./yt/utilities/data_point_utilities.c* *./build/lib.linux-x86_64-2.7/yt/utilities/data_point_utilities.so* *./build/temp.linux-x86_64-2.7/yt/utilities/data_point_utilities.o* Also, I attached the build log as "output.txt", I am using Ubuntu release 12.10. @Michael Okay by just doing 'sudo add-apt-repository ppa:kuhlen/ppa', then going into python and typing 'from yt.mods import *' seems to work fine. I still didn't test yt anyway, I will let you know if something goes wrong again! Thank you very much for the help again, Roberto On 21 February 2013 07:47, Michael Kuhlen <mqk@astro.berkeley.edu> wrote:

Just one last thing, since the command line is different from the one suggested in the website ( http://yt-project.org/doc/advanced/installing.html#manual-installation) maybe it could be useful to the users to update it. Thanks, Roberto On 25 February 2013 12:29, trobolo dinni <trobolo.trobolo.dinni5@gmail.com>wrote:

Hi Trobolo, data_point_utilities is a c extension that gets auto generated from a cython file and then compiled into a shared library when you run the yt setup script: $ cd $YT_HG $ python setup.py install Here $YT_HG is the directory containing the yt source code repository you cloned from bitbucket. Please let us know if you continue to have difficulties installing yt after running the setup script. Cheers, Nathan On Feb 13, 2013, at 10:49 PM, trobolo dinni <trobolo.trobolo.dinni5@gmail.com> wrote:

Hi Nathan, sorry for the delay in replying. To install yt on the system python I followed the procedure you mentioned: entered the yt directory cloned from bitbucket, run "python setup.py install". I did that again to check another time but the error persists. As I said I just reinstalled the same Ubuntu version on the same computer where before yt was usually installed by following the procedure above and it was normally running. Could reinstall cython help to solve the problem? Thanks, Roberto On 14 February 2013 17:57, Nathan Goldbaum <nathan12343@gmail.com> wrote:

Hi Mark, On Sun, Feb 17, 2013 at 11:07 AM, Mark Kremenetsky <mdk@sgi.com> wrote:
I haven't, personally. However, I do know that several people are actively using Enzo on Stampede, even if not yet on the MIC components. I would suggest bringing this question to the enzo-dev mailing list: https://groups.google.com/forum/#!forum/enzo-dev People here may have an idea, and I'd also be happy to correspond with you about this off-list, but since you're working specifically with Enzo it might be a higher cross-section of interested parties on enzo-dev. The HDF-forum might also have a few interested people: http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org who can provide some insight. Best wishes, -Matt

Hi Roberto, Sorry my advice didn't help. It's possible that reinstalling Cython will fix the issue, although if you already have Cython 0.17.1 installed it's probably fine as is. One possible way around this would be to install yt using the install script. We've recently added the option to have the install script build isolated LAPACK and BLAS installations which scipy can link against. The option is turned on by setting INST_SCIPY=1 in the install script. Again, sorry I can't be of more assistance, I'm not sure what's going wrong in your case. -Nathan On Sun, Feb 17, 2013 at 3:58 PM, trobolo dinni < trobolo.trobolo.dinni5@gmail.com> wrote:

You might also check out the Ubuntu PPAs that Mike Kuhlen set up. The PPA method is described at the bottom of the 'Get yt' section of the yt website: http://yt-project.org/#getyt I've never used Mike's PPA myself, though, so I can't speak to the state of it at the moment. On Mon, Feb 18, 2013 at 12:49 PM, Nathan Goldbaum <nathan12343@gmail.com>wrote:

Hi Nathan, just to let you know, the PPA suggested in the website is not working. What I get after sudo add-apt-repository ppa:kuhlen and sudo apt-get update is sudo apt-get install yt Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package yt Looks like it cannot find the repository. Cheers, Roberto On 19 February 2013 09:27, trobolo dinni <trobolo.trobolo.dinni5@gmail.com>wrote:

On 02/18/2013 12:58 AM, trobolo dinni wrote:
Hi Roberto, could you run the following command in your $YT_HG directory: find . -name "data_point_utilities.*" and post the output? Also if you could try installing again but provide us with build.log.gz from: cd $YT_HG bash ./clean.sh python setup.py build | gzip --fast > build.log.gz What version of ubuntu are you using? Cheers, Kacper

Hi Roberto I'm the maintainer of that ubuntu PPA, sorry you're having trouble with it. I think maybe all you need to do is to run 'sudo add-apt-repository ppa:kuhlen/ppa'. Note the trailing '/ppa'. Can you give that a try? Otherwise, can you look under /etc/apt/sources.list.d/ and see if there's a file named 'kuhlen-ppa-precise.list'? If there is, what is its content? I've been a bit remiss in keeping these packages up-to-date, but spurned by your email I just re-packaged updates to the most recent versions (yt: 329d11eeff22, yt-devel: 09a0fd75818b). Should be available there some time tomorrow. Cheers, Mike On Tue, Feb 19, 2013 at 11:32 PM, Kacper Kowalik <xarthisius.kk@gmail.com>wrote:
-- ********************************************************************* * * * Dr. Michael Kuhlen Theoretical Astrophysics Center * * email: mqk@astro.berkeley.edu UC Berkeley * * cell phone: (831) 588-1468 B-116 Hearst Field Annex # 3411 * * skype username: mikekuhlen Berkeley, CA 94720 * * * *********************************************************************

OK, the updated Ubuntu packages are available. I just tried them out on my ubuntu 12.04.2 LTS and yt-devel works great. With the stable version (yt) I get an import error: In [1]: from yt.mods import * --------------------------------------------------------------------------- ImportError Traceback (most recent call last) <ipython-input-1-c31905f7fc2e> in <module>() ----> 1 from yt.mods import * /usr/lib/pymodules/python2.7/yt/mods.py in <module>() 97 GDFStaticOutput, GDFFieldInfo, add_gdf_field 98 ---> 99 from yt.frontends.athena.api import \ 100 AthenaStaticOutput, AthenaFieldInfo, add_athena_field 101 ImportError: No module named athena.api This is weird, because when I install that exact same changeset (329d11eeff22) from source (with python ./setup.py develop --prefix=$HOME/local) it works just fine. I'll have to investigate. But if you're ok with using the development package (yt-devel), then you should be good to go. Mike On Wed, Feb 20, 2013 at 2:02 AM, Michael Kuhlen <mqk@astro.berkeley.edu>wrote:
-- ********************************************************************* * * * Dr. Michael Kuhlen Theoretical Astrophysics Center * * email: mqk@astro.berkeley.edu UC Berkeley * * cell phone: (831) 588-1468 B-116 Hearst Field Annex # 3411 * * skype username: mikekuhlen Berkeley, CA 94720 * * * *********************************************************************

Hey Mike, I just verified, and in stable we *do* add Athena as a subpackage, so I think this should be working. Any ideas as to what might be different between the install and the deb? -MAtt On Wed, Feb 20, 2013 at 2:23 PM, Michael Kuhlen <mqk@astro.berkeley.edu> wrote:

Yeah, I did figure out the problem. It's that the debian/ubuntu packaging program dpkg-source doesn't include newly created empty files into the diff that it uses to build the updated package: dpkg-source: warning: newly created empty file 'yt/frontends/_skeleton/misc.py' will not be represented in diff dpkg-source: warning: newly created empty file 'yt/frontends/_skeleton/definitions.py' will not be represented in diff dpkg-source: warning: newly created empty file 'yt/frontends/athena/misc.py' will not be represented in diff dpkg-source: warning: newly created empty file 'yt/frontends/athena/__init__.py' will not be represented in diff The last one is the culprit, because as a result the athena/__init__.py file doesn't make it into the package, and hence the import fails. Arrgh. For the life of me I couldn't figure out how to force dpkg-source to include those newly created empty files, and so in the end I opted for the slightly hackish fix of adding a comment ("### comment to allow inclusion in dpkg-source diff file.") to those files. Now the package works, and I've just uploaded it to my PPA. Should be available in a few hours, once it's built. Cheers, Mike On Wed, Feb 20, 2013 at 11:25 AM, Matthew Turk <matthewturk@gmail.com>wrote:
-- ********************************************************************* * * * Dr. Michael Kuhlen Theoretical Astrophysics Center * * email: mqk@astro.berkeley.edu UC Berkeley * * cell phone: (831) 588-1468 B-116 Hearst Field Annex # 3411 * * skype username: mikekuhlen Berkeley, CA 94720 * * * *********************************************************************

Hi all, sorry for the delay in replying and thanks for the help! :) @ Kacper If I run the command you suggested in the YT egg directory i get: *cthulhu@42828678:/usr/local/bin/yt-hg$ find . -name "data_point_utilities.*"* *./yt/utilities/data_point_utilities.c* *./build/lib.linux-x86_64-2.7/yt/utilities/data_point_utilities.so* *./build/temp.linux-x86_64-2.7/yt/utilities/data_point_utilities.o* Also, I attached the build log as "output.txt", I am using Ubuntu release 12.10. @Michael Okay by just doing 'sudo add-apt-repository ppa:kuhlen/ppa', then going into python and typing 'from yt.mods import *' seems to work fine. I still didn't test yt anyway, I will let you know if something goes wrong again! Thank you very much for the help again, Roberto On 21 February 2013 07:47, Michael Kuhlen <mqk@astro.berkeley.edu> wrote:

Just one last thing, since the command line is different from the one suggested in the website ( http://yt-project.org/doc/advanced/installing.html#manual-installation) maybe it could be useful to the users to update it. Thanks, Roberto On 25 February 2013 12:29, trobolo dinni <trobolo.trobolo.dinni5@gmail.com>wrote:
participants (6)
-
Kacper Kowalik
-
Mark Kremenetsky
-
Matthew Turk
-
Michael Kuhlen
-
Nathan Goldbaum
-
trobolo dinni