3

So, id like to start serious python development, and its proven to be a big pain. Im not worried at all about the language itself; I like it well enough and I will have no problems picking it up. But the ecosystem is driving me crazy.

First I tried to get up and running under windows. I gave up on that after a few days, as 90% of packages dont include windows support / install instructions. So I switched to macosx, which people said was good for mac development.

More frustration ensues. Id like to use python as a matlab replacement and tool development platform, so spyderlib seems like an excellent tool. But now ive been busy trying to build pyqt on my mac for two days, to no avail, and im starting to question the wisdom of it all. Obviously, following several guides literally invariantly ends in cryptic errors. For which platform was this dependency built? What arcane compiler flags need to be set? I dont know and I dont care; why doesnt the installer figure it out? Oh wait, there isnt any... I want to USE these tools, not first completely reverse engineer them to find out how to build them.

There is a vast amount of implied knowledge in all the documentation I can find on these matters, both with regard to unix and pythonic quirks. Is there any way to scale this mountain, in a place with a managable learning curve? Right now I have no idea what im doing. Or should I go back to windows and try to coerce the unix packages I need into cooperation?

asked Mar 23, 2011 at 12:13
2
  • 1
    this is not really a question... Try be more specific if you want help... Commented Mar 23, 2011 at 12:18
  • Check out easy_install setuptools for help getting addons in a simpler fashion. Commented Mar 23, 2011 at 12:28

5 Answers 5

5

On Mac OS X, you can get spyder with macports. This should build everything needed.

If you prefer Windows, take a look at Python(x,y). It has a bunch of scientific tools pre-built, including spyder.

Finally, the Enthought Python distribution is worth considering for scientific work.

answered Mar 23, 2011 at 12:20
Sign up to request clarification or add additional context in comments.

7 Comments

+1 for the Python(x, y) suggestion. I find their wiki front page to be a better starting point for explaining the point of the package, though: code.google.com/p/pythonxy/wiki/Welcome
@ncoghlan Good tip! I've changed the link to your suggestion.
I love pythonXY (a single click and it just works? its almost like the 21th century!): problem is, its windows-only, and some of the libraries im interested in seem to show an active disregard for that platform. Their unix installation instructions seem fragile enough before spending a week, probably in vain, in porting them to windows. However, I just found this: lfd.uci.edu/~gohlke/pythonlibs Prebuilt windows binaries, for many python packages, including two of the ones I was wrestling with! PythonXY and M$ it is!
By the way; thanks for the macports suggestion; that looks pretty cool too! Im a little bit worried about being reliant upon their repository being updated, but the same goes for the windows binaries site I linked to. Thanks!
Do you happen to know of a similar tool for windows, by the way? I googled around a bit; found the same question a couple of times, but no answers... Guess windows is too dissimilar from unix for this to be feasible?
|
4

Have you tried ActivePython?

Why battle with compiling the modules yourself when you can get the pre-built packages from PyPM?

pypm install pyqt4 matplotlib scipy numpy

enter image description here

answered Mar 23, 2011 at 17:54

2 Comments

hmm seems pretty good too; thanks. I started building spyder using macports about six hours ago, and my i5 is still working on it. Thats just wrong (apologies to any unix fanboys). So far windows is the winner; it has meshpy up and running with a single mouseclick, and that still seems a long way off on any other platform. Neither activepython or macports includes meshpy.
For the record; the activepython install of pyqt4, and by extension, spyder, does not work. And yes, I did install every possible permutation of qt dependencies. No relevant error messages, obviously. This stuff reminds of the days of copying around dlls under windows 95 to get things working. They are not fond memories.
3

From my experience the best platform for kind of project you're describing is Linux. There you just install the libs you need from package manager and that's it. Binary packages, so compiling is not required.

If you want to stick with MacOS X, you should install either MacPorts or Fink. It's usually easy to use. Problem is, that things like Qt take forever to compile. But you won't be doing that very often.

As for installing Python modules, the best is PIP, which is very nice replacement for easy_install did does much more. Especially useful if you want virtualenv setup.

answered Mar 23, 2011 at 12:36

3 Comments

Ah yes, linux. I installed that (ubuntu) for this very purpose, it didnt recognize my wireless, then the second time I tried to boot it it died on me. But hey, the screen of death wasnt blue, that counts for something.
I suppose. But I also suspect linux isnt for me. I dont want to be bothered with my OS internals; I just want it to provide a high level interface to my hardware, and stay out of my way. I dont think linux can compete with win7 in that regard.
You're right, Linux isn't for you. You like fiddling with OS internals, compiling QT, editing HKEYs, interpreting BSODs. Definitely you don't get these on Linux. On Linux things just work.
3

This is nearly the exact opposite of my experience with Python on Windows. Python itself installs with a binary installer, most add-on packages support easy_install, others provide binary installers of their own. The IDE I use is SciTE, which uses the old DOS install model - copy the files to a directory and run the SciTE.exe file. If you get a source distribution of a Python package, go to the directory containing setup.py and run python setup.py install. Maybe that's the implied knowledge you're talking about.

You can also find many unofficial Windows binaries at http://www.lfd.uci.edu/~gohlke/pythonlibs/.

answered Mar 23, 2011 at 12:28

6 Comments

Many packages ive found contain custom installation instructions containing dozens of lines of unix-specific commands, that I wouldnt have clue how to port to a windows environment.
@Paul McGuire: +1, at least Python 2.7 on Vista with 30++ packages like numpy, scipy, sympy, networkx, ... runs very smoothly. Never had any installation problems. Thanks
@Eelco - you'll need to start naming names - which packages? You may just not be looking in the right place.
Oh all the default packages work just fine. But once I start digging a little deeper, I start running into clunckier territory real quickly. My concern is not so much with the libs I was struggeling with right now (meshpy, in particular), but with finding a setup that minimizes time wasted on such nonsense.
Christoph Gohlke's web page (see link added to end of my answer) includes 32- and 64-bit Windows install binaries for MeshPy.
|
0

I switched to Mac a few years ago and found that it took me quite a while of googling to properly install all the packages I needed for Python development. While I installed everything I made a list of the steps required to setup a functional system that may be appropriate for you as well. I usually use NetCDF4, HDF5, Numpy, Matplotlib, f2py, and Fortran in combination with Python. I published my list of 22 setup-steps for installing from source on my website. Installing from source is somewhat more time-consuming than using macports and fink, but enables you to have a working environment that is optimized for your system.

answered Apr 1, 2011 at 20:17

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.