Python 在通过conda在Windows中安装HashPy时,未解析的外部符号uuuuuuu chkstk_ms和_gfortran*

Python 在通过conda在Windows中安装HashPy时,未解析的外部符号uuuuuuu chkstk_ms和_gfortran*,python,fortran,cygwin,anaconda,gfortran,Python,Fortran,Cygwin,Anaconda,Gfortran,我在Python2.7中通过conda()安装了HashPy。在此之前,我已经按照以下说明从Cygwin中的gcc fortran包安装了gfortran(这是必需的)。但后来我遇到了一个问题: (obspy) C:\Users\dell>pip install https://github.com/markcwill/hashpy/archive/ma ster.zip Collecting https://github.com/markcwill/hashpy/archive/mast

我在Python2.7中通过conda()安装了HashPy。在此之前,我已经按照以下说明从Cygwin中的gcc fortran包安装了gfortran(这是必需的)。但后来我遇到了一个问题:

(obspy) C:\Users\dell>pip install https://github.com/markcwill/hashpy/archive/ma
ster.zip
Collecting https://github.com/markcwill/hashpy/archive/master.zip
  Downloading https://github.com/markcwill/hashpy/archive/master.zip
     / 1.2MB 93kB/s
Installing collected packages: HASHpy
  Running setup.py install for HASHpy ... error
    Complete output from command C:\Users\dell\Anaconda2\envs\obspy\python.exe -
u -c "import setuptools, tokenize;__file__='c:\\users\\dell\\appdata\\local\\tem
p\\pip-enmsua-build\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=
f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))"
install --record c:\users\dell\appdata\local\temp\pip-acc7xy-record\install-reco
rd.txt --single-version-externally-managed --compile:
    running install
    running build
    running config_cc
    unifing config_cc, config, build_clib, build_ext, build commands --compiler
options
    running config_fc
    unifing config_fc, config, build_clib, build_ext, build commands --fcompiler
 options
    running build_src
    build_src
    building extension "hashpy.libhashpy" sources
    f2py options: []
      adding 'build\src.win-amd64-2.7\fortranobject.c' to sources.
      adding 'build\src.win-amd64-2.7' to include_dirs.
      adding 'build\src.win-amd64-2.7\hashpy\libhashpy-f2pywrappers.f' to source
s.
    build_src: building npy-pkg config files
    running build_py
    creating build\lib.win-amd64-2.7
    creating build\lib.win-amd64-2.7\hashpy
    copying hashpy\doublecouple.py -> build\lib.win-amd64-2.7\hashpy
    copying hashpy\hashpype.py -> build\lib.win-amd64-2.7\hashpy
    copying hashpy\__init__.py -> build\lib.win-amd64-2.7\hashpy
    creating build\lib.win-amd64-2.7\hashpy\io
    copying hashpy\io\antelopeIO.py -> build\lib.win-amd64-2.7\hashpy\io
    copying hashpy\io\core.py -> build\lib.win-amd64-2.7\hashpy\io
    copying hashpy\io\fpfitIO.py -> build\lib.win-amd64-2.7\hashpy\io
    copying hashpy\io\obspyIO.py -> build\lib.win-amd64-2.7\hashpy\io
    copying hashpy\io\__init__.py -> build\lib.win-amd64-2.7\hashpy\io
    creating build\lib.win-amd64-2.7\hashpy\plotting
    copying hashpy\plotting\focalmechplotter.py -> build\lib.win-amd64-2.7\hashp
y\plotting
    copying hashpy\plotting\__init__.py -> build\lib.win-amd64-2.7\hashpy\plotti
ng
    creating build\lib.win-amd64-2.7\hashpy\src
    copying hashpy\src\param.inc -> build\lib.win-amd64-2.7\hashpy\src
    copying hashpy\src\rot.inc -> build\lib.win-amd64-2.7\hashpy\src
    copying hashpy\src\vel.inc -> build\lib.win-amd64-2.7\hashpy\src
    copying hashpy\src\Makefile -> build\lib.win-amd64-2.7\hashpy\src
    creating build\lib.win-amd64-2.7\hashpy\data
    copying hashpy\data\dbhash.pf -> build\lib.win-amd64-2.7\hashpy\data
    copying hashpy\data\vz.kds -> build\lib.win-amd64-2.7\hashpy\data
    copying hashpy\data\vz.kds_orig -> build\lib.win-amd64-2.7\hashpy\data
    copying hashpy\data\vz.lab1 -> build\lib.win-amd64-2.7\hashpy\data
    copying hashpy\data\vz.north -> build\lib.win-amd64-2.7\hashpy\data
    copying hashpy\data\vz.pickema1 -> build\lib.win-amd64-2.7\hashpy\data
    copying hashpy\data\vz.pickema2 -> build\lib.win-amd64-2.7\hashpy\data
    copying hashpy\data\vz.pickema3 -> build\lib.win-amd64-2.7\hashpy\data
    copying hashpy\data\vz.sgm1 -> build\lib.win-amd64-2.7\hashpy\data
    copying hashpy\data\vz.socal -> build\lib.win-amd64-2.7\hashpy\data
    copying hashpy\data\vz.vb1 -> build\lib.win-amd64-2.7\hashpy\data
    creating build\lib.win-amd64-2.7\hashpy\scripts
    copying hashpy\scripts\dbhash -> build\lib.win-amd64-2.7\hashpy\scripts
    copying hashpy\scripts\hash_driver2.py -> build\lib.win-amd64-2.7\hashpy\scr
ipts
    copying hashpy\scripts\hash_utils.py -> build\lib.win-amd64-2.7\hashpy\scrip
ts
    copying hashpy\scripts\__init__.py -> build\lib.win-amd64-2.7\hashpy\scripts

    copying hashpy\src\fmamp_subs.f -> build\lib.win-amd64-2.7\hashpy\src
    copying hashpy\src\fmech_subs.f -> build\lib.win-amd64-2.7\hashpy\src
    copying hashpy\src\pol_subs.f -> build\lib.win-amd64-2.7\hashpy\src
    copying hashpy\src\station_subs.f -> build\lib.win-amd64-2.7\hashpy\src
    copying hashpy\src\station_subs_5char.f -> build\lib.win-amd64-2.7\hashpy\sr
c
    copying hashpy\src\uncert_subs.f -> build\lib.win-amd64-2.7\hashpy\src
    copying hashpy\src\util_subs.f -> build\lib.win-amd64-2.7\hashpy\src
    copying hashpy\src\vel_subs.f -> build\lib.win-amd64-2.7\hashpy\src
    copying hashpy\src\vel_subs2.f -> build\lib.win-amd64-2.7\hashpy\src
    running build_ext
    customize MSVCCompiler
    customize MSVCCompiler using build_ext
    customize GnuFCompiler
    Could not locate executable g77
    Could not locate executable f77
    customize IntelVisualFCompiler
    Could not locate executable ifort
    Could not locate executable ifl
    customize AbsoftFCompiler
    Could not locate executable f90
    customize CompaqVisualFCompiler
    Found executable C:\cygwin64\bin\DF.exe
    Found executable C:\cygwin64\bin\DF.exe
    customize IntelItaniumVisualFCompiler
    Could not locate executable efl
    customize Gnu95FCompiler
    Found executable C:\cygwin64\bin\gfortran.exe
    Found executable C:\cygwin64\bin\gfortran.exe
    customize Gnu95FCompiler
    customize Gnu95FCompiler using build_ext
    building 'hashpy.libhashpy' extension
    compiling C sources
    creating build\temp.win-amd64-2.7
    creating build\temp.win-amd64-2.7\Release
    creating build\temp.win-amd64-2.7\Release\build
    creating build\temp.win-amd64-2.7\Release\build\src.win-amd64-2.7
    creating build\temp.win-amd64-2.7\Release\build\src.win-amd64-2.7\hashpy
    C:\Users\dell\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\
9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ibuild\src.win-amd
64-2.7 -IC:\Users\dell\Anaconda2\envs\obspy\lib\site-packages\numpy\core\include
 -IC:\Users\dell\Anaconda2\envs\obspy\include -IC:\Users\dell\Anaconda2\envs\obs
py\PC /Tcbuild\src.win-amd64-2.7\hashpy\libhashpymodule.c /Fobuild\temp.win-amd6
4-2.7\Release\build\src.win-amd64-2.7\hashpy\libhashpymodule.obj
    Found executable C:\Users\dell\AppData\Local\Programs\Common\Microsoft\Visua
l C++ for Python\9.0\VC\Bin\amd64\cl.exe
    C:\Users\dell\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\
9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ibuild\src.win-amd
64-2.7 -IC:\Users\dell\Anaconda2\envs\obspy\lib\site-packages\numpy\core\include
 -IC:\Users\dell\Anaconda2\envs\obspy\include -IC:\Users\dell\Anaconda2\envs\obs
py\PC /Tcbuild\src.win-amd64-2.7\fortranobject.c /Fobuild\temp.win-amd64-2.7\Rel
ease\build\src.win-amd64-2.7\fortranobject.obj
    compiling Fortran sources
    Fortran f77 compiler: C:\cygwin64\bin\gfortran.exe -Wall -g -ffixed-form -fn
o-second-underscore -O0
    Fortran f90 compiler: C:\cygwin64\bin\gfortran.exe -Wall -g -fno-second-unde
rscore -O0
    Fortran fix compiler: C:\cygwin64\bin\gfortran.exe -Wall -g -ffixed-form -fn
o-second-underscore -Wall -g -fno-second-underscore -O0
    creating build\temp.win-amd64-2.7\Release\hashpy
    creating build\temp.win-amd64-2.7\Release\hashpy\src
    compile options: '-Ibuild\src.win-amd64-2.7 -IC:\Users\dell\Anaconda2\envs\o
bspy\lib\site-packages\numpy\core\include -IC:\Users\dell\Anaconda2\envs\obspy\i
nclude -IC:\Users\dell\Anaconda2\envs\obspy\PC -c'
    gfortran.exe:f77: hashpy\src\fmamp_subs.f
    gfortran.exe:f77: hashpy\src\fmech_subs.f
    gfortran.exe:f77: hashpy\src\uncert_subs.f
    gfortran.exe:f77: hashpy\src\util_subs.f
    gfortran.exe:f77: hashpy\src\pol_subs.f
    gfortran.exe:f77: hashpy\src\vel_subs.f
    gfortran.exe:f77: hashpy\src\station_subs.f
    gfortran.exe:f77: hashpy\src\vel_subs2.f
    gfortran.exe:f77: build\src.win-amd64-2.7\hashpy\libhashpy-f2pywrappers.f
    Found executable C:\cygwin64\bin\cygpath.exe
    C:\Users\dell\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\
9.0\VC\Bin\amd64\link.exe /DLL /nologo /INCREMENTAL:NO /LIBPATH:C:\cygwin64\lib\
gcc\x86_64-pc-cygwin\5.4.0 /LIBPATH:C:\Users\dell\Anaconda2\envs\obspy\libs /LIB
PATH:C:\Users\dell\Anaconda2\envs\obspy\PCbuild\amd64 /LIBPATH:C:\Users\dell\Ana
conda2\envs\obspy\PC\VS9.0\amd64 /LIBPATH:C:\Users\dell\Anaconda2\envs\obspy\lib
s /LIBPATH:C:\Users\dell\Anaconda2\envs\obspy\PCbuild\amd64 /LIBPATH:C:\Users\de
ll\Anaconda2\envs\obspy\PC\VS9.0\amd64 /EXPORT:initlibhashpy build\temp.win-amd6
4-2.7\Release\build\src.win-amd64-2.7\hashpy\libhashpymodule.obj build\temp.win-
amd64-2.7\Release\build\src.win-amd64-2.7\fortranobject.obj build\temp.win-amd64
-2.7\Release\hashpy\src\fmamp_subs.o build\temp.win-amd64-2.7\Release\hashpy\src
\fmech_subs.o build\temp.win-amd64-2.7\Release\hashpy\src\uncert_subs.o build\te
mp.win-amd64-2.7\Release\hashpy\src\util_subs.o build\temp.win-amd64-2.7\Release
\hashpy\src\pol_subs.o build\temp.win-amd64-2.7\Release\hashpy\src\vel_subs.o bu
ild\temp.win-amd64-2.7\Release\hashpy\src\station_subs.o build\temp.win-amd64-2.
7\Release\hashpy\src\vel_subs2.o build\temp.win-amd64-2.7\Release\build\src.win-
amd64-2.7\hashpy\libhashpy-f2pywrappers.o /OUT:build\lib.win-amd64-2.7\hashpy\li
bhashpy.pyd /IMPLIB:build\temp.win-amd64-2.7\Release\build\src.win-amd64-2.7\has
hpy\libhashpy.lib /MANIFESTFILE:build\temp.win-amd64-2.7\Release\build\src.win-a
md64-2.7\hashpy\libhashpy.pyd.manifest
    Found executable C:\Users\dell\AppData\Local\Programs\Common\Microsoft\Visua
l C++ for Python\9.0\VC\Bin\amd64\link.exe
    libhashpymodule.obj : warning LNK4197: export 'initlibhashpy' specified mult
iple times; using first specification
       Creating library build\temp.win-amd64-2.7\Release\build\src.win-amd64-2.7
\hashpy\libhashpy.lib and object build\temp.win-amd64-2.7\Release\build\src.win-
amd64-2.7\hashpy\libhashpy.exp
    vel_subs.o : error LNK2001: unresolved external symbol ___chkstk_ms
    vel_subs2.o : error LNK2019: unresolved external symbol ___chkstk_ms referen
ced in function mk_table_add_
    fmamp_subs.o : error LNK2001: unresolved external symbol ___chkstk_ms
    fmech_subs.o : error LNK2001: unresolved external symbol ___chkstk_ms
    uncert_subs.o : error LNK2001: unresolved external symbol ___chkstk_ms
    pol_subs.o : error LNK2001: unresolved external symbol ___chkstk_ms
    fmamp_subs.o : error LNK2019: unresolved external symbol lroundf referenced
in function focalamp_mc_
    fmech_subs.o : error LNK2001: unresolved external symbol lroundf
    station_subs.o : error LNK2001: unresolved external symbol _gfortran_st_writ
e
    vel_subs2.o : error LNK2019: unresolved external symbol _gfortran_st_write r
eferenced in function mk_table_add_
    fmamp_subs.o : error LNK2001: unresolved external symbol _gfortran_st_write
    fmech_subs.o : error LNK2001: unresolved external symbol _gfortran_st_write
    pol_subs.o : error LNK2001: unresolved external symbol _gfortran_st_write
    vel_subs.o : error LNK2001: unresolved external symbol _gfortran_st_write
    station_subs.o : error LNK2001: unresolved external symbol _gfortran_transfe
r_character_write
    vel_subs2.o : error LNK2019: unresolved external symbol _gfortran_transfer_c
haracter_write referenced in function mk_table_add_
    fmamp_subs.o : error LNK2001: unresolved external symbol _gfortran_transfer_
character_write
    fmech_subs.o : error LNK2001: unresolved external symbol _gfortran_transfer_
character_write
    pol_subs.o : error LNK2001: unresolved external symbol _gfortran_transfer_ch
aracter_write
    vel_subs.o : error LNK2001: unresolved external symbol _gfortran_transfer_ch
aracter_write
    station_subs.o : error LNK2001: unresolved external symbol _gfortran_st_writ
e_done
    vel_subs2.o : error LNK2019: unresolved external symbol _gfortran_st_write_d
one referenced in function mk_table_add_
    fmamp_subs.o : error LNK2001: unresolved external symbol _gfortran_st_write_
done
    fmech_subs.o : error LNK2001: unresolved external symbol _gfortran_st_write_
done
    pol_subs.o : error LNK2001: unresolved external symbol _gfortran_st_write_do
ne
    vel_subs.o : error LNK2001: unresolved external symbol _gfortran_st_write_do
ne
    fmamp_subs.o : error LNK2019: unresolved external symbol _gfortran_rand refe
renced in function focalamp_mc_
    fmech_subs.o : error LNK2001: unresolved external symbol _gfortran_rand
    vel_subs.o : error LNK2019: unresolved external symbol _gfortran_transfer_in
teger_write referenced in function mk_table_
    vel_subs.o : error LNK2019: unresolved external symbol _gfortran_st_read ref
erenced in function mk_table_
    station_subs.o : error LNK2001: unresolved external symbol _gfortran_st_read

    vel_subs2.o : error LNK2001: unresolved external symbol _gfortran_st_read
    vel_subs.o : error LNK2019: unresolved external symbol _gfortran_transfer_in
teger referenced in function mk_table_
    station_subs.o : error LNK2001: unresolved external symbol _gfortran_transfe
r_integer
    vel_subs.o : error LNK2019: unresolved external symbol _gfortran_st_read_don
e referenced in function mk_table_
    station_subs.o : error LNK2001: unresolved external symbol _gfortran_st_read
_done
    vel_subs2.o : error LNK2001: unresolved external symbol _gfortran_st_read_do
ne
    vel_subs.o : error LNK2019: unresolved external symbol _gfortran_transfer_ch
aracter referenced in function mk_table_
    station_subs.o : error LNK2001: unresolved external symbol _gfortran_transfe
r_character
    vel_subs.o : error LNK2019: unresolved external symbol _gfortran_st_open ref
erenced in function mk_table_
    station_subs.o : error LNK2001: unresolved external symbol _gfortran_st_open

    vel_subs2.o : error LNK2001: unresolved external symbol _gfortran_st_open
    vel_subs.o : error LNK2019: unresolved external symbol _gfortran_transfer_re
al referenced in function mk_table_
    station_subs.o : error LNK2001: unresolved external symbol _gfortran_transfe
r_real
    vel_subs2.o : error LNK2001: unresolved external symbol _gfortran_transfer_r
eal
    vel_subs.o : error LNK2019: unresolved external symbol _gfortran_st_close re
ferenced in function mk_table_
    station_subs.o : error LNK2001: unresolved external symbol _gfortran_st_clos
e
    vel_subs2.o : error LNK2001: unresolved external symbol _gfortran_st_close
    vel_subs.o : error LNK2019: unresolved external symbol _gfortran_transfer_re
al_write referenced in function get_tts_
    build\lib.win-amd64-2.7\hashpy\libhashpy.pyd : fatal error LNK1120: 15 unres
olved externals
    error: Command "C:\Users\dell\AppData\Local\Programs\Common\Microsoft\Visual
 C++ for Python\9.0\VC\Bin\amd64\link.exe /DLL /nologo /INCREMENTAL:NO /LIBPATH:
C:\cygwin64\lib\gcc\x86_64-pc-cygwin\5.4.0 /LIBPATH:C:\Users\dell\Anaconda2\envs
\obspy\libs /LIBPATH:C:\Users\dell\Anaconda2\envs\obspy\PCbuild\amd64 /LIBPATH:C
:\Users\dell\Anaconda2\envs\obspy\PC\VS9.0\amd64 /LIBPATH:C:\Users\dell\Anaconda
2\envs\obspy\libs /LIBPATH:C:\Users\dell\Anaconda2\envs\obspy\PCbuild\amd64 /LIB
PATH:C:\Users\dell\Anaconda2\envs\obspy\PC\VS9.0\amd64 /EXPORT:initlibhashpy bui
ld\temp.win-amd64-2.7\Release\build\src.win-amd64-2.7\hashpy\libhashpymodule.obj
 build\temp.win-amd64-2.7\Release\build\src.win-amd64-2.7\fortranobject.obj buil
d\temp.win-amd64-2.7\Release\hashpy\src\fmamp_subs.o build\temp.win-amd64-2.7\Re
lease\hashpy\src\fmech_subs.o build\temp.win-amd64-2.7\Release\hashpy\src\uncert
_subs.o build\temp.win-amd64-2.7\Release\hashpy\src\util_subs.o build\temp.win-a
md64-2.7\Release\hashpy\src\pol_subs.o build\temp.win-amd64-2.7\Release\hashpy\s
rc\vel_subs.o build\temp.win-amd64-2.7\Release\hashpy\src\station_subs.o build\t
emp.win-amd64-2.7\Release\hashpy\src\vel_subs2.o build\temp.win-amd64-2.7\Releas
e\build\src.win-amd64-2.7\hashpy\libhashpy-f2pywrappers.o /OUT:build\lib.win-amd
64-2.7\hashpy\libhashpy.pyd /IMPLIB:build\temp.win-amd64-2.7\Release\build\src.w
in-amd64-2.7\hashpy\libhashpy.lib /MANIFESTFILE:build\temp.win-amd64-2.7\Release
\build\src.win-amd64-2.7\hashpy\libhashpy.pyd.manifest" failed with exit status
1120

    ----------------------------------------
Command "C:\Users\dell\Anaconda2\envs\obspy\python.exe -u -c "import setuptools,
 tokenize;__file__='c:\\users\\dell\\appdata\\local\\temp\\pip-enmsua-build\\set
up.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n',
 '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record c:\user
s\dell\appdata\local\temp\pip-acc7xy-record\install-record.txt --single-version-
externally-managed --compile" failed with error code 1 in c:\users\dell\appdata\
local\temp\pip-enmsua-build\

我是新的编码,不了解问题的根本原因。我该怎么办?

您应该在HashPy issue tracker上发布您的问题:

您好,欢迎光临。请将错误消息复制到此处并发送文本。我想当你上传图片时,系统已经给你写过了。错误消息应该是可搜索的。如果你不知道怎么做,读一些教程,比如Ok。代码如下:此处不适用,请单击问题下方的“编辑”来编辑问题。好啊非常感谢。对不起,我是新来的我又缩短了标题,太长了。该点是一个未解决的符号错误。错误代码LNK2001和LNK2019没有告诉我们更多,相信我,它们不必出现在标题中。它仍然可以在完整的错误输出中看到。此外,Python版本在标题中也不是必需的。从信息中可以明显看出这一点。