Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to install ttpy in Windows #89

Closed
appreciator opened this issue Nov 15, 2021 · 7 comments
Closed

How to install ttpy in Windows #89

appreciator opened this issue Nov 15, 2021 · 7 comments

Comments

@appreciator
Copy link

Hello. I hope to use ttpy in Anaconda for Win10 64bit.

If I run "pip install ttpy" in Anaconda Prompt, ttpy-1.2.1.tar.gz would be downloaded and compiled, then the folloing error occurs:

"internal compiler error: in conv_function_val, at fortran/trans-expr.c:3769
libbacktrace could not find executable to open
error: Command "C:\mingw64\bin\gfortran.exe -Wall -g -fno-second-underscore -O3 -funroll-loops -IC:\Users\Appreciator.conda\envs\FFT\lib\site-packages\numpy\core\include -Ibuild/temp.win-amd64-3.7 -Ibuild/temp.win-amd64-3.7 -Ibuild/temp.win-amd64-3.7 -IC:\Users\Appreciator.conda\envs\FFT\include -IC:\Users\Appreciator.conda\envs\FFT\include -c -c tt\tt-fort\print\dispmodule.f90 -o build\temp.win-amd64-3.7\tt\tt-fort\print\dispmodule.o -Jbuild\temp.win-amd64-3.7 -Ibuild\temp.win-amd64-3.7" failed with exit status 1"

The compiler I am using is MinGW-W64 GCC-8.1.0.

Would you mind telling me how to install ttpy in Win10 64bit? I would really appreciate your help.

@daskol
Copy link
Collaborator

daskol commented Nov 15, 2021

You are following the right installation steps. The issue is that there is a bug in GNU Fortran compiler. Try to use newer gfortran version or other compiler like Intel Fortran Compiler (see issue #60).

@daskol daskol closed this as completed Nov 15, 2021
@appreciator
Copy link
Author

Many thanks for your answer,Daniel.

I used gfortran 9.2 to compile ttpy, and got such an error:
sys/resource.h: No such file or directory

From this link https://stackoverflow.com/questions/63235674/python-sys-resource-h-no-such-file-or-directory-error-while-building-whl, it seems that it is because there should not be no such a file in Windows?

Would you mind kindly telling me how to resolve this problem? I would really appreciate your great help.

You are following the right installation steps. The issue is that there is a bug in GNU Fortran compiler. Try to use newer gfortran version or other compiler like Intel Fortran Compiler (see issue #60).

@daskol
Copy link
Collaborator

daskol commented Nov 15, 2021

Right. There is not sys/resource.h C header which is required by native components of ttpy. Consider installation of Cygwin (or MinGW) to get POSIX compatibility layer for Windows.

@daskol
Copy link
Collaborator

daskol commented Nov 15, 2021

I am not sure what is the concrete solution to your issues since I am not Windows user.

I have used MinGW, but it only provides sys/time.h, not provide resource.h.

The major difference between MingGW and Cygwin is that they provide different levels of compatibility. So, you can try to build with Cygwin.

However, when I used gcc 9.2 to compile it, I got such an error:

Symbol dcopy is built-in Fortrain routine. It is very odd that it is missing. Probably, missing BLAS library or OpenMP support can cause the compilation failure. Another potential reason is a bit length of integers (see ILP64 vs LP64).

@daskol
Copy link
Collaborator

daskol commented Nov 15, 2021

Sorry, it seems I have accidentally removed your previous comment.

@appreciator
Copy link
Author

Many thanks for your quick reply, Daniel. I am so sorry for bothering you.

I deleted my previous comment by myself, because I found that, when I directly downloaded ttpy-1.2.1.tar.gz from pypi and installed it by running "python setup.py install", the aforementioned error "collect2.exe: error: ld returned 1 exit status" also occurs.

Would you mind kindly telling me the correct way to install the ttpy-1.2.1.tar.gz in the local directory?

The compiler is MinGW with gcc 9.2.0. I sincerely hope to use ttpy in Windows. I would really appreacite your help.

Sorry, it seems I have accidentally removed your previous comment.

@daskol
Copy link
Collaborator

daskol commented Nov 16, 2021

The best way to get actual source code of ttpy is described here. As soon as repository is cloned and submodules are updated you can run pip install . (or any other command) in the root of the repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants