Incorrect check of SIP version during PyQt installation - macos

I have been trying to install PyQt on my mac (OSX 10.6.8), but I still having this problem:
When I try to install PyQt-mac-gpl-4.9.6, I get this
Error: This version of PyQt requires SIP v4.14.2 or later.
The weird thing is that when I want to check for sip version on the console and write
sip -V
,I get the correct version: 4.14.2
I have checked my PATH but non of the online tips that I have found have helped me. How do I fix this?

I would recommend checking to see if you have sip installed in different locations, with the newer version being in a path that is not at the head of your PATH.
mdfind -name sip | grep '/bin/'
This should tell you all of the sip binaries on your computer. Check the version of all of them, and then make sure that path is at the front of PATH
What it could actually be, regardless of it seeming like you only have one sip, is a leftover .pyc file that is getting picked up before your intended sip. Try this to confirm:
$ python
>>> import sipconfig
>>> print sipconfig
This will tell you where it is finding sipconfig. If it looks like the wrong spot, or if you check it and all that is left is the pyc file, remove it. Then your newer sip should be found properly.

I had a similar issue after installing sip 4.14.2 over a previous version of 4.13.1 on Mac OSX 10.7.4 and Python 2.7. Strangely, the version of sip from the command line was different from the version from the Python sipconfig module.
$ sip -V
4.14.2
$ python -c "import sipconfig; print sipconfig.version_to_string(sipconfig.Configuration().sip_version)"
4.13.1
I ran through the install again, this time with running the install step as 'sudo make install' and the two versions matched at 4.14.2 and the PyQt instal was successful.
$ cd ~/Downloads/sip-4.14.2/
$ python configure.py
$ make
$ sudo make install

Related

Download different version of grep in cygwin?

I'd like to download a different version of grep in Cygwin. Currently, I have version 2.21, but I'd like to get version 2.5.1 (this is what runs on Mac OS by default, and I'm more familiar with that).
I obviously don't want to run the entire setup again. Is there a way to get the Mac OS version (i.e. 2.5.1) without running setup all over again? Thanks. <3
Compiling is always a possible choice: grep lives here: ftp://ftp.gnu.org/gnu/grep/, and given the tarball (ftp://ftp.gnu.org/gnu/grep/grep-2.5.1.tar.gz),
tar xf 2.5.1.tar.gz
cd 2.5.1
./configure
make && make install
(this will probably install into /usr/local/bin — you should read the instructions, e.g., the --prefix option to suit your own needs).
That assumes you are developing, and have installed gcc (the Cygwin setup program helps in that case).

how to install libX11 on OSx 10.9?

I am trying to install ROOT (cern.root.ch). When I run ./configure , I get a message that libX11 is missing and must be installed.
I did some research and found that I need to install
) XQuartz (I already have the latest version.)
) Command line tools in Xcode.
I tried installing Command Line Tools from apple's developer website. The installation goes through smoothly but how do I know whether it has been installed? I still get libX11 missing error with root's configure command.
I also tried xcode-select --install and it once went through smoothly and then later again gives error saying this package is no longer maintained - or something of that sort.
I understand I may have multiple installations... But I am still facing the problem of not having libX11 and not being able to install ROOT.
Thanks,
Hershal.
This link and the one referenced in it suggests you use homebrew (brew) to install it
$ ruby <(curl -fsS https://raw.github.com/mxcl/homebrew/go)
$ brew doctor
Remember to add the Homebrew directory to your PATH by adding the directory (found with brew --prefix) to your .bashrc, .zshrc or whatever shell file you’re using (.bashrc is the OS X default). We’ll also add the XQuartz binaries to the PATH in case anything needs them in the future.
export PATH=/usr/local/bin:/opt/X11/bin:$PATH
Start a new Terminal session to pick up the changes.
Now that Homebrew is installed, we can use it to install the required dependencies. Each may take some time as Homebrew generally compiles from source.
$ brew install gfortran # Fortran compiler
$ brew install python # Python interpreter
$ brew install pcre # Regular Expressions library
$ brew install fftw # Fast Fourier Transforms
$ brew install cmake # Cross-platform make
install root
$ brew tap homebrew/science
$ brew install --with-cocoa root
You don't say whether you have installed XCode as well as the commandline tools but I think you will need it

How do I install ack on OS X (10.8.4)?

I am new to OS X and I am unable to figure out how to install ack. The instructions here didn't help, because the command "install" is failing. Please guide me proper commands.
So far, I have downloaded ack 2.04 and placed it in the /usr/bin folder and then ran perl Makefile.PL successfully. The next command install isn't working for me.
If you use Homebrew you can simply do:
$ brew install ack
If you are new to OSX I highly recommend this approach because it makes installation of stuff like this MUCH easier. It is a package manager for OSX.
Homebrew link: http://brew.sh/
You can also use the MacPorts installer for OSX:
sudo port install p5.<nn>-app-ack
where <nn> is the version of your Perl installation (Ack is written in Perl). If you don't know the version of Perl you have installed, just type:
perl --version
and you'll know what you need for the port command. The Ack installation page has the information you need for this. More information about MacPorts can be found here.
Searching the web, you'll find LOTS of opinions about Homebrew versus MacPorts. I've used both; they both work (and both fail occasionally - installation of this kind is complex). You'll need to pick one or the other and stick with it as Homebrew doesn't play nicely with MacPorts (or vice versa, depending on your POV). Overriding choice for me is MacPorts as it has many more packages than Homebrew and it puts its stuff in /opt/local to stay out of the way of other programs. YMMV

Perl & CPAN upgrade help for OS X

Here is my problem. I am running OS X v10.7 (Lion) and want to set up an old Perl program I have written (was then using a Windows System with ActivePerl and then its ppm).
I read to use CPAN to install Perl modules (I am trying to install the Graph module). Whenever I tried to install it, it failed from a refused connection. Why? So I read that I should run the following to update CPAN and fix any broken links:
cpan> install Bundle:CPAN
cpan> reload cpan
cpan> index cpan
cpan> exit
However, after doing this I am stuck with this every time I try to do a CPAN install or upgrade:
New CPAN.pm version (v1.9800) available.
[Currently running version is v1.9456]
You might want to try
install CPAN
reload cpan
to both upgrade CPAN.pm and run the new version without leaving
the current session.
I was trying to use the default Perl stuff that is included in OS X rather than downloading ActivePerl. How do I fix CPAN and install the Graph Module?
PS: Running install CPAN and reload CPAN didn't do anything, but it generated the same message.
UPDATE
I was able to upgrade to v1.9800 doing a manual install (make, install) through the terminal. But I am still unable to install the Graph Module. Here is what I am getting:
http://cloud.jjnford.com/3D1C1H4217222b1p1O3a
UPDATE - PROBLEM SOLVED
I was finally able to solve the problem. I just moved the /User/jj/.cpan directory to User/jj/.cpan_bak and then reconfigured CPAN and the Graph Module installed with no fuss.
To solve this problem, do a manual upgrade of CPAN (apparently on OS X CPAN has trouble upgrading itself). You can download the source from here. After you have downloaded it uncompress it, create the make file from the Perl script, then run a make test, and finally if all goes well a make install.
$> tar -xvxf CPAN-1.9800
$> cd CPAN-1.9800
$> perl Makefile.PL
$> make
$> make test
$> make install
Now get rid of your old CPAN configuration:
$> mv ~/.cpan ~/.cpan.bak
Now when you run CPAN from the terminal you should be prompted for the configuration again. Once this is complete and CPAN has started you will notice this:
cpan shell -- CPAN exploration and modules installation (v1.9800)
So CPAN is now upgraded and working, and in my case I installed the Graph Module:
$cpan> install Graph
And everything works fine. I hope this helps somebody.
I have a fresh Mac OS X Lion and I updated CPAN without problems.
Installing XCode is not enough. Make, gcc, g++ are not installed by default.
To install them, one has to:
Start XCode, go to XCode->Preferences->Downloads and install component named "Command Line Tools".
I know this was solved, but do consider using "cpanminus" instead next time. It's faster and could save you a lot of hassle. You can either install App:cpanminus using cpanminus (see: App::cpanminus):
curl -L http://cpanmin.us | perl - --sudo App::cpanminus
And then to install any module and its dependencies simply run:
cpanm <module>
Alternatively you could use it directly from the web:
curl -L http://cpanmin.us | perl - --sudo <module>
I use it on my OS X Lion, and it works perfectly :)
Please excuse me for replying to this old post.
I had the same issue as the OP. Once I corrected the command to contain two colons instead of one (i.e. - Bundle::CPAN vs Bundle:CPAN), it worked as expected.

Using Google App Engine SDK with Python 2.7 on Mac OS X 10.6

I need to run Python 2.7 on my Mac Snow Leopard, which has Python 2.6 installed. According to this answer, running the Python 2.7 mpkg installer from Python.org should get me there.
The reason I need to do this is that I'm trying to run the Google App Engine SDK for the Python 2.7 runtime.
After installing Python 2.7, I'm still getting the following warning in my GAE server log:
Warning: You are using a Python runtime (2.6) that is older than the
production runtime environment (2.7).
What else must I do to get the GAE SDK to recognize the new Python version?
EDIT 2:
Running:
$ sudo find / -name python2.7
I get:
/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7
/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7
/usr/local/bin/python2.7
According to the answers I went into GoogleAppLauncher -> Preferences and set the Python path to each of these, and each time I get the exact same error.
Running dev_appserver with the following flags:
--admin_console_server= --port=8081 Python command: /Library/Frameworks/Python.framework/Versions/2.7 2011-11-14
16:12:24.726 GoogleAppEngineLauncher[57590:203] *** NSTask: Task
create for path '/Library/Frameworks/Python.framework/Versions/2.7'
failed: 22, "Invalid argument". Terminating temporary process.
Another Wierd thing is, it always tries to resolve to the same path, no matter which of those I plug in; It always reverts to /Library/Frameworks/Python.framework/Versions/2.7
EDIT 3:
OK, after entering the paths into the prefs field repeatedly, I finally just cleared it out, and somehow it's now pointing to the right place:
Running dev_appserver with the following flags:
--admin_console_server= --port=8081
Python command: /usr/local/bin/python2.7
Open the GAE launcher preferences and set the Python Path option to the fresh installed Python 2.7, in your case /usr/local/bin/python2.7 .
Came across this question looking for a solution to the same dilemma regarding Mac, GAE and Python.
One comment I would like to make regarding setting the Python path using GAE Preferences. I notice you mention that you had a problem setting the Python path using the Preferences. I discovered that after editing the path, you have to press Enter. Otherwise, the path doesn't get updated. This might explain the weirdness you were mentioning when trying to edit the path field.
I installed python 2.7.x from macports. I see this:
$ python --version
Python 2.7.2
$ which python
/opt/local/bin/python
So, in the preferences for GoogleAppEngineLauncher.app I set the python path to:
/opt/local/bin/python
In the console log, I see this:
*** Running dev_appserver with the following flags:
--admin_console_server= --port=8081
Python command: /opt/local/bin/python
I still see some errors about libraries, in particular Can't open zipfile...setuptools but simple stuff at least seems to work.
Good luck!
I am not sure if it helps, but instead of using the binaries from Python, I used MacPorts http://www.macports.org/ and installed the Python 2.7 runtime:
sudo port install python27

Resources