Giter Site home page Giter Site logo

Comments (17)

ethanwhite avatar ethanwhite commented on July 20, 2024

We also need to figure out whether this is only a Mac issue or whether the same thing is happening for Windows and Linux. Have we been testing the other builds on both architectures? I've been testing Windows on 32-bit machines and Linux on 64-bit machines.

from retriever.

ethanwhite avatar ethanwhite commented on July 20, 2024

We may be able to use ARCHFLAGS to compile for different architectures.

from retriever.

ethanwhite avatar ethanwhite commented on July 20, 2024

I talked to Sean McMahon, who reported this. He had installed a 64-bit version of MySQL on his machine. He is going to see if simply installing a 32-bit version of MySQL will fix this.

from retriever.

karthik avatar karthik commented on July 20, 2024

I came here to add the error I got on my OSX (one I sent in as a ticket via the website) but it is exactly the same error as the screenshot. I rebuilt python at my end thinking that my MySQLdb (or dependencies) was broken for some reason but that doesn't appear to be the case.

from retriever.

ethanwhite avatar ethanwhite commented on July 20, 2024

Thanks Karthik. I'm glad it's just one (didn't have a chance to compare them last night). Are you running 64-bit OSX with 64-bit MySQL?

from retriever.

karthik avatar karthik commented on July 20, 2024

Yep, mine is a 64-bit version.

On Thursday, April 26, 2012 at 11:30 AM, Ethan White wrote:

Thanks Karthik. I'm glad it's just one (didn't have a chance to compare them last night). Are you running 64-bit OSX with 64-bit MySQL?


Reply to this email directly or view it on GitHub:
#38 (comment)

from retriever.

ethanwhite avatar ethanwhite commented on July 20, 2024

Thanks. I'm going to try to look at this this afternoon, hopefully tomorrow at the latest. You should be able to build it from source (https://github.com/weecology/retriever/raw/v1.3/retriever-src.tar.gz) without problems if you don't want to wait. You'll need 3 modules: setuptools, MySQLdb (which you already have), and xlrd (for at least a couple of datasets).

from retriever.

ethanwhite avatar ethanwhite commented on July 20, 2024

It looks like we can only reasonably support one architecture on a single box. It seems, based on a little searching, as if the majority of Macs at this point are 64-bit and since 2/2 of our known Mac users are on 64-bit machines I think we'll go ahead and make the switch barring objections. I've started switching our machine over and am running into the apparently common challenges of getting Python + MySQL working on Macs. Hopefully I'll have it up and running tomorrow and can reroll the mac app for testing.

from retriever.

ethanwhite avatar ethanwhite commented on July 20, 2024

Getting anything in Python working on 64-bit OSX turns out to be a series of rabbit holes. After a full day's work I think we're down to an 'I don't know where to look for the MySQL socket' issue, but I'm getting ready to head out out of town for a few days. I'll try to finish this up when I get back.

from retriever.

ethanwhite avatar ethanwhite commented on July 20, 2024

Well, this isn't looking promising. Basically getting a 64-bit Mac version of Python working with all of our key modules is very difficult. Any given module has a solution, but all of them at once has proven difficult. Here's what I've tried:

Option 1:
-MySQL 64-bit from .dmg
-Python 2.7 32/64-bit from .dmg
-Failed to get MySQLdb working using easy_install, pip, and building from source. The problem is that the architecture of inside the .egg is never x86_64 (i.e., file /path/to/...egg-tmp/_mysql.so always returns i386), even when I try forcing it with the solution at http://stackoverflow.com/questions/7335853/mysql-python-installation-problems-on-mac-os-x-lion.

Option 2 (MacPorts):
-MySQL 64-bit from .dmg
-Python 2.7 32/64-bit from MacPorts
-MySQLdb, pyscopg2, wxPython, py2app and all other modules from MacPorts
-Everything installs and building and running the retriever runs fine
-Building the package using 'python setup.py py2app' fails. The modification to the MacPorts conf file that I found for fixing the issue breaks the MySQLdb installation. In looking around this morning I found another option that is similar to the one I tried, but the modification to the .conf file is different (http://winswitch.org/dev/macos-macports.html).

Option 3 (Homebrew):
-MySQL 64-bit from Homebrew
-Python 2.7 32/64-bit from Homebrew
-MySQLdb, PyODBC, xlrd, py2app using the Brew's version of easy_install
-wxPython fails using easy_install, pip, and source. So, you need to install it using a development .dmg file following the instructions here - http://pastebin.com/TkFNvWRG. Path modification as described is necessary.
-psycopg2 fails to install using standard methods, there may be ways around this but...
-py2app fails anyway complaining about the wrong CPU, which I suspect indicates another architecture problem.
-note that I was pretty much spent at this point so it's possible there's a route through here that I didn't find

Option 4 (untried):
And just for good measure, here's another recommendation that involves a couple of hundred lines in the shell... (http://winswitch.org/dev/macosx.html).

Basically any time you search about installing MySQLdb, wxPython, or py2app, on 64-bit Mac you find a need for a lot of trickery to get them working, which is fine, but so far I haven't been able to find any approach that will work for all of our core modules.

Ben and I are going to chat about this today and he may take a crack at it, but if he can't get it working we will need: 1) someone else to build the package for us; 2) A recipe from someone who knows more about Macs for how to successfully build all of these modules together on a 64-bit Mac; or 3) to go back to supporting 32-bit and recommend that 64-bit users install from source on a MacPorts Python build (which I did manage to get working).

from retriever.

bendmorris avatar bendmorris commented on July 20, 2024

If the problem is MySQLdb, it might be worth trying an alternative library like PyMySQL.

from retriever.

ethanwhite avatar ethanwhite commented on July 20, 2024

I'm fine with trying a different db api module if you want. If you think this will be straightforward enough to try for the upcoming release then go for it. We probably want to split this one out on it's own branch so that we can test the build process on all 3 operating systems before putting it in master (just in case it breaks something on Windows or Linux).

from retriever.

bendmorris avatar bendmorris commented on July 20, 2024

I'm running tests with PyMySQL on Linux now. So far, it's working as a drop-in replacement to MySQLdb with no additional changes required. This afternoon I'll test it on Windows, then see if it solves our Mac problems.

from retriever.

bendmorris avatar bendmorris commented on July 20, 2024

No problems with PyMySQL on Ubuntu or Windows.

from retriever.

bendmorris avatar bendmorris commented on July 20, 2024

Was successful in building a 64-bit version with PyMySQL and MacPorts. 1.4 release will be 64-bit.

from retriever.

ethanwhite avatar ethanwhite commented on July 20, 2024

Three cheers for Ben!

from retriever.

ethanwhite avatar ethanwhite commented on July 20, 2024

UPDATE: This build failed in on all machines other than the build machine.

from retriever.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.