[Tutor] Question regarding setup.py
Evert Rol
evert.rol at gmail.com
Fri Jan 27 11:17:27 CET 2012
> I had a question regarding installing packages that I posted a couple of days ago. But I'm re-sending the question again.. this time with output so that it is clearer.
>
> I am unable to install libraries using 'python setup.py install'
>
> Say that I'm installing a package "kando". I extract it and I'm currently in its directory:
>
> Output to dir:
> dir
> 11357 Aug 12 20:43:46 2011 COPYING.txt
> 2769 Aug 12 20:46:34 2011 PKG-INFO
> 1490 Aug 12 20:39:31 2011 README.txt
> 56 Aug 05 20:06:46 2011 kando
> 6362 Aug 12 20:35:23 2011 kando.py
> 868 Oct 20 17:48:00 2011 setup.py
>
> Next, I try and install kando and this is what I get:
>
> python setup.py install
> file kando.py (for module kando) not found
> file kando.py (for module kando) not found
> error: file '/var/sysmgr/vsh/kando' does not exist
> Thu Oct 20 18:35:01 UTC 2011
> running install
> running build
> running build_py
> running build_scripts
I assume you're running this in the unpacked directory (it's what you suggest, but I can't tell with 100% certainty.).
Then I can only think that the setup.py is misbehaving; the '/var/sysmgr/vsh/kando' mention suggests that.
Usually, certainly for small libraries (this seems to be one), these are relatively small, so perhaps you can post it?
Also, check the README file for any installation suggestions.
Alternatively, if the contents of the kando/ directory just contains Python files, you could copy-paste that whole directory into your Python library installation directory. The latter is system dependent, but should be relatively easy to find out.
Another thing I can think of that may cause problems, is that in the unpacked directory, there is both a kando directory (which presumably contains an __init__.py file) and a kando.py file.
> I guess the installer is not looking in the right path for the files to be installed as it cannot find kando.py although I can see it in the output of dir. This is not specific to just kando. I have tried installing arithmetic-0.5 and other packages.
> Can you please tell me how I can change the search path of the installer?
No, that's not how it works.
You just run python setup.py install in the directory, and Python will happily install the library correctly.
You can alter the *installation* path, using a flag like --prefix. Usually, I wouldn't recommend that.
Evert
> Thanks in advance.
>
> Thanks,
> San
>
> _______________________________________________
> Tutor maillist - Tutor at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
More information about the Tutor
mailing list