我在终端上运行“ python setup.py install”时收到警告。这是什么意思?

时间:2019-05-25 20:14:30

标签: python python-2.7 terminal macos-high-sierra

我正在尝试在Macbook Pro上运行一个名为Posidonius的程序。我正在按照本页(https://www.blancocuaresma.com/s/posidonius/manual/installation/instructions)上的说明进行操作,并且大部分都已完成。但是,当我到达最后一节时,我遇到了python问题。我将其输入终端:

python setup.py install --user

...虽然执行成功,但终端中的输出显示大量警告。我不是经验丰富的程序员,并且是Python的新手,所以我不确定这一切意味着什么以及是否应该尝试解决问题。

我尝试使用'sudo easy_install -U numpy'更新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$ 

我想弄清楚终端中的输出是否表明我需要解决的问题。

0 个答案:

没有答案