Reply
Thread Tools
Posts: 308 | Thanked: 62 times | Joined on Jun 2009 @ Turkiye
#1
hi everybody
i have a problem about installing pyserial module to my n810.
when i try to run:
python setup.py install
it says
no module named distutils.core

so..
it seems i'll need to install this pyserial module manually to python folders.
is it possible in maemo?

Last edited by McLightning; 2009-07-29 at 14:19.
 
mgoebel's Avatar
Posts: 52 | Thanked: 27 times | Joined on Mar 2008 @ Berlin, Germany
#2
I have a similar problem. Maybe you can help. It seems you know more thank me. Thank you!
__________________
My Blog: Markus Göbel's Tech News Comments.
 
Posts: 432 | Thanked: 645 times | Joined on Mar 2009
#3
Hi,

to use the setup.py of python applications you have to install the two packages, which you can do with apt-get (extras repository has to be added to the sources.list, or just activate it in the application manager):

Code:
apt-get install python2.5-distutils
apt-get install python2.5-setuptools
Then you can run

Code:
python2.5 setup.py install
You can decide if you do it in the SDK and just copy the built files into the python site-package folder or if you do it directly on the device. Afterwards run python and there import the module and that's it!

hope it helped you!

cheers daniel
 

The Following 4 Users Say Thank You to danielwilms For This Useful Post:
Posts: 308 | Thanked: 62 times | Joined on Jun 2009 @ Turkiye
#4
also it seems it is possible to run python scripts by placing same folder with the setup.py
for example
i placed miniterm.py file nearby the setup.py file
and now it's working
 
Posts: 432 | Thanked: 645 times | Joined on Mar 2009
#5
Originally Posted by McLightning View Post
also it seems it is possible to run python scripts by placing same folder with the setup.py
This has nothing to do with the setup.py, but that the python files you want to import are in the same folder as the setup.py. If you import something python tries first to get it from:

1) the same folder as you are in (done in your case),
2) if not 1) searches in the place which is given by the PYTHONPATH environment variable
3) if PYTHONPATH is not set, it searches in the standard path (/usr/lib/python...)

So that you could delete the setup.py and it would still work.

i placed miniterm.py file nearby the setup.py file
and now it's working
I recommend in your own interest to do it properly as I described in my first post. Otherwise I guarantee that you will run into problems, when you "install" the next module

Cheers Daniel
 

The Following 4 Users Say Thank You to danielwilms For This Useful Post:
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 19:14.