Skip to content

CI: build pandas on windows (appveyor) #5561

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

Closed
jreback opened this issue Nov 20, 2013 · 13 comments · Fixed by #8500
Closed

CI: build pandas on windows (appveyor) #5561

jreback opened this issue Nov 20, 2013 · 13 comments · Fixed by #8500
Labels
Admin Administrative tasks related to the pandas project Build Library building on various platforms CI Continuous Integration Windows Windows OS
Milestone

Comments

@jreback
Copy link
Contributor

jreback commented Nov 20, 2013

Here is a collection of build scripts/tools for windows:
a nice conda recipe:
https://github.com/rmcgibbo/python-appveyor-conda-example/blob/master/appveyor.yml

https://github.com/pydata/pandas/tree/master/scripts/windows_builder

I have found many confusing explanations/suggestion on the web on how to build python extensions on windows 32/64 bit. The following is very simple to build from master.

Follow the instructions on the following link to build on windows with a binary compat to the existing python. Bascially.

http://pybytes.com/pywavelets/dev/preparing_windows_build_environment.html#installing-windows-sdk-c-c-compiler

Essentially:

  • download the Microsoft SDK (you need the 64-bit one of you are on a 64-bit machine, even if you are going to want to build 32-bit builds); this is just the install kit. I used http://www.slysoft.com/en/virtual-clonedrive.html to mount the .iso and install it
  • open the CMD Shell (installed onto the start menu)
  • set the env variables (I just copy pasted, but you can make a bat file if you want). for either 32 or 64 bit.

you can then just

c:\python27\python.exe setup.py build_ext --inplace
c:\python27\scripts\nosetests pandas
@hayd
Copy link
Contributor

hayd commented Nov 20, 2013

(link to related discussion about windows builds: https://groups.google.com/forum/#!msg/numfocus/mVNakFqfpZg/m7b13PZEW1YJ)

@ghost
Copy link

ghost commented Nov 23, 2013

Note: You should compile extensions with the same compiler used for compiling your python binary.
That's VS2008 for py<=3.2, and VS2010 for py3.3.

https://github.com/cython/cython/wiki/64BitCythonExtensionsOnWindows

@WilliamQLiu
Copy link

Thanks for the link jreback. I've tried the MinGW C/C++ compiler, but haven't been able to build the dev version of pandas on a Windows 7 (64 bit), Python 2.7.6 version. I posted my steps on Stackoverflow here: http://stackoverflow.com/questions/21684814/python-compile-dev-build-on-windows The error I get is "collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1". Any suggestions?

@jreback
Copy link
Contributor Author

jreback commented Feb 14, 2014

never tried with that compiler, you can build with MS C++ compiler according to the instructions above. I posted a build script on #6324 (at the very bottom).

You have to have the environment exactly right.

Also I post updated binaries based on master at: http://pandas.pydata.org/pandas-build/dev/

@jreback
Copy link
Contributor Author

jreback commented Feb 14, 2014

AFAIK mingw only will build the 32-bit version

@WilliamQLiu
Copy link

Thanks, I think that was the issue!

On Fri, Feb 14, 2014 at 5:17 PM, jreback [email protected] wrote:

AFAIK mingw only will build the 32-bit version

Reply to this email directly or view it on GitHubhttps://github.com//issues/5561#issuecomment-35130533
.

@jreback
Copy link
Contributor Author

jreback commented Jul 9, 2014

https://github.com/ogrisel/python-appveyor-demo (its linked via the wiki as well).

I tried this out - seems to work well.

Any takers to have pandas work?

@jreback jreback added the CI label Jul 9, 2014
@jreback jreback modified the milestones: 0.15.0, Someday Jul 9, 2014
@jreback jreback changed the title How to build pandas on windows (both 64/32 bit) CI: build pandas on windows (appveyor) Jul 9, 2014
@jreback
Copy link
Contributor Author

jreback commented Jul 9, 2014

quick and dirty (works on 3.4): https://github.com/jreback/pandas/tree/appveyor

@cpcloud
Copy link
Member

cpcloud commented Jul 9, 2014

Related: I think we should seriously consider using miniconda. We could completely get rid of wheels!

@jreback
Copy link
Contributor Author

jreback commented Jul 9, 2014

yep I think their is an issue about that

go for it!

statsmodels does this already iirc

@jreback
Copy link
Contributor Author

jreback commented Jul 9, 2014

#6870

@jreback jreback modified the milestones: 0.15.0, 0.15.1 Aug 12, 2014
@jreback jreback modified the milestones: 0.15.0, 0.16.0 Oct 7, 2014
@gepcel
Copy link
Contributor

gepcel commented Nov 23, 2014

It took me a whole Sunday to make this work.

@jreback
Copy link
Contributor Author

jreback commented Dec 16, 2015

this finally works and passed on py 2.7/3.4/3.5

& we have a green badge: https://github.com/pydata/pandas

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Admin Administrative tasks related to the pandas project Build Library building on various platforms CI Continuous Integration Windows Windows OS
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants