From giuliamajerczyk at gmail.com Thu Mar 14 10:00:10 2024 From: giuliamajerczyk at gmail.com (Giulia) Date: Thu, 14 Mar 2024 15:00:10 +0100 Subject: [AstroPy] Moment maps, error Message-ID: <95113610-9C66-43D8-B907-436C69837B68@hxcore.ol> An HTML attachment was scrubbed... URL: From ejensen1 at swarthmore.edu Thu Mar 14 10:07:12 2024 From: ejensen1 at swarthmore.edu (Eric LN Jensen) Date: Thu, 14 Mar 2024 10:07:12 -0400 Subject: [AstroPy] Moment maps, error In-Reply-To: <95113610-9C66-43D8-B907-436C69837B68@hxcore.ol> References: <95113610-9C66-43D8-B907-436C69837B68@hxcore.ol> Message-ID: <003588CA-853A-42D2-9C16-2EF586E3C900@swarthmore.edu> Hi Giulia, Can you post some code that shows what you are trying to do when you get that error? We need more context here to see what you?re importing and what function(s) you?re trying to call. Eric > On Mar 14, 2024, at 10:00 AM, Giulia wrote: > > I have difficulty with moment maps because the code gives me the following error: > " ModuleNotFoundError: No module named 'astropy.coordinates.angle_utilities' ". > How can I solve it? > > Cheers, > Giulia > -------------- next part -------------- An HTML attachment was scrubbed... URL: From teuben at umd.edu Thu Mar 14 10:15:10 2024 From: teuben at umd.edu (peter teuben) Date: Thu, 14 Mar 2024 10:15:10 -0400 Subject: [AstroPy] Moment maps, error In-Reply-To: <003588CA-853A-42D2-9C16-2EF586E3C900@swarthmore.edu> References: <95113610-9C66-43D8-B907-436C69837B68@hxcore.ol> <003588CA-853A-42D2-9C16-2EF586E3C900@swarthmore.edu> Message-ID: <9105a509-5149-bc87-5175-8dc162207fd7@astro.umd.edu> Giulia : you could try? "import astropy" and see if that fails as well. I am teaching a python class, with a mix of Mac and Win (and one Linux) laptops, and they all installed python via anaconda3. When I let them use astropy, more than half had this problem. I was baffled as I was under the impression that anaconda3 would always come with astropy, independent of the architecture. I'll cherry pick a few cases to see why it's not there, it's quite possible that they accidentally had another python version on their laptop and executing that version. I must say this is one of those cases where a full GUI environment still drives me nuts. ?- peter On 3/14/24 10:07, Eric LN Jensen wrote: > Hi Giulia, > > Can you post some code that shows what you are trying to do when you > get that error? ?We need more context here to see what you?re > importing and what function(s) you?re trying to call. > > Eric > >> On Mar 14, 2024, at 10:00 AM, Giulia wrote: >> >> I have difficulty with moment maps because?the code gives me the >> following error: >> "?ModuleNotFoundError: No module named >> 'astropy.coordinates.angle_utilities' ". >> How can I solve it? >> >> Cheers, >> Giulia > > _______________________________________________ > AstroPy mailing list > AstroPy at python.org > https://mail.python.org/mailman/listinfo/astropy -------------- next part -------------- An HTML attachment was scrubbed... URL: From giuliamajerczyk at gmail.com Thu Mar 14 10:36:30 2024 From: giuliamajerczyk at gmail.com (Giulia Majerczyk) Date: Thu, 14 Mar 2024 15:36:30 +0100 Subject: [AstroPy] Moment maps, error In-Reply-To: <9105a509-5149-bc87-5175-8dc162207fd7@astro.umd.edu> References: <95113610-9C66-43D8-B907-436C69837B68@hxcore.ol> <003588CA-853A-42D2-9C16-2EF586E3C900@swarthmore.edu> <9105a509-5149-bc87-5175-8dc162207fd7@astro.umd.edu> Message-ID: Yes, it fails as well. I, too, installed python via anaconda 3. I think it depends on the astropy version but I don't know how to find a solution. Giulia Il Gio 14 Mar 2024, 15:16 peter teuben ha scritto: > > Giulia : you could try "import astropy" and see if that fails as well. > > I am teaching a python class, with a mix of Mac and Win (and one Linux) > laptops, and they all installed python via anaconda3. When I let them use > astropy, more than half had this problem. I was baffled as I was under the > impression that anaconda3 would always come with astropy, independent of > the architecture. > > I'll cherry pick a few cases to see why it's not there, it's quite > possible that they accidentally had another python version on their laptop > and executing that version. I must say this is one of those cases where a > full GUI environment still drives me nuts. > > - peter > On 3/14/24 10:07, Eric LN Jensen wrote: > > Hi Giulia, > > Can you post some code that shows what you are trying to do when you get > that error? We need more context here to see what you?re importing and > what function(s) you?re trying to call. > > Eric > > On Mar 14, 2024, at 10:00 AM, Giulia > wrote: > > I have difficulty with moment maps because the code gives me the following > error: > " ModuleNotFoundError: No module named > 'astropy.coordinates.angle_utilities' ". > How can I solve it? > > Cheers, > Giulia > > > > _______________________________________________ > AstroPy mailing listAstroPy at python.orghttps://mail.python.org/mailman/listinfo/astropy > > _______________________________________________ > AstroPy mailing list > AstroPy at python.org > https://mail.python.org/mailman/listinfo/astropy > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pdzwig at summaventures.com Thu Mar 14 13:15:25 2024 From: pdzwig at summaventures.com (Peter Dzwig) Date: Thu, 14 Mar 2024 17:15:25 +0000 Subject: [AstroPy] Moment maps, error In-Reply-To: References: <95113610-9C66-43D8-B907-436C69837B68@hxcore.ol> <003588CA-853A-42D2-9C16-2EF586E3C900@swarthmore.edu> <9105a509-5149-bc87-5175-8dc162207fd7@astro.umd.edu> Message-ID: <4fc10766-875d-4158-9f5b-a944dedb164c@summaventures.com> have you tried via pip? See: https://docs.astropy.org/en/stable/install.html Peter On 14/03/2024 14:36, Giulia Majerczyk wrote: > Yes, it fails as well. > I, too, installed python via anaconda 3. > I think it depends on the astropy version but I don't know how to find a > solution. > > Giulia > > Il Gio 14 Mar 2024, 15:16 peter teuben > ha scritto: > > > Giulia : you could try? "import astropy" and see if that fails as well. > > I am teaching a python class, with a mix of Mac and Win (and one > Linux) laptops, and they all installed python via anaconda3. When I > let them use astropy, more than half had this problem. I was baffled > as I was under the impression that anaconda3 would always come with > astropy, independent of the architecture. > > I'll cherry pick a few cases to see why it's not there, it's quite > possible that they accidentally had another python version on their > laptop and executing that version. I must say this is one of those > cases where a full GUI environment still drives me nuts. > > ?- peter > > On 3/14/24 10:07, Eric LN Jensen wrote: >> Hi Giulia, >> >> Can you post some code that shows what you are trying to do when >> you get that error?? We need more context here to see what you?re >> importing and what function(s) you?re trying to call. >> >> Eric >> >>> On Mar 14, 2024, at 10:00 AM, Giulia >>> wrote: >>> >>> I have difficulty with moment maps because?the code gives me the >>> following error: >>> "?ModuleNotFoundError: No module named >>> 'astropy.coordinates.angle_utilities' ".____ >>> How can I solve it? >>> >>> Cheers, >>> Giulia____ >>> __ __ >> >> _______________________________________________ >> AstroPy mailing list >> AstroPy at python.org >> https://mail.python.org/mailman/listinfo/astropy > _______________________________________________ > AstroPy mailing list > AstroPy at python.org > https://mail.python.org/mailman/listinfo/astropy > > > > _______________________________________________ > AstroPy mailing list > AstroPy at python.org > https://mail.python.org/mailman/listinfo/astropy -- Dr. Peter Dzwig From rugved.pund at stonybrook.edu Thu Mar 14 13:44:01 2024 From: rugved.pund at stonybrook.edu (Rugved Pund) Date: Thu, 14 Mar 2024 13:44:01 -0400 Subject: [AstroPy] Moment maps, error In-Reply-To: References: <95113610-9C66-43D8-B907-436C69837B68@hxcore.ol> <003588CA-853A-42D2-9C16-2EF586E3C900@swarthmore.edu> <9105a509-5149-bc87-5175-8dc162207fd7@astro.umd.edu> Message-ID: Hi Giulia, Chiming in to recommend the python debugger pdb [official docs , neat tutorial ] if you have access to the shell when you run the code. You can either add a line "breakpoint()" above the function call, or simply run the code with an additional "python -m pdb code.py" you should have access to post-mortem debugging when the code fails. Pdb would allow you to check the sys paths being searched for the module, module versions and environments, step into and out of function calls, run code line by line from breakpoint, etc. Happy to assist further if needed. Rugved On Thu, Mar 14, 2024 at 10:37?AM Giulia Majerczyk wrote: > Yes, it fails as well. > I, too, installed python via anaconda 3. > I think it depends on the astropy version but I don't know how to find a > solution. > > Giulia > > Il Gio 14 Mar 2024, 15:16 peter teuben ha scritto: > >> >> Giulia : you could try "import astropy" and see if that fails as well. >> >> I am teaching a python class, with a mix of Mac and Win (and one Linux) >> laptops, and they all installed python via anaconda3. When I let them use >> astropy, more than half had this problem. I was baffled as I was under the >> impression that anaconda3 would always come with astropy, independent of >> the architecture. >> >> I'll cherry pick a few cases to see why it's not there, it's quite >> possible that they accidentally had another python version on their laptop >> and executing that version. I must say this is one of those cases where a >> full GUI environment still drives me nuts. >> >> - peter >> On 3/14/24 10:07, Eric LN Jensen wrote: >> >> Hi Giulia, >> >> Can you post some code that shows what you are trying to do when you get >> that error? We need more context here to see what you?re importing and >> what function(s) you?re trying to call. >> >> Eric >> >> On Mar 14, 2024, at 10:00 AM, Giulia >> wrote: >> >> I have difficulty with moment maps because the code gives me the >> following error: >> " ModuleNotFoundError: No module named >> 'astropy.coordinates.angle_utilities' ". >> How can I solve it? >> >> Cheers, >> Giulia >> >> >> >> _______________________________________________ >> AstroPy mailing listAstroPy at python.orghttps://mail.python.org/mailman/listinfo/astropy >> >> _______________________________________________ >> AstroPy mailing list >> AstroPy at python.org >> https://mail.python.org/mailman/listinfo/astropy >> > _______________________________________________ > AstroPy mailing list > AstroPy at python.org > https://mail.python.org/mailman/listinfo/astropy > -- Rugved Pund PhD Candidate Cosmology Group | Brookhaven National Lab Physics Department | Stony Brook University -------------- next part -------------- An HTML attachment was scrubbed... URL: