-
Notifications
You must be signed in to change notification settings - Fork 8
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
Windows 10 install? #17
Comments
Just uploaded wheels at http://www.lfd.uci.edu/~gohlke/pythonlibs/#fdint |
Trying to compile right now on Windows 10. It looks like it might be a Windows vs. Unix path (i.e. '\' vs '/') issue. @cgohlke Did you have to make any changes to the |
Yes, the names of the extensions should use |
@cgohlke Did you run into the following error when trying to test the package, and if so how did you fix it? Clearly my packaging experience on Windows is limited (i.e. nonexistent)...
Edit: Nevermind, it seems to work fine through powershell. Should have a new version out with the appropriate fixes soon. |
Fixed in v2.0.2 |
Too late for 2.0.2, but may I also suggest two other changes:
diff --git a/scripts/gen__vdfd_pyx.py b/scripts/gen__vdfd_pyx.py
index 0851608..bf45cf2 100644
--- a/scripts/gen__vdfd_pyx.py
+++ b/scripts/gen__vdfd_pyx.py
@@ -16,9 +16,9 @@ cpdef void vdfd{a}h(np.ndarray[double] phi, np.ndarray[double] out):
\'\'\'
Vectorized form of dfd{a}h.
\'\'\'
- cdef int imax = phi.shape[0]
+ cdef ssize_t imax = phi.shape[0]
assert imax == out.shape[0]
- cdef int i
+ cdef ssize_t i
for i in range(imax):
out[i] = dfd{a}h(phi[i])
'''.format(a=a))
diff --git a/scripts/gen__vdgfd_pyx.py b/scripts/gen__vdgfd_pyx.py
index 10913ce..ea3160e 100644
--- a/scripts/gen__vdgfd_pyx.py
+++ b/scripts/gen__vdgfd_pyx.py
@@ -17,10 +17,10 @@ cpdef void vdgfd{a}h(np.ndarray[double] phi, np.ndarray[double] beta,
\'\'\'
Vectorized form of dgfd{a}h.
\'\'\'
- cdef int imax = phi.shape[0]
+ cdef ssize_t imax = phi.shape[0]
assert imax == beta.shape[0]
assert imax == out.shape[0]
- cdef int i
+ cdef ssize_t i
for i in range(imax):
out[i] = dgfd{a}h(phi[i], beta[i])
'''.format(a=a))
diff --git a/scripts/gen__vdnonparabolic_pyx.py b/scripts/gen__vdnonparabolic_pyx.py
index 4c06283..9f35273 100644
--- a/scripts/gen__vdnonparabolic_pyx.py
+++ b/scripts/gen__vdnonparabolic_pyx.py
@@ -15,10 +15,10 @@ cpdef void vdnonparabolic(np.ndarray[double] phi, np.ndarray[double] alpha,
\'\'\'
Vectorized form of dnonparabolic.
\'\'\'
- cdef int imax = phi.shape[0]
+ cdef ssize_t imax = phi.shape[0]
assert imax == alpha.shape[0]
assert imax == out.shape[0]
- cdef int i
+ cdef ssize_t i
for i in range(imax):
out[i] = dnonparabolic(phi[i], alpha[i])
''')
\ No newline at end of file
diff --git a/scripts/gen__vfd_pyx.py b/scripts/gen__vfd_pyx.py
index a355bac..679404e 100644
--- a/scripts/gen__vfd_pyx.py
+++ b/scripts/gen__vfd_pyx.py
@@ -16,9 +16,9 @@ cpdef void vfd{a}h(np.ndarray[double] phi, np.ndarray[double] out):
\'\'\'
Vectorized form of fd{a}h.
\'\'\'
- cdef int imax = phi.shape[0]
+ cdef ssize_t imax = phi.shape[0]
assert imax == out.shape[0]
- cdef int i
+ cdef ssize_t i
for i in range(imax):
out[i] = fd{a}h(phi[i])
'''.format(a=a))
diff --git a/scripts/gen__vgfd_pyx.py b/scripts/gen__vgfd_pyx.py
index 6455a96..194a395 100644
--- a/scripts/gen__vgfd_pyx.py
+++ b/scripts/gen__vgfd_pyx.py
@@ -17,10 +17,10 @@ cpdef void vgfd{a}h(np.ndarray[double] phi, np.ndarray[double] beta,
\'\'\'
Vectorized form of gfd{a}h.
\'\'\'
- cdef int imax = phi.shape[0]
+ cdef ssize_t imax = phi.shape[0]
assert imax == beta.shape[0]
assert imax == out.shape[0]
- cdef int i
+ cdef ssize_t i
for i in range(imax):
out[i] = gfd{a}h(phi[i], beta[i])
'''.format(a=a))
diff --git a/scripts/gen__vifd_pyx.py b/scripts/gen__vifd_pyx.py
index 802984c..9200056 100644
--- a/scripts/gen__vifd_pyx.py
+++ b/scripts/gen__vifd_pyx.py
@@ -15,9 +15,9 @@ cpdef void vifd{a}h(np.ndarray[double] phi, np.ndarray[double] out):
\'\'\'
Vectorized form of ifd{a}h.
\'\'\'
- cdef int imax = phi.shape[0]
+ cdef ssize_t imax = phi.shape[0]
assert imax == out.shape[0]
- cdef int i
+ cdef ssize_t i
for i in range(imax):
out[i] = ifd{a}h(phi[i])
'''.format(a=a))
diff --git a/scripts/gen__vnonparabolic_pyx.py b/scripts/gen__vnonparabolic_pyx.py
index aa0e0ab..09d603d 100644
--- a/scripts/gen__vnonparabolic_pyx.py
+++ b/scripts/gen__vnonparabolic_pyx.py
@@ -15,10 +15,10 @@ cpdef void vnonparabolic(np.ndarray[double] phi, np.ndarray[double] alpha,
\'\'\'
Vectorized form of nonparabolic.
\'\'\'
- cdef int imax = phi.shape[0]
+ cdef ssize_t imax = phi.shape[0]
assert imax == alpha.shape[0]
assert imax == out.shape[0]
- cdef int i
+ cdef ssize_t i
for i in range(imax):
out[i] = nonparabolic(phi[i], alpha[i])
''')
\ No newline at end of file
diff --git a/fdint/examples/plot.py b/fdint/examples/plot.py
index 639f54b..5d1c0d6 100644
--- a/fdint/examples/plot.py
+++ b/fdint/examples/plot.py
@@ -49,7 +49,7 @@ def plot_fd_and_dfd():
fig, ax1 = plt.subplots()
prefix='fd'
ax1.set_title(prefix)
- for k2 in xrange(-9,22,2):
+ for k2 in range(-9,22,2):
k = k2/2.
k2s = str(k2).replace('-','m')
@@ -71,7 +71,7 @@ def plot_gfd_and_dgfd(beta):
fig, ax1 = plt.subplots()
prefix='gfd'
ax1.set_title(prefix+' beta='+str(beta))
- for k2 in xrange(-1,6,2):
+ for k2 in range(-1,6,2):
k = k2/2.
k2s = str(k2).replace('-','m')
|
Thanks. I'll try it out tomorrow. |
Thanks Scott,
I got it to work. When I installed fdint through pip, it upgrade me to numpy 1.12, but without MKL, so it initially didn't run. I manually downloaded numpy‑1.12.0+mkl‑cp27‑cp27m‑win_amd64.whl from Christoph's webpage, installed it through pip, then everything worked.
Let me know if you want some simulations or a beverage. I owe you one.
-Cory
From: Christoph Gohlke <[email protected]>
To: scott-maddox/fdint <[email protected]>
Cc: CoryWeber <[email protected]>; Author <[email protected]>
Sent: Sunday, February 26, 2017 3:40 PM
Subject: Re: [scott-maddox/fdint] Windows 10 install? (#17)
Too late for 2.0.2, but may I also suggest two other changes:
- use ssize_t type for indices and lengths. This fixes many compiler warnings of type conversion from 'npy_intp' to 'int', possible loss of data on 64-bit.:
diff --git a/scripts/gen__vdfd_pyx.py b/scripts/gen__vdfd_pyx.py
index 0851608..bf45cf2 100644
--- a/scripts/gen__vdfd_pyx.py
+++ b/scripts/gen__vdfd_pyx.py
@@ -16,9 +16,9 @@ cpdef void vdfd{a}h(np.ndarray[double] phi, np.ndarray[double] out):
\'\'\'
Vectorized form of dfd{a}h.
\'\'\'
- cdef int imax = phi.shape[0]
+ cdef ssize_t imax = phi.shape[0]
assert imax == out.shape[0]
- cdef int i
+ cdef ssize_t i
for i in range(imax):
out[i] = dfd{a}h(phi[i])
'''.format(a=a))
diff --git a/scripts/gen__vdgfd_pyx.py b/scripts/gen__vdgfd_pyx.py
index 10913ce..ea3160e 100644
--- a/scripts/gen__vdgfd_pyx.py
+++ b/scripts/gen__vdgfd_pyx.py
@@ -17,10 +17,10 @@ cpdef void vdgfd{a}h(np.ndarray[double] phi, np.ndarray[double] beta,
\'\'\'
Vectorized form of dgfd{a}h.
\'\'\'
- cdef int imax = phi.shape[0]
+ cdef ssize_t imax = phi.shape[0]
assert imax == beta.shape[0]
assert imax == out.shape[0]
- cdef int i
+ cdef ssize_t i
for i in range(imax):
out[i] = dgfd{a}h(phi[i], beta[i])
'''.format(a=a))
diff --git a/scripts/gen__vdnonparabolic_pyx.py b/scripts/gen__vdnonparabolic_pyx.py
index 4c06283..9f35273 100644
--- a/scripts/gen__vdnonparabolic_pyx.py
+++ b/scripts/gen__vdnonparabolic_pyx.py
@@ -15,10 +15,10 @@ cpdef void vdnonparabolic(np.ndarray[double] phi, np.ndarray[double] alpha,
\'\'\'
Vectorized form of dnonparabolic.
\'\'\'
- cdef int imax = phi.shape[0]
+ cdef ssize_t imax = phi.shape[0]
assert imax == alpha.shape[0]
assert imax == out.shape[0]
- cdef int i
+ cdef ssize_t i
for i in range(imax):
out[i] = dnonparabolic(phi[i], alpha[i])
''')
\ No newline at end of file
diff --git a/scripts/gen__vfd_pyx.py b/scripts/gen__vfd_pyx.py
index a355bac..679404e 100644
--- a/scripts/gen__vfd_pyx.py
+++ b/scripts/gen__vfd_pyx.py
@@ -16,9 +16,9 @@ cpdef void vfd{a}h(np.ndarray[double] phi, np.ndarray[double] out):
\'\'\'
Vectorized form of fd{a}h.
\'\'\'
- cdef int imax = phi.shape[0]
+ cdef ssize_t imax = phi.shape[0]
assert imax == out.shape[0]
- cdef int i
+ cdef ssize_t i
for i in range(imax):
out[i] = fd{a}h(phi[i])
'''.format(a=a))
diff --git a/scripts/gen__vgfd_pyx.py b/scripts/gen__vgfd_pyx.py
index 6455a96..194a395 100644
--- a/scripts/gen__vgfd_pyx.py
+++ b/scripts/gen__vgfd_pyx.py
@@ -17,10 +17,10 @@ cpdef void vgfd{a}h(np.ndarray[double] phi, np.ndarray[double] beta,
\'\'\'
Vectorized form of gfd{a}h.
\'\'\'
- cdef int imax = phi.shape[0]
+ cdef ssize_t imax = phi.shape[0]
assert imax == beta.shape[0]
assert imax == out.shape[0]
- cdef int i
+ cdef ssize_t i
for i in range(imax):
out[i] = gfd{a}h(phi[i], beta[i])
'''.format(a=a))
diff --git a/scripts/gen__vifd_pyx.py b/scripts/gen__vifd_pyx.py
index 802984c..9200056 100644
--- a/scripts/gen__vifd_pyx.py
+++ b/scripts/gen__vifd_pyx.py
@@ -15,9 +15,9 @@ cpdef void vifd{a}h(np.ndarray[double] phi, np.ndarray[double] out):
\'\'\'
Vectorized form of ifd{a}h.
\'\'\'
- cdef int imax = phi.shape[0]
+ cdef ssize_t imax = phi.shape[0]
assert imax == out.shape[0]
- cdef int i
+ cdef ssize_t i
for i in range(imax):
out[i] = ifd{a}h(phi[i])
'''.format(a=a))
diff --git a/scripts/gen__vnonparabolic_pyx.py b/scripts/gen__vnonparabolic_pyx.py
index aa0e0ab..09d603d 100644
--- a/scripts/gen__vnonparabolic_pyx.py
+++ b/scripts/gen__vnonparabolic_pyx.py
@@ -15,10 +15,10 @@ cpdef void vnonparabolic(np.ndarray[double] phi, np.ndarray[double] alpha,
\'\'\'
Vectorized form of nonparabolic.
\'\'\'
- cdef int imax = phi.shape[0]
+ cdef ssize_t imax = phi.shape[0]
assert imax == alpha.shape[0]
assert imax == out.shape[0]
- cdef int i
+ cdef ssize_t i
for i in range(imax):
out[i] = nonparabolic(phi[i], alpha[i])
''')
\ No newline at end of file
- Python 3 fix for the example:
diff --git a/fdint/examples/plot.py b/fdint/examples/plot.py
index 639f54b..5d1c0d6 100644
--- a/fdint/examples/plot.py
+++ b/fdint/examples/plot.py
@@ -49,7 +49,7 @@ def plot_fd_and_dfd():
fig, ax1 = plt.subplots()
prefix='fd'
ax1.set_title(prefix)
- for k2 in xrange(-9,22,2):
+ for k2 in range(-9,22,2):
k = k2/2.
k2s = str(k2).replace('-','m')
@@ -71,7 +71,7 @@ def plot_gfd_and_dgfd(beta):
fig, ax1 = plt.subplots()
prefix='gfd'
ax1.set_title(prefix+' beta='+str(beta))
- for k2 in xrange(-1,6,2):
+ for k2 in range(-1,6,2):
k = k2/2.
k2s = str(k2).replace('-','m')
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
I need to investigate the numpy+MKL issue. It worked for me on a fresh install, so it's not clear why MKL was required. Is it reasonable to require MKL? I'll open a separate issue for the issues brought up by cgohlke. |
No, I don't see why fdint would require numpy+MKL. Official numpy should work. |
I love this package and use it on Linux workstations at work, but would really like to get it working on my Windows laptop. Has anyone successfully installed this on Windows 10? If so, what Python, Numpy, and Scipy did you use?
I've tried it on Anaconda and with just Python 2.7.x with Numpy and Scipy packages from http://www.lfd.uci.edu/~gohlke/pythonlibs/, and both times it fails when calling Microsoft compilers. I have the Microsoft compiler for pythong installed.
The text was updated successfully, but these errors were encountered: