astropy.io.ascii

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

astropy.io.ascii

Patrick Dupre-4
Hello,

How can I install astropy.io.ascii
in fedora?

Thank.

===========================================================================
 Patrick DUPRÉ                                 | | email: [hidden email]
 Laboratoire de Physico-Chimie de l'Atmosphère | |
 Université du Littoral-Côte d'Opale           | |
 Tel.  (33)-(0)3 28 23 76 12                   | | Fax: 03 28 65 82 44
 189A, avenue Maurice Schumann                 | | 59140 Dunkerque, France
===========================================================================
_______________________________________________
users mailing list -- [hidden email]
To unsubscribe send an email to [hidden email]
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@...
Reply | Threaded
Open this post in threaded view
|

Re: astropy.io.ascii

John Pilkington-2
On 14/09/18 12:13, Patrick Dupre wrote:

> Hello,
>
> How can I install astropy.io.ascii
> in fedora?
>
> Thank.
>
> ===========================================================================
>   Patrick DUPRÉ                                 | | email: [hidden email]
>   Laboratoire de Physico-Chimie de l'Atmosphère | |
>   Université du Littoral-Côte d'Opale           | |
>   Tel.  (33)-(0)3 28 23 76 12                   | | Fax: 03 28 65 82 44
>   189A, avenue Maurice Schumann                 | | 59140 Dunkerque, France
> ===========================================================================
As usual, no background info. How about

https://dl.fedoraproject.org/pub/fedora/linux/releases/28/Everything/x86_64/os/Packages/p/python3-astropy-3.0.1-1.fc28.x86_64.rpm

http://docs.astropy.org/en/stable/install.html

John P





_______________________________________________
users mailing list -- [hidden email]
To unsubscribe send an email to [hidden email]
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@...
Reply | Threaded
Open this post in threaded view
|

Re: astropy.io.ascii

Patrick Dupre-4
Hello,

Thank for the feedback,
However, it is the first time that I install a python package.
I did
dnf install python3-astropy
(no problem) and then

import astropy
but I get
    import astropy
ImportError: No module named astropy

Do I also need to run
pip install astropy --no-deps
?

as mentioned in http://docs.astropy.org/en/stable/install.html


===========================================================================
 Patrick DUPRÉ                                 | | email: [hidden email]
 Laboratoire de Physico-Chimie de l'Atmosphère | |
 Université du Littoral-Côte d'Opale           | |
 Tel.  (33)-(0)3 28 23 76 12                   | | Fax: 03 28 65 82 44
 189A, avenue Maurice Schumann                 | | 59140 Dunkerque, France
===========================================================================


> Sent: Friday, September 14, 2018 at 2:39 PM
> From: "John Pilkington" <[hidden email]>
> To: [hidden email]
> Subject: Re: astropy.io.ascii
>
> On 14/09/18 12:13, Patrick Dupre wrote:
> > Hello,
> >
> > How can I install astropy.io.ascii
> > in fedora?
> >
> > Thank.
> >
> > ===========================================================================
> >   Patrick DUPRÉ                                 | | email: [hidden email]
> >   Laboratoire de Physico-Chimie de l'Atmosphère | |
> >   Université du Littoral-Côte d'Opale           | |
> >   Tel.  (33)-(0)3 28 23 76 12                   | | Fax: 03 28 65 82 44
> >   189A, avenue Maurice Schumann                 | | 59140 Dunkerque, France
> > ===========================================================================
> As usual, no background info. How about
>
> https://dl.fedoraproject.org/pub/fedora/linux/releases/28/Everything/x86_64/os/Packages/p/python3-astropy-3.0.1-1.fc28.x86_64.rpm
>
> http://docs.astropy.org/en/stable/install.html
>
> John P
>
>
>
>
>
> _______________________________________________
> users mailing list -- [hidden email]
> To unsubscribe send an email to [hidden email]
> Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
> List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
> List Archives: https://lists.fedoraproject.org/archives/list/users@...
>
_______________________________________________
users mailing list -- [hidden email]
To unsubscribe send an email to [hidden email]
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@...
Reply | Threaded
Open this post in threaded view
|

Re: astropy.io.ascii

stan-3
On Fri, 14 Sep 2018 15:21:48 +0200
"Patrick Dupre" <[hidden email]> wrote:

> I did
> dnf install python3-astropy
> (no problem) and then
>
> import astropy
> but I get
>     import astropy
> ImportError: No module named astropy

The default python up to f28 is python2.  If you want to start python3,
you have to specifically say python3.

When I start the python3 interpreter, and type import astropy, it loads
without issue.
 
> Do I also need to run
> pip install astropy --no-deps
> ?

No, the fedora package is all you need to install.  In fact, it is not
a good practice to mix pip and rpms for the same python package.  If
you use pip to install python modules, you should investigate the --user
option so they won't conflict with rpm.
 
> as mentioned in http://docs.astropy.org/en/stable/install.html
_______________________________________________
users mailing list -- [hidden email]
To unsubscribe send an email to [hidden email]
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@...
Reply | Threaded
Open this post in threaded view
|

Re: astropy.io.ascii

Patrick Dupre-4
Thank,

I am running fedora28.

But, by default it run python2
Also under geany, it run pyhton2

even if I put
#!/usr/bin/python3
in my file

if I run python3 mypy.py

Then it run pyhton3

However, I get an error:

  import matplotlib.pyplot as plt
ModuleNotFoundError: No module named 'matplotlib'

Do I need to install another matplotlib for python3?

===========================================================================
 Patrick DUPRÉ                                 | | email: [hidden email]
 Laboratoire de Physico-Chimie de l'Atmosphère | |
 Université du Littoral-Côte d'Opale           | |
 Tel.  (33)-(0)3 28 23 76 12                   | | Fax: 03 28 65 82 44
 189A, avenue Maurice Schumann                 | | 59140 Dunkerque, France
===========================================================================


> Sent: Friday, September 14, 2018 at 4:42 PM
> From: stan <[hidden email]>
> To: [hidden email]
> Subject: Re: astropy.io.ascii
>
> On Fri, 14 Sep 2018 15:21:48 +0200
> "Patrick Dupre" <[hidden email]> wrote:
>
> > I did
> > dnf install python3-astropy
> > (no problem) and then
> >
> > import astropy
> > but I get
> >     import astropy
> > ImportError: No module named astropy
>
> The default python up to f28 is python2.  If you want to start python3,
> you have to specifically say python3.
>
> When I start the python3 interpreter, and type import astropy, it loads
> without issue.
>  
> > Do I also need to run
> > pip install astropy --no-deps
> > ?
>
> No, the fedora package is all you need to install.  In fact, it is not
> a good practice to mix pip and rpms for the same python package.  If
> you use pip to install python modules, you should investigate the --user
> option so they won't conflict with rpm.
>  
> > as mentioned in http://docs.astropy.org/en/stable/install.html
> _______________________________________________
> users mailing list -- [hidden email]
> To unsubscribe send an email to [hidden email]
> Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
> List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
> List Archives: https://lists.fedoraproject.org/archives/list/users@...
>
_______________________________________________
users mailing list -- [hidden email]
To unsubscribe send an email to [hidden email]
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@...
Reply | Threaded
Open this post in threaded view
|

Re: astropy.io.ascii

John Pilkington-2
On 14/09/18 16:13, Patrick Dupre wrote:

> Thank,
>
> I am running fedora28.
>
> But, by default it run python2
> Also under geany, it run pyhton2
>
> even if I put
> #!/usr/bin/python3
> in my file
>
> if I run python3 mypy.py
>
> Then it run pyhton3
>
> However, I get an error:
>
>    import matplotlib.pyplot as plt
> ModuleNotFoundError: No module named 'matplotlib'
>
> Do I need to install another matplotlib for python3?

I don't know:  I haven't used any astropy packages, and suggested the
python3 version only because it seemed to tie in better with the
installation write-up.  There;s a python2 set of packages as well, in an
apparently earlier version, which may be easier to set up.  I'm stll
using f27...

https://dl.fedoraproject.org/pub/fedora/linux/releases/28/Everything/x86_64/os/Packages/p/python2-astropy-2.0.5-2.fc28.x86_64.rpm

>
> ===========================================================================
>   Patrick DUPRÉ                                 | | email: [hidden email]
>   Laboratoire de Physico-Chimie de l'Atmosphère | |
>   Université du Littoral-Côte d'Opale           | |
>   Tel.  (33)-(0)3 28 23 76 12                   | | Fax: 03 28 65 82 44
>   189A, avenue Maurice Schumann                 | | 59140 Dunkerque, France
> ===========================================================================
>
>
>> Sent: Friday, September 14, 2018 at 4:42 PM
>> From: stan <[hidden email]>
>> To: [hidden email]
>> Subject: Re: astropy.io.ascii
>>
>> On Fri, 14 Sep 2018 15:21:48 +0200
>> "Patrick Dupre" <[hidden email]> wrote:
>>
>>> I did
>>> dnf install python3-astropy
>>> (no problem) and then
>>>
>>> import astropy
>>> but I get
>>>      import astropy
>>> ImportError: No module named astropy
>>
>> The default python up to f28 is python2.  If you want to start python3,
>> you have to specifically say python3.
>>
>> When I start the python3 interpreter, and type import astropy, it loads
>> without issue.
>>  
>>> Do I also need to run
>>> pip install astropy --no-deps
>>> ?
>>
>> No, the fedora package is all you need to install.  In fact, it is not
>> a good practice to mix pip and rpms for the same python package.  If
>> you use pip to install python modules, you should investigate the --user
>> option so they won't conflict with rpm.
>>  
>>> as mentioned in http://docs.astropy.org/en/stable/install.html
_______________________________________________
users mailing list -- [hidden email]
To unsubscribe send an email to [hidden email]
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@...
Reply | Threaded
Open this post in threaded view
|

Re: astropy.io.ascii

stan-3
In reply to this post by Patrick Dupre-4
On Fri, 14 Sep 2018 17:13:53 +0200
"Patrick Dupre" <[hidden email]> wrote:

> I am running fedora28.
>
> But, by default it run python2
> Also under geany, it run pyhton2
>
> even if I put
> #!/usr/bin/python3
> in my file
>
> if I run python3 mypy.py
>
> Then it run pyhton3
>
> However, I get an error:
>
>   import matplotlib.pyplot as plt
> ModuleNotFoundError: No module named 'matplotlib'
>
> Do I need to install another matplotlib for python3?

John has the right of it.  There are python3 and python2 matplotlib
packages in Fedora, and you have to use the appropriate one for the
python version you are running.  You are better off running python3 if
you can, as python2 is deprecated and will reach EOL in 2020.  At that
point, it will be dropped from Fedora, unless a group takes on the task
of backporting fixes from python3, an unlikely scenario.  Python3 will
be the default python in F29 as part of Fedora preparation for that EOL.

Python2 and python3 are almost identical, but just like chimpanzees and
humans share 99% of their DNA and are incompatible, so too are python2
and python3.
_______________________________________________
users mailing list -- [hidden email]
To unsubscribe send an email to [hidden email]
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@...
Reply | Threaded
Open this post in threaded view
|

Re: astropy.io.ascii

Patrick Dupre-4
Thank.

It seems to be fixed,

However, I am sure that it is linked to fedora, but I get one
error with
ax.zaxis.set_scale('log')

    ax.zaxis.set_scale('log')
AttributeError: 'ZAxis' object has no attribute 'set_scale'

(from mpl_toolkits.mplot3d import Axes3D
import mpl_toolkits.mplot3d.axes3d as axes3d)


I found the following:
https://stackoverflow.com/questions/24442309/attributeerror-zaxis-object-has-no-attribute-set-scale-error-indicates-mat

Some ideas?

Thank.


> Sent: Saturday, September 15, 2018 at 2:15 AM
> From: stan <[hidden email]>
> To: [hidden email]
> Subject: Re: astropy.io.ascii
>
> On Fri, 14 Sep 2018 17:13:53 +0200
> "Patrick Dupre" <[hidden email]> wrote:
>
> > I am running fedora28.
> >
> > But, by default it run python2
> > Also under geany, it run pyhton2
> >
> > even if I put
> > #!/usr/bin/python3
> > in my file
> >
> > if I run python3 mypy.py
> >
> > Then it run pyhton3
> >
> > However, I get an error:
> >
> >   import matplotlib.pyplot as plt
> > ModuleNotFoundError: No module named 'matplotlib'
> >
> > Do I need to install another matplotlib for python3?
>
> John has the right of it.  There are python3 and python2 matplotlib
> packages in Fedora, and you have to use the appropriate one for the
> python version you are running.  You are better off running python3 if
> you can, as python2 is deprecated and will reach EOL in 2020.  At that
> point, it will be dropped from Fedora, unless a group takes on the task
> of backporting fixes from python3, an unlikely scenario.  Python3 will
> be the default python in F29 as part of Fedora preparation for that EOL.
>
> Python2 and python3 are almost identical, but just like chimpanzees and
> humans share 99% of their DNA and are incompatible, so too are python2
> and python3.
> _______________________________________________
> users mailing list -- [hidden email]
> To unsubscribe send an email to [hidden email]
> Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
> List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
> List Archives: https://lists.fedoraproject.org/archives/list/users@...
>
_______________________________________________
users mailing list -- [hidden email]
To unsubscribe send an email to [hidden email]
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@...
Reply | Threaded
Open this post in threaded view
|

Re: astropy.io.ascii

stan-3
On Sat, 15 Sep 2018 10:47:43 +0200
"Patrick Dupre" <[hidden email]> wrote:

> However, I am sure that it is linked to fedora, but I get one
> error with
> ax.zaxis.set_scale('log')
>
>     ax.zaxis.set_scale('log')
> AttributeError: 'ZAxis' object has no attribute 'set_scale'
>
> (from mpl_toolkits.mplot3d import Axes3D
> import mpl_toolkits.mplot3d.axes3d as axes3d)

If this is part of the error it is indicating that axes3d is being
imported twice, as different names.  If both exist, it seems they have
a conflict.  Because python is case sensitive in names,
Axes3D != axes3d.

>
>
> I found the following:
> https://stackoverflow.com/questions/24442309/attributeerror-zaxis-object-has-no-attribute-set-scale-error-indicates-mat
>
> Some ideas?

The link seems to be indicating that there are two versions of the
library installed, and they are incompatible.  Which is what the above
error also seems to be indicating.  I'm not familiar with these
routines, so have no idea what is actually going on.  I think this is
too complicated to solve second hand.  To find the error, the code
that is failing has to be debugged to find how and why it is failing.
And then fixed.  Not a trivial exercise.

Another alternative:
Did you by chance install matplotlib using pip, without --user? If you
did, you have conflicting installs from pip and rpm in the system
libraries.  The pip install has to be removed.  Even if you installed
a duplicate library with pip using --user, depending on your python
path it can conflict with the system libraries if it is before them,
introducing an inconsistency.

If a library exists in fedora and pip, always use the fedora library
so the system libraries remain self consistent. Only use pip for
libraries that aren't packaged in fedora, and always use --user to
install them, so they don't get installed into the system space.
_______________________________________________
users mailing list -- [hidden email]
To unsubscribe send an email to [hidden email]
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@...
Reply | Threaded
Open this post in threaded view
|

Re: astropy.io.ascii

Patrick Dupre-4
I am sorry. It seems that there is some confusion.

The following lines, can be commented or not. It does not change anything

from mpl_toolkits.mplot3d import Axes3D
import mpl_toolkits.mplot3d.axes3d as axes3d)

I do not use pip. However pip list provides a list of 207 pacakges.

The error is the same in python2 and python3
    ax.yaxis.set_scale('log')
AttributeError: 'YAxis' object has no attribute 'set_scale'




>
> On Sat, 15 Sep 2018 10:47:43 +0200
> "Patrick Dupre" <[hidden email]> wrote:
>
> > However, I am sure that it is linked to fedora, but I get one
> > error with
> > ax.zaxis.set_scale('log')
> >
> >     ax.zaxis.set_scale('log')
> > AttributeError: 'ZAxis' object has no attribute 'set_scale'
> >
> > (from mpl_toolkits.mplot3d import Axes3D
> > import mpl_toolkits.mplot3d.axes3d as axes3d)
>
> If this is part of the error it is indicating that axes3d is being
> imported twice, as different names.  If both exist, it seems they have
> a conflict.  Because python is case sensitive in names,
> Axes3D != axes3d.
>
> >
> >
> > I found the following:
> > https://stackoverflow.com/questions/24442309/attributeerror-zaxis-object-has-no-attribute-set-scale-error-indicates-mat
> >
> > Some ideas?
>
> The link seems to be indicating that there are two versions of the
> library installed, and they are incompatible.  Which is what the above
> error also seems to be indicating.  I'm not familiar with these
> routines, so have no idea what is actually going on.  I think this is
> too complicated to solve second hand.  To find the error, the code
> that is failing has to be debugged to find how and why it is failing.
> And then fixed.  Not a trivial exercise.
>
> Another alternative:
> Did you by chance install matplotlib using pip, without --user? If you
> did, you have conflicting installs from pip and rpm in the system
> libraries.  The pip install has to be removed.  Even if you installed
> a duplicate library with pip using --user, depending on your python
> path it can conflict with the system libraries if it is before them,
> introducing an inconsistency.
>
> If a library exists in fedora and pip, always use the fedora library
> so the system libraries remain self consistent. Only use pip for
> libraries that aren't packaged in fedora, and always use --user to
> install them, so they don't get installed into the system space.
> _______________________________________________
> users mailing list -- [hidden email]
> To unsubscribe send an email to [hidden email]
> Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
> List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
> List Archives: https://lists.fedoraproject.org/archives/list/users@...
>
_______________________________________________
users mailing list -- [hidden email]
To unsubscribe send an email to [hidden email]
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@...
Reply | Threaded
Open this post in threaded view
|

Re: astropy.io.ascii

John Pilkington-2
On 15/09/18 20:46, Patrick Dupre wrote:

> I am sorry. It seems that there is some confusion.
>
> The following lines, can be commented or not. It does not change anything
>
> from mpl_toolkits.mplot3d import Axes3D
> import mpl_toolkits.mplot3d.axes3d as axes3d)
>
> I do not use pip. However pip list provides a list of 207 pacakges.
>
> The error is the same in python2 and python3
>      ax.yaxis.set_scale('log')
> AttributeError: 'YAxis' object has no attribute 'set_scale'

I think you should perhaps ask about this in matplotlib circles.  This
'closed' bug has similarities:

https://github.com/matplotlib/matplotlib/issues/8027

John P


>
>
>
>
>>
>> On Sat, 15 Sep 2018 10:47:43 +0200
>> "Patrick Dupre" <[hidden email]> wrote:
>>
>>> However, I am sure that it is linked to fedora, but I get one
>>> error with
>>> ax.zaxis.set_scale('log')
>>>
>>>      ax.zaxis.set_scale('log')
>>> AttributeError: 'ZAxis' object has no attribute 'set_scale'
>>>
>>> (from mpl_toolkits.mplot3d import Axes3D
>>> import mpl_toolkits.mplot3d.axes3d as axes3d)
>>
>> If this is part of the error it is indicating that axes3d is being
>> imported twice, as different names.  If both exist, it seems they have
>> a conflict.  Because python is case sensitive in names,
>> Axes3D != axes3d.
>>
>>>
>>>
>>> I found the following:
>>> https://stackoverflow.com/questions/24442309/attributeerror-zaxis-object-has-no-attribute-set-scale-error-indicates-mat
>>>
>>> Some ideas?
>>
>> The link seems to be indicating that there are two versions of the
>> library installed, and they are incompatible.  Which is what the above
>> error also seems to be indicating.  I'm not familiar with these
>> routines, so have no idea what is actually going on.  I think this is
>> too complicated to solve second hand.  To find the error, the code
>> that is failing has to be debugged to find how and why it is failing.
>> And then fixed.  Not a trivial exercise.
>>
>> Another alternative:
>> Did you by chance install matplotlib using pip, without --user? If you
>> did, you have conflicting installs from pip and rpm in the system
>> libraries.  The pip install has to be removed.  Even if you installed
>> a duplicate library with pip using --user, depending on your python
>> path it can conflict with the system libraries if it is before them,
>> introducing an inconsistency.
>>
>> If a library exists in fedora and pip, always use the fedora library
>> so the system libraries remain self consistent. Only use pip for
>> libraries that aren't packaged in fedora, and always use --user to
>> install them, so they don't get installed into the system space.
_______________________________________________
users mailing list -- [hidden email]
To unsubscribe send an email to [hidden email]
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@...