Ok I did a **** 
I copied paste the setup.py example from the internet and 'email' was in 
excludes ...

----
For the record, i should change this line (i found the info on the internet) in 
my program in order to work:

    if getattr(sys, 'frozen', False):
        # frozen
        filePath = os.path.dirname(sys.executable)  
    else:
        # unfrozen
        filePath = os.path.dirname(os.path.realpath(__file__))
        
    #filePath = os.path.dirname(os.path.realpath(__file__))

------

Sorry, i didn't feel in confidence with cx_freeze as i have used only once.
I got a lesson for the next time :)

Have a nice day!






----- Mail original -----
> De: "Dimitrios Glentadakis" <dgl...@free.fr>
> À: "primary discussion list for use and development of cx_Freeze" 
> <cx-freeze-users@lists.sourceforge.net>
> Envoyé: Mercredi 27 Mai 2015 08:36:38
> Objet: Problem in urllib.request import
> 
> Hi, i built the exe with cx_freeze and when i launch the application
> i have an error in import urllib.request:
> "Import error: No module named email"
> 
> Python 3.4
> Pyqt5 program
> Install cx_freeze from here:
> http://www.lfd.uci.edu/~gohlke/pythonlibs/#cx_freeze
> cx_Freeze‑4.3.4‑cp34‑none‑win_amd64.whl
> (due a problem that i found the solution here:
> http://stackoverflow.com/questions/23920073/cx-freeze-error-python-34)
> 
> I tried with
> 
> import urllib.request
> 
> and with
> 
> from urllib.request import (
>     ProxyHandler, HTTPBasicAuthHandler, HTTPHandler, build_opener,
>     install_opener, urlopen
>     )
> 
> same result, cannot find the module "email"
> 
> The email module is present here:
> "C:\Python34\Lib\email"
> 
> 
> Thanks in advance for any suggestion
> 
> 
> --
> Dimitrios Glentadakis
> 

-- 
Dimitrios Glentadakis 

------------------------------------------------------------------------------
_______________________________________________
cx-freeze-users mailing list
cx-freeze-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cx-freeze-users

Reply via email to