Я получаю предупреждения, когда запускаю «python setup.py install» в моем терминале. Что это значит? - PullRequest
0 голосов
/ 25 мая 2019

Я пытаюсь запустить программу под названием Posidonius на моем Macbook Pro.Я работаю с инструкциями на этой странице (https://www.blancocuaresma.com/s/posidonius/manual/installation/instructions), и в основном это сработало. Однако, когда я попадаю в последний раздел, я сталкиваюсь с проблемой Python. Я ввел это в терминал:

python setup.py install --user

... и, хотя он, кажется, успешно выполняется, вывод в терминале показывает тонны предупреждений.Я не опытный программист, и я новичок в Python, поэтому я не уверен, что все это значит иесть проблема, которую я должен попытаться исправить.

Я попытался обновить numpy с помощью 'sudo easy_install -U numpy', который, казалось, работал, но также выдал много предупреждений, например:

Users-MacBook-Pro:posidonius User$ sudo easy_install -U numpy
Password:
Searching for numpy
Reading https://pypi.python.org/simple/numpy/
Best match: numpy 1.16.3
Downloading https://files.pythonhosted.    org/packages/93/48/956b9dcdddfcedb1705839280e02cbfeb2861ed5d7f59241210530867d5b/numpy-1.16.3.    zip#sha256=78a6f89da87eeb48014ec652a65c4ffde370c036d780a995edaeb121d3625621
Processing numpy-1.16.3.zip
Writing /tmp/easy_install-Aq_iKG/numpy-1.16.3/setup.cfg
Running numpy-1.16.3/setup.py -q bdist_egg --dist-dir /tmp/easy_install-Aq_iKG/numpy-1.16.    3/egg-dist-tmp-wPzu9V
Running from numpy source directory.
/tmp/easy_install-Aq_iKG/numpy-1.16.3/setup.py:390: UserWarning: Unrecognized setuptools     command, proceeding with generating Cython sources and expanding templates
  run_build = parse_setuppy_commands()
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.    py:267: UserWarning: Unknown distribution option: 'python_requires'
  warnings.warn(msg)
non-existing path in 'numpy/distutils': 'site.cfg'
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.    py:267: UserWarning: Unknown distribution option: 'define_macros'
  warnings.warn(msg)
Could not locate executable gfortran
Could not locate executable f95
Could not locate executable f90
Could not locate executable f77
Could not locate executable xlf90
Could not locate executable xlf
Could not locate executable ifort
Could not locate executable ifc
Could not locate executable g77
Could not locate executable g95
Could not locate executable pgfortran
don't know how to compile Fortran code on platform 'posix'
_configtest.c:1:5: warning: incompatible redeclaration of library function 'exp' [-    Wincompatible-library-redeclaration]
int exp (void);

Вот что я вижу в терминале, когда я запускаю 'python setup.py install'. Все начинается нормально ...

UserName-MacBook-Pro:posidonius User$ python setup.py install --user
running install
running bdist_egg
running egg_info
creating posidonius.egg-info
writing requirements to posidonius.egg-info/requires.txt
writing posidonius.egg-info/PKG-INFO
writing top-level names to posidonius.egg-info/top_level.txt
writing dependency_links to posidonius.egg-info/dependency_links.txt
writing manifest file 'posidonius.egg-info/SOURCES.txt'
reading manifest file 'posidonius.egg-info/SOURCES.txt'
writing manifest file 'posidonius.egg-info/SOURCES.txt'
installing library code to build/bdist.macosx-10.13-intel/egg
running install_lib
running build_py
creating build
creating build/lib
creating build/lib/posidonius
copying posidonius/integrator.py -> build/lib/posidonius
copying posidonius/tools.py -> build/lib/posidonius
copying posidonius/constants.py -> build/lib/posidonius
copying posidonius/evolution_type.py -> build/lib/posidonius
copying posidonius/__init__.py -> build/lib/posidonius
copying posidonius/universe.py -> build/lib/posidonius
copying posidonius/axes.py -> build/lib/posidonius
creating build/lib/posidonius/analysis
copying posidonius/analysis/resonances.py -> build/lib/posidonius/analysis
copying posidonius/analysis/__init__.py -> build/lib/posidonius/analysis
copying posidonius/analysis/computation.py -> build/lib/posidonius/analysis
copying posidonius/analysis/history.py -> build/lib/posidonius/analysis
creating build/bdist.macosx-10.13-intel
creating build/bdist.macosx-10.13-intel/egg
creating build/bdist.macosx-10.13-intel/egg/posidonius
copying build/lib/posidonius/integrator.py -> build/bdist.macosx-10.13-intel/egg/posidonius
creating build/bdist.macosx-10.13-intel/egg/posidonius/analysis
copying build/lib/posidonius/analysis/resonances.py -> build/bdist.macosx-10.13-    intel/egg/posidonius/analysis
copying build/lib/posidonius/analysis/__init__.py -> build/bdist.macosx-10.13-    intel/egg/posidonius/analysis
copying build/lib/posidonius/analysis/computation.py -> build/bdist.macosx-10.13-    intel/egg/posidonius/analysis
copying build/lib/posidonius/analysis/history.py -> build/bdist.macosx-10.13-    intel/egg/posidonius/analysis    

И затем я получаю предупреждения ...

Installed /Users/UserName/Library/Python/2.7/lib/python/site-packages/posidonius-0.0.1-py2.7.    egg
Processing dependencies for posidonius==0.0.1
Searching for pandas
Reading https://pypi.python.org/simple/pandas/
Best match: pandas 0.24.2
Downloading https://files.pythonhosted.    org/packages/b2/4c/b6f966ac91c5670ba4ef0b0b5613b5379e3c7abdfad4e7b89a87d73bae13/pandas-0.24.2    .tar.gz#sha256=4f919f409c433577a501e023943e582c57355d50a724c589e78bc1d551a535a2
Processing pandas-0.24.2.tar.gz
Writing /var/folders/qn/z5hlh63j2r33th0qwkv4l35m0000gn/T/easy_install-mlgubA/pandas-0.24.    2/setup.cfg
Running pandas-0.24.2/setup.py -q bdist_egg --dist-dir     /var/folders/qn/z5hlh63j2r33th0qwkv4l35m0000gn/T/easy_install-mlgubA/pandas-0.24.2/egg-dist-    tmp-HUfJKd
Running from numpy source directory.
/var/folders/qn/z5hlh63j2r33th0qwkv4l35m0000gn/T/easy_install-mlgubA/pandas-0.24.    2/temp/easy_install-U57Kj2/numpy-1.16.3/setup.py:390: UserWarning: Unrecognized setuptools     command, proceeding with generating Cython sources and expanding templates
  run_build = parse_setuppy_commands()
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.    py:267: UserWarning: Unknown distribution option: 'python_requires'
  warnings.warn(msg)
non-existing path in 'numpy/distutils': 'site.cfg'
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.    py:267: UserWarning: Unknown distribution option: 'define_macros'
  warnings.warn(msg)
Could not locate executable gfortran
Could not locate executable f95
Could not locate executable f90
Could not locate executable f77
Could not locate executable xlf90
Could not locate executable xlf
Could not locate executable ifort
Could not locate executable ifc
Could not locate executable g77
Could not locate executable g95
Could not locate executable pgfortran
don't know how to compile Fortran code on platform 'posix'
_configtest.c:1:5: warning: incompatible redeclaration of library function 'exp'
      [-Wincompatible-library-redeclaration]
int exp (void);
    ^
_configtest.c:1:5: note: 'exp' is a builtin with type 'double (double)'
1 warning generated.
_configtest.c:1:5: warning: incompatible redeclaration of library function 'exp'
      [-Wincompatible-library-redeclaration]
int exp (void);
    ^
_configtest.c:1:5: note: 'exp' is a builtin with type 'double (double)'
1 warning generated.
_configtest.c:1:10: fatal error: 'endian.h' file not found
#include <endian.h>
         ^~~~~~~~~~
1 error generated.
_configtest.c:1:10: fatal error: 'sys/endian.h' file not found
#include <sys/endian.h>
         ^~~~~~~~~~~~~~
1 error generated.
_configtest.c:7:12: error: use of undeclared identifier 'SIZEOF_LONGDOUBLE'
    (void) SIZEOF_LONGDOUBLE;    

И это продолжается долго ...

Installed /Users/UserName/Library/Python/2.7/lib/python/site-packages/posidonius-0.0.1-py2.7.    egg
Processing dependencies for posidonius==0.0.1
Searching for pandas
Reading https://pypi.python.org/simple/pandas/
Best match: pandas 0.24.2
Downloading https://files.pythonhosted.    org/packages/b2/4c/b6f966ac91c5670ba4ef0b0b5613b5379e3c7abdfad4e7b89a87d73bae13/pandas-0.24.2    .tar.gz#sha256=4f919f409c433577a501e023943e582c57355d50a724c589e78bc1d551a535a2
Processing pandas-0.24.2.tar.gz
Writing /var/folders/qn/z5hlh63j2r33th0qwkv4l35m0000gn/T/easy_install-mlgubA/pandas-0.24.    2/setup.cfg
Running pandas-0.24.2/setup.py -q bdist_egg --dist-dir     /var/folders/qn/z5hlh63j2r33th0qwkv4l35m0000gn/T/easy_install-mlgubA/pandas-0.24.2/egg-dist-    tmp-HUfJKd
Running from numpy source directory.
/var/folders/qn/z5hlh63j2r33th0qwkv4l35m0000gn/T/easy_install-mlgubA/pandas-0.24.    2/temp/easy_install-U57Kj2/numpy-1.16.3/setup.py:390: UserWarning: Unrecognized setuptools     command, proceeding with generating Cython sources and expanding templates
  run_build = parse_setuppy_commands()
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.    py:267: UserWarning: Unknown distribution option: 'python_requires'
  warnings.warn(msg)
non-existing path in 'numpy/distutils': 'site.cfg'
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.    py:267: UserWarning: Unknown distribution option: 'define_macros'
  warnings.warn(msg)
Could not locate executable gfortran
Could not locate executable f95
Could not locate executable f90
Could not locate executable f77
Could not locate executable xlf90
Could not locate executable xlf
Could not locate executable ifort
Could not locate executable ifc
Could not locate executable g77
Could not locate executable g95
Could not locate executable pgfortran
don't know how to compile Fortran code on platform 'posix'
_configtest.c:1:5: warning: incompatible redeclaration of library function 'exp'
      [-Wincompatible-library-redeclaration]
int exp (void);
    ^
_configtest.c:1:5: note: 'exp' is a builtin with type 'double (double)'
1 warning generated.
_configtest.c:1:5: warning: incompatible redeclaration of library function 'exp'
      [-Wincompatible-library-redeclaration]
int exp (void);
    ^
_configtest.c:1:5: note: 'exp' is a builtin with type 'double (double)'
1 warning generated.
_configtest.c:1:10: fatal error: 'endian.h' file not found
#include <endian.h>
         ^~~~~~~~~~
1 error generated.
_configtest.c:1:10: fatal error: 'sys/endian.h' file not found
#include <sys/endian.h>

В конце все выглядит нормально ...

Adding tornado 6.0.2 to easy-install.pth file

Installed /Users/UserName/Library/Python/2.7/lib/python/site-packages/tornado-6.0.2-py2.7-    macosx-10.13-intel.egg
error: numpy 1.8.0rc1 is installed but numpy>=1.12.0 is required by set(['pandas'])
UserName-MacBook-Pro:posidonius User$ 

Я бы хотел выяснить, еслиэтот вывод в терминале указывает на проблему, которую мне нужно исправить.

...