[Pythonmac-SIG] Installing pychecker

Bob Ippolito bob at redivi.com
Wed Jan 28 15:29:54 EST 2004


On Jan 28, 2004, at 3:12 PM, Gary Robinson wrote:

> I've been doing quite a bit of python coding under OS X, but I'm still
> pretty unsophisticated about a lot of the "under the covers" stuff 
> about
> installers, etc. So to aid in my understanding, I am asking this 
> question
> here rather than just kluging up some sort of solution for myself.
>
> I ran
>
>    sudo python setup.py install
>
>
> and the setup script did a bunch of stuff and terminated normally.
>
> now, the pychecker instructions say:
>
>> To use PyChecker, pass options and the python source files (or 
>> packages) you
>> want to check on the command line:
>>
>>       pychecker file1.py file2.py ...
>>
>> pychecker and pychecker.bat will only exist if pychecker has been 
>> installed.
>> To install, do: python setup.py install
>
> Now, I have done the install. But if I type into the Terminal:
>
>     pychecker somefile.py
>
> I get an error because it can't find pychecker.
>
> So, I did some searching. I found that there is a pychecker at the 
> following
> location:
>
> /System/Library/Frameworks/Python.framework/Versions/2.3/bin/pychecker
>
> and this pychecker does do what pychecker is supposed to do.
>
> But, I can't just type "pychecker" in on the command line as the
> instructions say I should be able to do after installing it.
>
> If I do "echo $PATH" the directory containing pychecker is not on the 
> list.
> So of course, that's why pychecker isn't found. But...
>
> 1) Why do the instructions say I'll be able to run it from the command 
> line
> after running setup.py, if in fact, after running an apparently 
> successful
> install on OS X, you can't do so? Is it because under OS X pytchecker 
> ends
> up in an obscure "frameworks" directory whereas on other OS's it ends 
> up in
> a directory that's already on the PATH?

The documentation has no idea that your scripts directory is so far 
away from your PATH, it surely wasn't written for framework build OS X 
users.

> 2) What is the standard thing to do? Should I add that directory to my 
> PATH?
> Or should I add a hard link called "pychecker" from another directory 
> that
> IS in my PATH? Or is there some other, obvious, standard way of 
> handling it
> that a sophisticated user is supposed to understand?

Add it to you PATH, make a symlink, or use "python setup.py install 
--install-scripts=/usr/local/bin" .. there's no standard way to do it, 
I'm not sure this has even been discussed yet (recently?).  I've 
actually been thinking about changing the --install-scripts parameter 
to /usr/local/bin for my PackageManager repository.

-bob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2357 bytes
Desc: not available
Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20040128/6371e129/smime.bin


More information about the Pythonmac-SIG mailing list