You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-user@hadoop.apache.org by devdoer bird <de...@gmail.com> on 2012/02/21 03:27:15 UTC

failed to import python package when using cacheArchive

HI:

I packed a python module to "mypackage.tar.gz" and upload it to hdfs ,then
visit the package with " -cacheArchive /app/mypackage.tar.gz#mypackage"


But the python script failed to "import mypacakge" , it throw the failed to
import exception " no module named mypacakge".


I need some help.

Thanks.

Re: failed to import python package when using cacheArchive

Posted by Marcos Ortiz <ml...@uci.cu>.
On 03/01/2012 10:42 PM, devdoer bird wrote:
> Does anyone can help?
>
> 2012/2/21 devdoer bird <devdoer2@gmail.com <ma...@gmail.com>>
>
>     HI:
>
>     I packed a python module to "mypackage.tar.gz" and upload it to
>     hdfs ,then visit the package with " -cacheArchive
>     /app/mypackage.tar.gz#mypackage"
>
>     But the python script failed to "import mypacakge" , it throw the
>     failed to import exception " no module named mypacakge".
>
>
>     I need some help.
>
>     Thanks.
>
>
Well, if you see, the correct name is mypackage, not mypacakge, like you 
posted here.
A advice:
In this site you can find all information for Python's packaging process.
http://docs.python.org/2.7/distutils/examples.html
Best wishes

-- 
Marcos Luis Ortíz Valmaseda
  Sr. Software Engineer (UCI)
  http://marcosluis2186.posterous.com
  http://postgresql.uci.cu/blog/38




Fin a la injusticia, LIBERTAD AHORA A NUESTROS CINCO COMPATRIOTAS QUE SE ENCUENTRAN INJUSTAMENTE EN PRISIONES DE LOS EEUU!
http://www.antiterroristas.cu
http://justiciaparaloscinco.wordpress.com

Re: failed to import python package when using cacheArchive

Posted by devdoer bird <de...@gmail.com>.
Does anyone can help?

2012/2/21 devdoer bird <de...@gmail.com>

> HI:
>
> I packed a python module to "mypackage.tar.gz" and upload it to hdfs ,then
> visit the package with " -cacheArchive /app/mypackage.tar.gz#mypackage"
>
>
> But the python script failed to "import mypacakge" , it throw the failed
> to import exception " no module named mypacakge".
>
>
> I need some help.
>
> Thanks.
>