Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #92628 > unrolled thread

Creating .exe file in Python

Started bysubhabrata.banerji@gmail.com
First post2015-06-15 04:42 -0700
Last post2015-06-17 08:30 -0700
Articles 20 on this page of 33 — 9 participants

Back to article view | Back to comp.lang.python


Contents

  Creating .exe file in Python subhabrata.banerji@gmail.com - 2015-06-15 04:42 -0700
    Re: Creating .exe file in Python Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-06-15 13:07 +0100
      Re: Creating .exe file in Python sohcahtoa82@gmail.com - 2015-06-15 10:09 -0700
    Re: Creating .exe file in Python Laura Creighton <lac@openend.se> - 2015-06-15 15:01 +0200
      Re: Creating .exe file in Python subhabrata.banerji@gmail.com - 2015-06-15 06:42 -0700
        Re: Creating .exe file in Python Laura Creighton <lac@openend.se> - 2015-06-15 16:44 +0200
    Re: Creating .exe file in Python subhabrata.banerji@gmail.com - 2015-06-15 07:03 -0700
      Re: Creating .exe file in Python subhabrata.banerji@gmail.com - 2015-06-15 07:40 -0700
    Re: Creating .exe file in Python subhabrata.banerji@gmail.com - 2015-06-15 09:11 -0700
      Re: Creating .exe file in Python Laura Creighton <lac@openend.se> - 2015-06-15 18:29 +0200
        Re: Creating .exe file in Python subhabrata.banerji@gmail.com - 2015-06-16 03:46 -0700
        Re: Creating .exe file in Python subhabrata.banerji@gmail.com - 2015-06-16 06:56 -0700
          Re: Creating .exe file in Python Laura Creighton <lac@openend.se> - 2015-06-16 17:04 +0200
            Re: Creating .exe file in Python subhabrata.banerji@gmail.com - 2015-06-16 08:17 -0700
              Re: Creating .exe file in Python Ian Kelly <ian.g.kelly@gmail.com> - 2015-06-16 10:00 -0600
              Re: Creating .exe file in Python Chris Angelico <rosuav@gmail.com> - 2015-06-17 02:03 +1000
                Re: Creating .exe file in Python subhabrata.banerji@gmail.com - 2015-06-16 09:23 -0700
                Re: Creating .exe file in Python subhabrata.banerji@gmail.com - 2015-06-17 06:10 -0700
                  Re: Creating .exe file in Python Chris Angelico <rosuav@gmail.com> - 2015-06-17 23:20 +1000
                    Re: Creating .exe file in Python hamilton <hamilton@nothere.com> - 2015-06-17 07:33 -0600
                      Re: Creating .exe file in Python Chris Angelico <rosuav@gmail.com> - 2015-06-17 23:52 +1000
                        Re: Creating .exe file in Python Steven D'Aprano <steve@pearwood.info> - 2015-06-18 01:39 +1000
                          Re: Creating .exe file in Python subhabrata.banerji@gmail.com - 2015-06-17 08:46 -0700
                          Re: Creating .exe file in Python Chris Angelico <rosuav@gmail.com> - 2015-06-18 01:58 +1000
                      Re: Creating .exe file in Python random832@fastmail.us - 2015-06-17 10:17 -0400
                        Re: Creating .exe file in Python subhabrata.banerji@gmail.com - 2015-06-17 07:30 -0700
                      Re: Creating .exe file in Python Chris Angelico <rosuav@gmail.com> - 2015-06-18 00:38 +1000
                    Re: Creating .exe file in Python subhabrata.banerji@gmail.com - 2015-06-17 06:33 -0700
                  Re: Creating .exe file in Python Laura Creighton <lac@openend.se> - 2015-06-17 15:54 +0200
                    Re: Creating .exe file in Python subhabrata.banerji@gmail.com - 2015-06-17 07:04 -0700
    Re: Creating .exe file in Python subhabrata.banerji@gmail.com - 2015-06-17 07:16 -0700
      Re: Creating .exe file in Python Laura Creighton <lac@openend.se> - 2015-06-17 17:21 +0200
        Re: Creating .exe file in Python subhabrata.banerji@gmail.com - 2015-06-17 08:30 -0700

Page 1 of 2  [1] 2  Next page →


#92628 — Creating .exe file in Python

Fromsubhabrata.banerji@gmail.com
Date2015-06-15 04:42 -0700
SubjectCreating .exe file in Python
Message-ID<349bb66f-bd3c-47ec-bd1d-35f46d23cf95@googlegroups.com>
Dear Group,

I am trying to learn how to create .exe file for Python. I tried to work around 
http://www.py2exe.org/index.cgi/Tutorial of Py2exe. The sample program went nice.
But if I try to make exe for larger programs with methods and classes I am getting error. 

If any one of the esteemed members may kindly suggest how to work out. 
I am using Python2.7+ on Windows 7 Professional. 

Regards,
Subhabrata Banerjee. 

[toc] | [next] | [standalone]


#92629

FromMark Lawrence <breamoreboy@yahoo.co.uk>
Date2015-06-15 13:07 +0100
Message-ID<mailman.483.1434370085.13271.python-list@python.org>
In reply to#92628
On 15/06/2015 12:42, subhabrata.banerji@gmail.com wrote:
> Dear Group,
>
> I am trying to learn how to create .exe file for Python. I tried to work around
> http://www.py2exe.org/index.cgi/Tutorial of Py2exe. The sample program went nice.
> But if I try to make exe for larger programs with methods and classes I am getting error.
>
> If any one of the esteemed members may kindly suggest how to work out.
> I am using Python2.7+ on Windows 7 Professional.
>
> Regards,
> Subhabrata Banerjee.
>

I'm awfully sorry but both my main and backup crystal balls are being 
repaired due to overuse.  "I am getting error" is about as much use as a 
wet fart in a thunderstorm.  So given that I never much liked guessing 
games anyway as I'm not much good at them, how about telling us 
precisely what error you're getting.  In that way one or more of our 
most esteemed colleagues might be able to help.

-- 
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence

[toc] | [prev] | [next] | [standalone]


#92642

Fromsohcahtoa82@gmail.com
Date2015-06-15 10:09 -0700
Message-ID<0c30ab1a-3b52-4279-b13c-19b8635b0dd8@googlegroups.com>
In reply to#92629
On Monday, June 15, 2015 at 5:08:58 AM UTC-7, Mark Lawrence wrote:
> On 15/06/2015 12:42, subhabrata.banerji@gmail.com wrote:
> > Dear Group,
> >
> > I am trying to learn how to create .exe file for Python. I tried to work around
> > http://www.py2exe.org/index.cgi/Tutorial of Py2exe. The sample program went nice.
> > But if I try to make exe for larger programs with methods and classes I am getting error.
> >
> > If any one of the esteemed members may kindly suggest how to work out.
> > I am using Python2.7+ on Windows 7 Professional.
> >
> > Regards,
> > Subhabrata Banerjee.
> >
> 
> I'm awfully sorry but both my main and backup crystal balls are being 
> repaired due to overuse.  "I am getting error" is about as much use as a 
> wet fart in a thunderstorm.  So given that I never much liked guessing 
> games anyway as I'm not much good at them, how about telling us 
> precisely what error you're getting.  In that way one or more of our 
> most esteemed colleagues might be able to help.
> 
> -- 
> My fellow Pythonistas, ask not what our language can do for you, ask
> what you can do for our language.
> 
> Mark Lawrence

"as much use as a wet fart in a thunderstorm"

I gotta remember that one.  :-D

But on topic...I really don't understand what makes people think we can *possibly* help them by only saying "I'm getting an error" without saying what the error is.

I mean, even before I ever became a programmer, I knew that if I needed help fixing something, I needed to give as much information as I could.  Exact error messages, detailed description of what I was doing, what I've done to try to fix it, etc.

[toc] | [prev] | [next] | [standalone]


#92630

FromLaura Creighton <lac@openend.se>
Date2015-06-15 15:01 +0200
Message-ID<mailman.484.1434373285.13271.python-list@python.org>
In reply to#92628
In a message of Mon, 15 Jun 2015 04:42:09 -0700, subhabrata.banerji@gmail.com w
rites:
>Dear Group,
>
>I am trying to learn how to create .exe file for Python. I tried to work around 
>http://www.py2exe.org/index.cgi/Tutorial of Py2exe. The sample program went nice.
>But if I try to make exe for larger programs with methods and classes I am getting error. 
>
>If any one of the esteemed members may kindly suggest how to work out. 
>I am using Python2.7+ on Windows 7 Professional. 
>
>Regards,
>Subhabrata Banerjee. 

1. Post the error.

2. I have always had better luck with PyInstaller than with py2exe
   https://github.com/pyinstaller/pyinstaller/wiki

Laura

[toc] | [prev] | [next] | [standalone]


#92633

Fromsubhabrata.banerji@gmail.com
Date2015-06-15 06:42 -0700
Message-ID<c257d498-fb90-4206-9dee-72f80456fd9d@googlegroups.com>
In reply to#92630
On Monday, June 15, 2015 at 6:32:33 PM UTC+5:30, Laura Creighton wrote:
> In a message of Mon, 15 Jun 2015 04:42:09 -0700,  w
> rites:
> >Dear Group,
> >
> >I am trying to learn how to create .exe file for Python. I tried to work around 
> >http://www.py2exe.org/index.cgi/Tutorial of Py2exe. The sample program went nice.
> >But if I try to make exe for larger programs with methods and classes I am getting error. 
> >
> >If any one of the esteemed members may kindly suggest how to work out. 
> >I am using Python2.7+ on Windows 7 Professional. 
> >
> >Regards,
> >Subhabrata Banerjee. 
> 
> 1. Post the error.
> 
> 2. I have always had better luck with PyInstaller than with py2exe
>    https://github.com/pyinstaller/pyinstaller/wiki
> 
> Laura
Dear Group,

I wrote a script as NLQ3. py 

the code is written as, 

import nltk
import itertools 
def nlq3(n):
    inp=raw_input("Print Your Query:")
    tag=nltk.pos_tag(nltk.wordpunct_tokenize(inp))
    print "The Tagged Value Is:",tag
    noun=[word[0] for word in tag if 'NN' in word[1]]
    #print noun
    #COMBINATION OF ALL ELEMENTS
    for i in xrange(1,len(noun)+1):
        comb= list(itertools.combinations(noun,i))
        for i,v in enumerate(comb):
            #print v
            v1=list(v)
            print v1

I tried to call it as,
C:\Tutorial>python hello.py
...
as 

C:\Python27>python NLQ3.py

C:\Python27>

But I am not getting any output.

Next I tried to create setup.py as,

from distutils.core import setup
import py2exe
setup(console=['NLQ3.py'])

and trying to work out as,


C:\Python27>python setup.py install
running install
running build
running install_egg_info
Removing C:\Python27\Lib\site-packages\UNKNOWN-0.0.0-py2.7.egg-info
Writing C:\Python27\Lib\site-packages\UNKNOWN-0.0.0-py2.7.egg-info

C:\Python27>

Now, 
as I am giving 
C:\Python27>python setup.py py2exe

it is giving me the following result,
running py2exe
*** searching for required modules ***
*** parsing results ***
creating python loader for extension 'scipy.optimize.minpack2' (C:\Python27\lib\
site-packages\scipy\optimize\minpack2.pyd -> scipy.optimize.minpack2.pyd)
creating python loader for extension 'numpy.core.umath' (C:\Python27\lib\site-pa
ckages\numpy\core\umath.pyd -> numpy.core.umath.pyd)
creating python loader for extension '_elementtree' (C:\Python27\DLLs\_elementtr
ee.pyd -> _elementtree.pyd)
creating python loader for extension 'matplotlib._path' (C:\Python27\lib\site-pa
ckages\matplotlib\_path.pyd -> matplotlib._path.pyd)
creating python loader for extension 'numpy.fft.fftpack_lite' (C:\Python27\lib\s
ite-packages\numpy\fft\fftpack_lite.pyd -> numpy.fft.fftpack_lite.pyd)
creating python loader for extension 'numpy.lib._compiled_base' (C:\Python27\lib
\site-packages\numpy\lib\_compiled_base.pyd -> numpy.lib._compiled_base.pyd)
creating python loader for extension 'scipy.optimize._minpack' (C:\Python27\lib\
site-packages\scipy\optimize\_minpack.pyd -> scipy.optimize._minpack.pyd)
creating python loader for extension '_ctypes' (C:\Python27\DLLs\_ctypes.pyd ->
_ctypes.pyd)
creating python loader for extension 'scipy.sparse.linalg.isolve._iterative' (C:
\Python27\lib\site-packages\scipy\sparse\linalg\isolve\_iterative.pyd -> scipy.s
parse.linalg.isolve._iterative.pyd)
creating python loader for extension 'sklearn.linear_model.sgd_fast' (C:\Python2
7\lib\site-packages\sklearn\linear_model\sgd_fast.pyd -> sklearn.linear_model.sg
d_fast.pyd)
creating python loader for extension 'scipy.stats._rank' (C:\Python27\lib\site-p
ackages\scipy\stats\_rank.pyd -> scipy.stats._rank.pyd)
creating python loader for extension 'select' (C:\Python27\DLLs\select.pyd -> se
lect.pyd)
creating python loader for extension 'scipy.sparse.csgraph._reordering' (C:\Pyth
on27\lib\site-packages\scipy\sparse\csgraph\_reordering.pyd -> scipy.sparse.csgr
aph._reordering.pyd)
creating python loader for extension 'unicodedata' (C:\Python27\DLLs\unicodedata
.pyd -> unicodedata.pyd)
creating python loader for extension 'scipy.special.specfun' (C:\Python27\lib\si
te-packages\scipy\special\specfun.pyd -> scipy.special.specfun.pyd)
creating python loader for extension 'scipy.spatial.qhull' (C:\Python27\lib\site
-packages\scipy\spatial\qhull.pyd -> scipy.spatial.qhull.pyd)
creating python loader for extension 'scipy.interpolate._ppoly' (C:\Python27\lib
\site-packages\scipy\interpolate\_ppoly.pyd -> scipy.interpolate._ppoly.pyd)
creating python loader for extension 'scipy.sparse.csgraph._tools' (C:\Python27\
lib\site-packages\scipy\sparse\csgraph\_tools.pyd -> scipy.sparse.csgraph._tools
.pyd)
creating python loader for extension 'scipy.interpolate.dfitpack' (C:\Python27\l
ib\site-packages\scipy\interpolate\dfitpack.pyd -> scipy.interpolate.dfitpack.py
d)
creating python loader for extension 'scipy.linalg._fblas' (C:\Python27\lib\site
-packages\scipy\linalg\_fblas.pyd -> scipy.linalg._fblas.pyd)
creating python loader for extension 'scipy.optimize._zeros' (C:\Python27\lib\si
te-packages\scipy\optimize\_zeros.pyd -> scipy.optimize._zeros.pyd)
creating python loader for extension 'scipy.stats.mvn' (C:\Python27\lib\site-pac
kages\scipy\stats\mvn.pyd -> scipy.stats.mvn.pyd)
creating python loader for extension 'sklearn.__check_build._check_build' (C:\Py
thon27\lib\site-packages\sklearn\__check_build\_check_build.pyd -> sklearn.__che
ck_build._check_build.pyd)
creating python loader for extension 'scipy.linalg._flinalg' (C:\Python27\lib\si
te-packages\scipy\linalg\_flinalg.pyd -> scipy.linalg._flinalg.pyd)
creating python loader for extension 'numpy.core.scalarmath' (C:\Python27\lib\si
te-packages\numpy\core\scalarmath.pyd -> numpy.core.scalarmath.pyd)
creating python loader for extension '_tkinter' (C:\Python27\DLLs\_tkinter.pyd -
> _tkinter.pyd)
creating python loader for extension 'scipy.integrate.lsoda' (C:\Python27\lib\si
te-packages\scipy\integrate\lsoda.pyd -> scipy.integrate.lsoda.pyd)
creating python loader for extension 'matplotlib._delaunay' (C:\Python27\lib\sit
e-packages\matplotlib\_delaunay.pyd -> matplotlib._delaunay.pyd)
creating python loader for extension 'scipy.optimize._slsqp' (C:\Python27\lib\si
te-packages\scipy\optimize\_slsqp.pyd -> scipy.optimize._slsqp.pyd)
creating python loader for extension 'scipy.optimize._nnls' (C:\Python27\lib\sit
e-packages\scipy\optimize\_nnls.pyd -> scipy.optimize._nnls.pyd)
creating python loader for extension 'scipy.stats.vonmises_cython' (C:\Python27\
lib\site-packages\scipy\stats\vonmises_cython.pyd -> scipy.stats.vonmises_cython
.pyd)
creating python loader for extension '_hashlib' (C:\Python27\DLLs\_hashlib.pyd -
> _hashlib.pyd)
creating python loader for extension 'bz2' (C:\Python27\DLLs\bz2.pyd -> bz2.pyd)

creating python loader for extension 'sklearn.svm.libsvm_sparse' (C:\Python27\li
b\site-packages\sklearn\svm\libsvm_sparse.pyd -> sklearn.svm.libsvm_sparse.pyd)
creating python loader for extension '_ssl' (C:\Python27\DLLs\_ssl.pyd -> _ssl.p
yd)
creating python loader for extension '_sqlite3' (C:\Python27\DLLs\_sqlite3.pyd -
> _sqlite3.pyd)
creating python loader for extension 'scipy.integrate._odepack' (C:\Python27\lib
\site-packages\scipy\integrate\_odepack.pyd -> scipy.integrate._odepack.pyd)
creating python loader for extension 'matplotlib._tri' (C:\Python27\lib\site-pac
kages\matplotlib\_tri.pyd -> matplotlib._tri.pyd)
creating python loader for extension 'scipy.sparse.csgraph._min_spanning_tree' (
C:\Python27\lib\site-packages\scipy\sparse\csgraph\_min_spanning_tree.pyd -> sci
py.sparse.csgraph._min_spanning_tree.pyd)
creating python loader for extension 'numpy.random.mtrand' (C:\Python27\lib\site
-packages\numpy\random\mtrand.pyd -> numpy.random.mtrand.pyd)
creating python loader for extension 'sklearn.metrics.cluster.expected_mutual_in
fo_fast' (C:\Python27\lib\site-packages\sklearn\metrics\cluster\expected_mutual_
info_fast.pyd -> sklearn.metrics.cluster.expected_mutual_info_fast.pyd)
creating python loader for extension 'scipy.stats.futil' (C:\Python27\lib\site-p
ackages\scipy\stats\futil.pyd -> scipy.stats.futil.pyd)
creating python loader for extension 'scipy.optimize.moduleTNC' (C:\Python27\lib
\site-packages\scipy\optimize\moduleTNC.pyd -> scipy.optimize.moduleTNC.pyd)
creating python loader for extension 'scipy.integrate.vode' (C:\Python27\lib\sit
e-packages\scipy\integrate\vode.pyd -> scipy.integrate.vode.pyd)
creating python loader for extension 'scipy.sparse.linalg.dsolve._superlu' (C:\P
ython27\lib\site-packages\scipy\sparse\linalg\dsolve\_superlu.pyd -> scipy.spars
e.linalg.dsolve._superlu.pyd)
creating python loader for extension 'matplotlib._image' (C:\Python27\lib\site-p
ackages\matplotlib\_image.pyd -> matplotlib._image.pyd)
creating python loader for extension 'scipy.integrate._quadpack' (C:\Python27\li
b\site-packages\scipy\integrate\_quadpack.pyd -> scipy.integrate._quadpack.pyd)
creating python loader for extension 'scipy.linalg._flapack' (C:\Python27\lib\si
te-packages\scipy\linalg\_flapack.pyd -> scipy.linalg._flapack.pyd)
creating python loader for extension 'scipy.interpolate.interpnd' (C:\Python27\l
ib\site-packages\scipy\interpolate\interpnd.pyd -> scipy.interpolate.interpnd.py
d)
creating python loader for extension 'numpy.core._sort' (C:\Python27\lib\site-pa
ckages\numpy\core\_sort.pyd -> numpy.core._sort.pyd)
creating python loader for extension '_yaml' (C:\Python27\lib\site-packages\_yam
l.pyd -> _yaml.pyd)
creating python loader for extension 'scipy.special._ellip_harm_2' (C:\Python27\
lib\site-packages\scipy\special\_ellip_harm_2.pyd -> scipy.special._ellip_harm_2
.pyd)
creating python loader for extension 'scipy.integrate._dop' (C:\Python27\lib\sit
e-packages\scipy\integrate\_dop.pyd -> scipy.integrate._dop.pyd)
creating python loader for extension 'sklearn.svm.liblinear' (C:\Python27\lib\si
te-packages\sklearn\svm\liblinear.pyd -> sklearn.svm.liblinear.pyd)
creating python loader for extension 'scipy.sparse.csgraph._traversal' (C:\Pytho
n27\lib\site-packages\scipy\sparse\csgraph\_traversal.pyd -> scipy.sparse.csgrap
h._traversal.pyd)
creating python loader for extension 'matplotlib._png' (C:\Python27\lib\site-pac
kages\matplotlib\_png.pyd -> matplotlib._png.pyd)
creating python loader for extension 'matplotlib.backends._backend_agg' (C:\Pyth
on27\lib\site-packages\matplotlib\backends\_backend_agg.pyd -> matplotlib.backen
ds._backend_agg.pyd)
creating python loader for extension 'pyexpat' (C:\Python27\DLLs\pyexpat.pyd ->
pyexpat.pyd)
creating python loader for extension 'matplotlib.ttconv' (C:\Python27\lib\site-p
ackages\matplotlib\ttconv.pyd -> matplotlib.ttconv.pyd)
creating python loader for extension 'scipy.sparse.linalg.eigen.arpack._arpack'
(C:\Python27\lib\site-packages\scipy\sparse\linalg\eigen\arpack\_arpack.pyd -> s
cipy.sparse.linalg.eigen.arpack._arpack.pyd)
creating python loader for extension 'scipy.sparse._sparsetools' (C:\Python27\li
b\site-packages\scipy\sparse\_sparsetools.pyd -> scipy.sparse._sparsetools.pyd)
creating python loader for extension 'sklearn.linear_model.cd_fast' (C:\Python27
\lib\site-packages\sklearn\linear_model\cd_fast.pyd -> sklearn.linear_model.cd_f
ast.pyd)
creating python loader for extension 'scipy.spatial.ckdtree' (C:\Python27\lib\si
te-packages\scipy\spatial\ckdtree.pyd -> scipy.spatial.ckdtree.pyd)
creating python loader for extension 'scipy.sparse.csgraph._shortest_path' (C:\P
ython27\lib\site-packages\scipy\sparse\csgraph\_shortest_path.pyd -> scipy.spars
e.csgraph._shortest_path.pyd)
creating python loader for extension 'scipy.linalg._clapack' (C:\Python27\lib\si
te-packages\scipy\linalg\_clapack.pyd -> scipy.linalg._clapack.pyd)
creating python loader for extension 'scipy.spatial._distance_wrap' (C:\Python27
\lib\site-packages\scipy\spatial\_distance_wrap.pyd -> scipy.spatial._distance_w
rap.pyd)
creating python loader for extension 'scipy.interpolate._fitpack' (C:\Python27\l
ib\site-packages\scipy\interpolate\_fitpack.pyd -> scipy.interpolate._fitpack.py
d)
creating python loader for extension 'matplotlib._cntr' (C:\Python27\lib\site-pa
ckages\matplotlib\_cntr.pyd -> matplotlib._cntr.pyd)
creating python loader for extension 'sklearn.metrics.pairwise_fast' (C:\Python2
7\lib\site-packages\sklearn\metrics\pairwise_fast.pyd -> sklearn.metrics.pairwis
e_fast.pyd)
creating python loader for extension 'numpy.core.multiarray' (C:\Python27\lib\si
te-packages\numpy\core\multiarray.pyd -> numpy.core.multiarray.pyd)
creating python loader for extension 'scipy.sparse._csparsetools' (C:\Python27\l
ib\site-packages\scipy\sparse\_csparsetools.pyd -> scipy.sparse._csparsetools.py
d)
creating python loader for extension 'matplotlib.ft2font' (C:\Python27\lib\site-
packages\matplotlib\ft2font.pyd -> matplotlib.ft2font.pyd)
creating python loader for extension '_multiprocessing' (C:\Python27\DLLs\_multi
processing.pyd -> _multiprocessing.pyd)
creating python loader for extension 'scipy.special._ufuncs' (C:\Python27\lib\si
te-packages\scipy\special\_ufuncs.pyd -> scipy.special._ufuncs.pyd)
creating python loader for extension 'scipy.optimize._lbfgsb' (C:\Python27\lib\s
ite-packages\scipy\optimize\_lbfgsb.pyd -> scipy.optimize._lbfgsb.pyd)
creating python loader for extension 'numpy.linalg.lapack_lite' (C:\Python27\lib
\site-packages\numpy\linalg\lapack_lite.pyd -> numpy.linalg.lapack_lite.pyd)
creating python loader for extension 'scipy.linalg._cblas' (C:\Python27\lib\site
-packages\scipy\linalg\_cblas.pyd -> scipy.linalg._cblas.pyd)
creating python loader for extension '_socket' (C:\Python27\DLLs\_socket.pyd ->
_socket.pyd)
creating python loader for extension 'sklearn.utils.sparsefuncs_fast' (C:\Python
27\lib\site-packages\sklearn\utils\sparsefuncs_fast.pyd -> sklearn.utils.sparsef
uncs_fast.pyd)
creating python loader for extension 'scipy.stats.statlib' (C:\Python27\lib\site
-packages\scipy\stats\statlib.pyd -> scipy.stats.statlib.pyd)
creating python loader for extension 'sklearn.utils.seq_dataset' (C:\Python27\li
b\site-packages\sklearn\utils\seq_dataset.pyd -> sklearn.utils.seq_dataset.pyd)
creating python loader for extension 'sklearn.utils.arrayfuncs' (C:\Python27\lib
\site-packages\sklearn\utils\arrayfuncs.pyd -> sklearn.utils.arrayfuncs.pyd)
creating python loader for extension 'sklearn.utils._logistic_sigmoid' (C:\Pytho
n27\lib\site-packages\sklearn\utils\_logistic_sigmoid.pyd -> sklearn.utils._logi
stic_sigmoid.pyd)
creating python loader for extension 'sklearn.svm.libsvm' (C:\Python27\lib\site-
packages\sklearn\svm\libsvm.pyd -> sklearn.svm.libsvm.pyd)
creating python loader for extension 'numpy.core._dotblas' (C:\Python27\lib\site
-packages\numpy\core\_dotblas.pyd -> numpy.core._dotblas.pyd)
creating python loader for extension 'sklearn.utils.murmurhash' (C:\Python27\lib
\site-packages\sklearn\utils\murmurhash.pyd -> sklearn.utils.murmurhash.pyd)
creating python loader for extension 'sklearn.utils._random' (C:\Python27\lib\si
te-packages\sklearn\utils\_random.pyd -> sklearn.utils._random.pyd)
creating python loader for extension 'scipy.optimize._cobyla' (C:\Python27\lib\s
ite-packages\scipy\optimize\_cobyla.pyd -> scipy.optimize._cobyla.pyd)
*** finding dlls needed ***
error: [Errno 2] No such file or directory: 'MSVCP90.dll'

Please suggest how may I fix the issue. 

Regards,
Subhabrata. 






[toc] | [prev] | [next] | [standalone]


#92638

FromLaura Creighton <lac@openend.se>
Date2015-06-15 16:44 +0200
Message-ID<mailman.486.1434379493.13271.python-list@python.org>
In reply to#92633
In a message of Mon, 15 Jun 2015 06:42:48 -0700, subhabrata.banerji@gmail.com w

>I wrote a script as NLQ3. py 
>
>the code is written as, 
>
>import nltk
>import itertools 
>def nlq3(n):
>    inp=raw_input("Print Your Query:")
>    tag=nltk.pos_tag(nltk.wordpunct_tokenize(inp))
>    print "The Tagged Value Is:",tag
>    noun=[word[0] for word in tag if 'NN' in word[1]]
>    #print noun
>    #COMBINATION OF ALL ELEMENTS
>    for i in xrange(1,len(noun)+1):
>        comb= list(itertools.combinations(noun,i))
>        for i,v in enumerate(comb):
>            #print v
>            v1=list(v)
>            print v1
>
>I tried to call it as,
>C:\Tutorial>python hello.py
>...
>as 
>
>C:\Python27>python NLQ3.py
>
>C:\Python27>
>
>But I am not getting any output.

You need to fix your script first, and package it later.
That you are not getting any output indicates that you have
a severe problem.  And you do.  There is no main function in
the code that you posted.  So I made 2 small changes.

First, you aren't using n in your nlq3.  So I changed the function
definition to it to.

def nlq3():

Then I added these lines to the very bottom of the file.

if __name__ == "__main__":
    nlq3()

My file is named nlq3.py and now python nlq3.py gives output.  This
is an improvement.  But the code is still wrong.

It gets to here:

 tag=nltk.pos_tag(nltk.wordpunct_tokenize(inp))

and nltk is very unhappy about this.


lac@smartwheels:~/python$ python nlq3.py
Print Your Query:hello
Traceback (most recent call last):
  File "nlq3.py", line 18, in <module>
    nlq3()
  File "nlq3.py", line 5, in nlq3
    tag=nltk.pos_tag(nltk.wordpunct_tokenize(inp))
  File "/usr/local/lib/python2.7/dist-packages/nltk/tag/__init__.py", line 103, in pos_tag
    tagger = load(_POS_TAGGER)
  File "/usr/local/lib/python2.7/dist-packages/nltk/data.py", line 781, in load
    opened_resource = _open(resource_url)
  File "/usr/local/lib/python2.7/dist-packages/nltk/data.py", line 895, in _open
    return find(path_, path + ['']).open()
  File "/usr/local/lib/python2.7/dist-packages/nltk/data.py", line 624, in find
    raise LookupError(resource_not_found)
LookupError: 
**********************************************************************
  Resource u'taggers/maxent_treebank_pos_tagger/english.pickle'
  not found.  Please use the NLTK Downloader to obtain the
  resource:  >>> nltk.download()
  Searched in:
    - '/home/lac/nltk_data'
    - '/usr/share/nltk_data'
    - '/usr/local/share/nltk_data'
    - '/usr/lib/nltk_data'
    - '/usr/local/lib/nltk_data'
    - u''
**********************************************************************

I don't know enough about nltk to know how to fix this.  You will have
to read nltk docs for that.  But get the code to work, first and
package it later, ok?

Laura

[toc] | [prev] | [next] | [standalone]


#92635

Fromsubhabrata.banerji@gmail.com
Date2015-06-15 07:03 -0700
Message-ID<ba82704b-ad7e-4d2b-840b-6b4932d83ef9@googlegroups.com>
In reply to#92628
On Monday, June 15, 2015 at 5:12:24 PM UTC+5:30, subhabrat...@gmail.com wrote:
> Dear Group,
> 
> I am trying to learn how to create .exe file for Python. I tried to work around 
> http://www.py2exe.org/index.cgi/Tutorial of Py2exe. The sample program went nice.
> But if I try to make exe for larger programs with methods and classes I am getting error. 
> 
> If any one of the esteemed members may kindly suggest how to work out. 
> I am using Python2.7+ on Windows 7 Professional. 
> 
> Regards,
> Subhabrata Banerjee.

I am also experimenting around Pyinstaller, cx_Freeze and Inno Studio. But not finding ample examples and manuals. 
Regards,
Subhabrata. 

[toc] | [prev] | [next] | [standalone]


#92637

Fromsubhabrata.banerji@gmail.com
Date2015-06-15 07:40 -0700
Message-ID<3d31bd2a-07e8-4ed4-82de-ad95571a5d5f@googlegroups.com>
In reply to#92635
On Monday, June 15, 2015 at 8:02:21 PM UTC+5:30, Thierry Chappuis wrote:
> Hi,
> 
> The question is why to you want to create an exe from your 
> python project?
> 
> Setuptools is capable to create small .exe launchers in the 
> Scripts dir of your python install. These launchers start a python script 
> and use the python interpreter registered on your platform. That's pretty 
> light and that's my prefered solution.
> 
> If installing the Python interpreter is an issue for the end 
> user, we can make the installer do it for him. Installer programs like Inno 
> Setup let you do it quite easily.
> 
> Kind regards
> 
> Thierry
> 
> 
> 
> On lun., juin 15, 2015 at 
> 4:10 PM,  <subhabrat...@gmail.com> 
> wrote:
> 
> 
> On Monday, June 15, 2015 at 
> 5:12:24 PM UTC+5:30, subhabrat...@gmail.com wrote:
> 
> 
> > Dear Group,
> 
> 
> > 
> 
> 
> > I am trying to learn how to create .exe file for Python. I tried to 
> work around 
> 
> 
> > http://www.py2exe.org/index.cgi/Tutorial of Py2exe. The sample program 
> went nice.
> 
> 
> > But if I try to make exe for larger programs with methods and classes 
> I am getting error. 
> 
> 
> > 
> 
> 
> > If any one of the esteemed members may kindly suggest how to work out. 
> 
> 
> 
> > I am using Python2.7+ on Windows 7 Professional. 
> 
> 
> > 
> 
> 
> > Regards,
> 
> 
> > Subhabrata Banerjee.
> 
> 
> 
> 
> 
> I am also experimenting around Pyinstaller, cx_Freeze and Inno Studio. But 
> not finding ample examples and manuals. 
> 
> 
> Regards,
> 
> 
> Subhabrata. 
> 
> 
> -- 
> 
> 
> https://mail.python.org/mailman/listinfo/python-list

Thank you for your kind reply. I have downloaded it, but no good tutorial. If you may send any. Regards, Subhabrata Banerjee. 

[toc] | [prev] | [next] | [standalone]


#92640

Fromsubhabrata.banerji@gmail.com
Date2015-06-15 09:11 -0700
Message-ID<2219d0b2-24a4-498b-b981-456faf0ceb44@googlegroups.com>
In reply to#92628
On Monday, June 15, 2015 at 5:12:24 PM UTC+5:30, subhabrat...@gmail.com wrote:
> Dear Group,
> 
> I am trying to learn how to create .exe file for Python. I tried to work around 
> http://www.py2exe.org/index.cgi/Tutorial of Py2exe. The sample program went nice.
> But if I try to make exe for larger programs with methods and classes I am getting error. 
> 
> If any one of the esteemed members may kindly suggest how to work out. 
> I am using Python2.7+ on Windows 7 Professional. 
> 
> Regards,
> Subhabrata Banerjee.

Dear Madam,

Thanks. Most of it is working except the last portion as I am giving 
python setup.py py2exe

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\Admin>cd\

C:\>cd Python27

C:\Python27>python NLQ3.py
Print Your Query:Java
The Tagged Value Is: [('Java', 'NNP')]
['Java']

C:\Python27>python NLQ3.py
Print Your Query:Obama is the president of USA
The Tagged Value Is: [('Obama', 'NNP'), ('is', 'VBZ'), ('the', 'DT'), ('presiden
t', 'NN'), ('of', 'IN'), ('USA', 'NNP')]
['Obama']
['president']
['USA']
['Obama', 'president']
['Obama', 'USA']
['president', 'USA']
['Obama', 'president', 'USA']

C:\Python27>python setup.py install
running install
running build
running install_egg_info
Removing C:\Python27\Lib\site-packages\UNKNOWN-0.0.0-py2.7.egg-info
Writing C:\Python27\Lib\site-packages\UNKNOWN-0.0.0-py2.7.egg-info

C:\Python27>python setup.py py2exe
running py2exe
*** searching for required modules ***
*** parsing results ***
creating python loader for extension 'scipy.optimize.minpack2' (C:\Python27\lib\
site-packages\scipy\optimize\minpack2.pyd -> scipy.optimize.minpack2.pyd)
creating python loader for extension 'numpy.core.umath' (C:\Python27\lib\site-pa
ckages\numpy\core\umath.pyd -> numpy.core.umath.pyd)
creating python loader for extension '_elementtree' (C:\Python27\DLLs\_elementtr
ee.pyd -> _elementtree.pyd)
creating python loader for extension 'matplotlib._path' (C:\Python27\lib\site-pa
ckages\matplotlib\_path.pyd -> matplotlib._path.pyd)
creating python loader for extension 'numpy.fft.fftpack_lite' (C:\Python27\lib\s
ite-packages\numpy\fft\fftpack_lite.pyd -> numpy.fft.fftpack_lite.pyd)
creating python loader for extension 'numpy.lib._compiled_base' (C:\Python27\lib
\site-packages\numpy\lib\_compiled_base.pyd -> numpy.lib._compiled_base.pyd)
creating python loader for extension 'scipy.optimize._minpack' (C:\Python27\lib\
site-packages\scipy\optimize\_minpack.pyd -> scipy.optimize._minpack.pyd)
creating python loader for extension '_ctypes' (C:\Python27\DLLs\_ctypes.pyd ->
_ctypes.pyd)
creating python loader for extension 'scipy.sparse.linalg.isolve._iterative' (C:
\Python27\lib\site-packages\scipy\sparse\linalg\isolve\_iterative.pyd -> scipy.s
parse.linalg.isolve._iterative.pyd)
creating python loader for extension 'sklearn.linear_model.sgd_fast' (C:\Python2
7\lib\site-packages\sklearn\linear_model\sgd_fast.pyd -> sklearn.linear_model.sg
d_fast.pyd)
creating python loader for extension 'scipy.stats._rank' (C:\Python27\lib\site-p
ackages\scipy\stats\_rank.pyd -> scipy.stats._rank.pyd)
creating python loader for extension 'select' (C:\Python27\DLLs\select.pyd -> se
lect.pyd)
creating python loader for extension 'scipy.sparse.csgraph._reordering' (C:\Pyth
on27\lib\site-packages\scipy\sparse\csgraph\_reordering.pyd -> scipy.sparse.csgr
aph._reordering.pyd)
creating python loader for extension 'unicodedata' (C:\Python27\DLLs\unicodedata
.pyd -> unicodedata.pyd)
creating python loader for extension 'scipy.special.specfun' (C:\Python27\lib\si
te-packages\scipy\special\specfun.pyd -> scipy.special.specfun.pyd)
creating python loader for extension 'scipy.spatial.qhull' (C:\Python27\lib\site
-packages\scipy\spatial\qhull.pyd -> scipy.spatial.qhull.pyd)
creating python loader for extension 'scipy.interpolate._ppoly' (C:\Python27\lib
\site-packages\scipy\interpolate\_ppoly.pyd -> scipy.interpolate._ppoly.pyd)
creating python loader for extension 'scipy.sparse.csgraph._tools' (C:\Python27\
lib\site-packages\scipy\sparse\csgraph\_tools.pyd -> scipy.sparse.csgraph._tools
.pyd)
creating python loader for extension 'scipy.interpolate.dfitpack' (C:\Python27\l
ib\site-packages\scipy\interpolate\dfitpack.pyd -> scipy.interpolate.dfitpack.py
d)
creating python loader for extension 'scipy.linalg._fblas' (C:\Python27\lib\site
-packages\scipy\linalg\_fblas.pyd -> scipy.linalg._fblas.pyd)
creating python loader for extension 'scipy.optimize._zeros' (C:\Python27\lib\si
te-packages\scipy\optimize\_zeros.pyd -> scipy.optimize._zeros.pyd)
creating python loader for extension 'scipy.stats.mvn' (C:\Python27\lib\site-pac
kages\scipy\stats\mvn.pyd -> scipy.stats.mvn.pyd)
creating python loader for extension 'sklearn.__check_build._check_build' (C:\Py
thon27\lib\site-packages\sklearn\__check_build\_check_build.pyd -> sklearn.__che
ck_build._check_build.pyd)
creating python loader for extension 'scipy.linalg._flinalg' (C:\Python27\lib\si
te-packages\scipy\linalg\_flinalg.pyd -> scipy.linalg._flinalg.pyd)
creating python loader for extension 'numpy.core.scalarmath' (C:\Python27\lib\si
te-packages\numpy\core\scalarmath.pyd -> numpy.core.scalarmath.pyd)
creating python loader for extension '_tkinter' (C:\Python27\DLLs\_tkinter.pyd -
> _tkinter.pyd)
creating python loader for extension 'scipy.integrate.lsoda' (C:\Python27\lib\si
te-packages\scipy\integrate\lsoda.pyd -> scipy.integrate.lsoda.pyd)
creating python loader for extension 'matplotlib._delaunay' (C:\Python27\lib\sit
e-packages\matplotlib\_delaunay.pyd -> matplotlib._delaunay.pyd)
creating python loader for extension 'scipy.optimize._slsqp' (C:\Python27\lib\si
te-packages\scipy\optimize\_slsqp.pyd -> scipy.optimize._slsqp.pyd)
creating python loader for extension 'scipy.optimize._nnls' (C:\Python27\lib\sit
e-packages\scipy\optimize\_nnls.pyd -> scipy.optimize._nnls.pyd)
creating python loader for extension 'scipy.stats.vonmises_cython' (C:\Python27\
lib\site-packages\scipy\stats\vonmises_cython.pyd -> scipy.stats.vonmises_cython
.pyd)
creating python loader for extension '_hashlib' (C:\Python27\DLLs\_hashlib.pyd -
> _hashlib.pyd)
creating python loader for extension 'bz2' (C:\Python27\DLLs\bz2.pyd -> bz2.pyd)

creating python loader for extension 'sklearn.svm.libsvm_sparse' (C:\Python27\li
b\site-packages\sklearn\svm\libsvm_sparse.pyd -> sklearn.svm.libsvm_sparse.pyd)
creating python loader for extension '_ssl' (C:\Python27\DLLs\_ssl.pyd -> _ssl.p
yd)
creating python loader for extension '_sqlite3' (C:\Python27\DLLs\_sqlite3.pyd -
> _sqlite3.pyd)
creating python loader for extension 'scipy.integrate._odepack' (C:\Python27\lib
\site-packages\scipy\integrate\_odepack.pyd -> scipy.integrate._odepack.pyd)
creating python loader for extension 'matplotlib._tri' (C:\Python27\lib\site-pac
kages\matplotlib\_tri.pyd -> matplotlib._tri.pyd)
creating python loader for extension 'scipy.sparse.csgraph._min_spanning_tree' (
C:\Python27\lib\site-packages\scipy\sparse\csgraph\_min_spanning_tree.pyd -> sci
py.sparse.csgraph._min_spanning_tree.pyd)
creating python loader for extension 'numpy.random.mtrand' (C:\Python27\lib\site
-packages\numpy\random\mtrand.pyd -> numpy.random.mtrand.pyd)
creating python loader for extension 'sklearn.metrics.cluster.expected_mutual_in
fo_fast' (C:\Python27\lib\site-packages\sklearn\metrics\cluster\expected_mutual_
info_fast.pyd -> sklearn.metrics.cluster.expected_mutual_info_fast.pyd)
creating python loader for extension 'scipy.stats.futil' (C:\Python27\lib\site-p
ackages\scipy\stats\futil.pyd -> scipy.stats.futil.pyd)
creating python loader for extension 'scipy.optimize.moduleTNC' (C:\Python27\lib
\site-packages\scipy\optimize\moduleTNC.pyd -> scipy.optimize.moduleTNC.pyd)
creating python loader for extension 'scipy.integrate.vode' (C:\Python27\lib\sit
e-packages\scipy\integrate\vode.pyd -> scipy.integrate.vode.pyd)
creating python loader for extension 'scipy.sparse.linalg.dsolve._superlu' (C:\P
ython27\lib\site-packages\scipy\sparse\linalg\dsolve\_superlu.pyd -> scipy.spars
e.linalg.dsolve._superlu.pyd)
creating python loader for extension 'matplotlib._image' (C:\Python27\lib\site-p
ackages\matplotlib\_image.pyd -> matplotlib._image.pyd)
creating python loader for extension 'scipy.integrate._quadpack' (C:\Python27\li
b\site-packages\scipy\integrate\_quadpack.pyd -> scipy.integrate._quadpack.pyd)
creating python loader for extension 'scipy.linalg._flapack' (C:\Python27\lib\si
te-packages\scipy\linalg\_flapack.pyd -> scipy.linalg._flapack.pyd)
creating python loader for extension 'scipy.interpolate.interpnd' (C:\Python27\l
ib\site-packages\scipy\interpolate\interpnd.pyd -> scipy.interpolate.interpnd.py
d)
creating python loader for extension 'numpy.core._sort' (C:\Python27\lib\site-pa
ckages\numpy\core\_sort.pyd -> numpy.core._sort.pyd)
creating python loader for extension '_yaml' (C:\Python27\lib\site-packages\_yam
l.pyd -> _yaml.pyd)
creating python loader for extension 'scipy.special._ellip_harm_2' (C:\Python27\
lib\site-packages\scipy\special\_ellip_harm_2.pyd -> scipy.special._ellip_harm_2
.pyd)
creating python loader for extension 'scipy.integrate._dop' (C:\Python27\lib\sit
e-packages\scipy\integrate\_dop.pyd -> scipy.integrate._dop.pyd)
creating python loader for extension 'sklearn.svm.liblinear' (C:\Python27\lib\si
te-packages\sklearn\svm\liblinear.pyd -> sklearn.svm.liblinear.pyd)
creating python loader for extension 'scipy.sparse.csgraph._traversal' (C:\Pytho
n27\lib\site-packages\scipy\sparse\csgraph\_traversal.pyd -> scipy.sparse.csgrap
h._traversal.pyd)
creating python loader for extension 'matplotlib._png' (C:\Python27\lib\site-pac
kages\matplotlib\_png.pyd -> matplotlib._png.pyd)
creating python loader for extension 'matplotlib.backends._backend_agg' (C:\Pyth
on27\lib\site-packages\matplotlib\backends\_backend_agg.pyd -> matplotlib.backen
ds._backend_agg.pyd)
creating python loader for extension 'pyexpat' (C:\Python27\DLLs\pyexpat.pyd ->
pyexpat.pyd)
creating python loader for extension 'matplotlib.ttconv' (C:\Python27\lib\site-p
ackages\matplotlib\ttconv.pyd -> matplotlib.ttconv.pyd)
creating python loader for extension 'scipy.sparse.linalg.eigen.arpack._arpack'
(C:\Python27\lib\site-packages\scipy\sparse\linalg\eigen\arpack\_arpack.pyd -> s
cipy.sparse.linalg.eigen.arpack._arpack.pyd)
creating python loader for extension 'scipy.sparse._sparsetools' (C:\Python27\li
b\site-packages\scipy\sparse\_sparsetools.pyd -> scipy.sparse._sparsetools.pyd)
creating python loader for extension 'sklearn.linear_model.cd_fast' (C:\Python27
\lib\site-packages\sklearn\linear_model\cd_fast.pyd -> sklearn.linear_model.cd_f
ast.pyd)
creating python loader for extension 'scipy.spatial.ckdtree' (C:\Python27\lib\si
te-packages\scipy\spatial\ckdtree.pyd -> scipy.spatial.ckdtree.pyd)
creating python loader for extension 'scipy.sparse.csgraph._shortest_path' (C:\P
ython27\lib\site-packages\scipy\sparse\csgraph\_shortest_path.pyd -> scipy.spars
e.csgraph._shortest_path.pyd)
creating python loader for extension 'scipy.linalg._clapack' (C:\Python27\lib\si
te-packages\scipy\linalg\_clapack.pyd -> scipy.linalg._clapack.pyd)
creating python loader for extension 'scipy.spatial._distance_wrap' (C:\Python27
\lib\site-packages\scipy\spatial\_distance_wrap.pyd -> scipy.spatial._distance_w
rap.pyd)
creating python loader for extension 'scipy.interpolate._fitpack' (C:\Python27\l
ib\site-packages\scipy\interpolate\_fitpack.pyd -> scipy.interpolate._fitpack.py
d)
creating python loader for extension 'matplotlib._cntr' (C:\Python27\lib\site-pa
ckages\matplotlib\_cntr.pyd -> matplotlib._cntr.pyd)
creating python loader for extension 'sklearn.metrics.pairwise_fast' (C:\Python2
7\lib\site-packages\sklearn\metrics\pairwise_fast.pyd -> sklearn.metrics.pairwis
e_fast.pyd)
creating python loader for extension 'numpy.core.multiarray' (C:\Python27\lib\si
te-packages\numpy\core\multiarray.pyd -> numpy.core.multiarray.pyd)
creating python loader for extension 'scipy.sparse._csparsetools' (C:\Python27\l
ib\site-packages\scipy\sparse\_csparsetools.pyd -> scipy.sparse._csparsetools.py
d)
creating python loader for extension 'matplotlib.ft2font' (C:\Python27\lib\site-
packages\matplotlib\ft2font.pyd -> matplotlib.ft2font.pyd)
creating python loader for extension '_multiprocessing' (C:\Python27\DLLs\_multi
processing.pyd -> _multiprocessing.pyd)
creating python loader for extension 'scipy.special._ufuncs' (C:\Python27\lib\si
te-packages\scipy\special\_ufuncs.pyd -> scipy.special._ufuncs.pyd)
creating python loader for extension 'scipy.optimize._lbfgsb' (C:\Python27\lib\s
ite-packages\scipy\optimize\_lbfgsb.pyd -> scipy.optimize._lbfgsb.pyd)
creating python loader for extension 'numpy.linalg.lapack_lite' (C:\Python27\lib
\site-packages\numpy\linalg\lapack_lite.pyd -> numpy.linalg.lapack_lite.pyd)
creating python loader for extension 'scipy.linalg._cblas' (C:\Python27\lib\site
-packages\scipy\linalg\_cblas.pyd -> scipy.linalg._cblas.pyd)
creating python loader for extension '_socket' (C:\Python27\DLLs\_socket.pyd ->
_socket.pyd)
creating python loader for extension 'sklearn.utils.sparsefuncs_fast' (C:\Python
27\lib\site-packages\sklearn\utils\sparsefuncs_fast.pyd -> sklearn.utils.sparsef
uncs_fast.pyd)
creating python loader for extension 'scipy.stats.statlib' (C:\Python27\lib\site
-packages\scipy\stats\statlib.pyd -> scipy.stats.statlib.pyd)
creating python loader for extension 'sklearn.utils.seq_dataset' (C:\Python27\li
b\site-packages\sklearn\utils\seq_dataset.pyd -> sklearn.utils.seq_dataset.pyd)
creating python loader for extension 'sklearn.utils.arrayfuncs' (C:\Python27\lib
\site-packages\sklearn\utils\arrayfuncs.pyd -> sklearn.utils.arrayfuncs.pyd)
creating python loader for extension 'sklearn.utils._logistic_sigmoid' (C:\Pytho
n27\lib\site-packages\sklearn\utils\_logistic_sigmoid.pyd -> sklearn.utils._logi
stic_sigmoid.pyd)
creating python loader for extension 'sklearn.svm.libsvm' (C:\Python27\lib\site-
packages\sklearn\svm\libsvm.pyd -> sklearn.svm.libsvm.pyd)
creating python loader for extension 'numpy.core._dotblas' (C:\Python27\lib\site
-packages\numpy\core\_dotblas.pyd -> numpy.core._dotblas.pyd)
creating python loader for extension 'sklearn.utils.murmurhash' (C:\Python27\lib
\site-packages\sklearn\utils\murmurhash.pyd -> sklearn.utils.murmurhash.pyd)
creating python loader for extension 'sklearn.utils._random' (C:\Python27\lib\si
te-packages\sklearn\utils\_random.pyd -> sklearn.utils._random.pyd)
creating python loader for extension 'scipy.optimize._cobyla' (C:\Python27\lib\s
ite-packages\scipy\optimize\_cobyla.pyd -> scipy.optimize._cobyla.pyd)
*** finding dlls needed ***
error: [Errno 2] No such file or directory: 'MSVCP90.dll'

C:\Python27>

And I have changed NLTK thing to,pos_tag(wordpunct_tokenize(inp))

Regards,
Subhabrata Banerjee. 

 

[toc] | [prev] | [next] | [standalone]


#92641

FromLaura Creighton <lac@openend.se>
Date2015-06-15 18:29 +0200
Message-ID<mailman.487.1434385760.13271.python-list@python.org>
In reply to#92640
I don't have a windows system, so my knowledge of such things is
minimal.  But looks like this person had the same problem you have,
and got some suggestions on how to fix it.

http://stackoverflow.com/questions/12127869/error-msvcp90-dll-no-such-file-or-directory-even-though-microsoft-visual-c

But your code is working fine now?  There is no point in packaging
something that doesn't run.

Laura

[toc] | [prev] | [next] | [standalone]


#92672

Fromsubhabrata.banerji@gmail.com
Date2015-06-16 03:46 -0700
Message-ID<d352894a-0088-456d-a321-ef191b6a38ae@googlegroups.com>
In reply to#92641
On Monday, June 15, 2015 at 9:59:33 PM UTC+5:30, Laura Creighton wrote:
> I don't have a windows system, so my knowledge of such things is
> minimal.  But looks like this person had the same problem you have,
> and got some suggestions on how to fix it.
> 
> http://stackoverflow.com/questions/12127869/error-msvcp90-dll-no-such-file-or-directory-even-though-microsoft-visual-c
> 
> But your code is working fine now?  There is no point in packaging
> something that doesn't run.
> 
> Laura

Hi,

Thank you for your help. Yes now the file is giving output as I am calling it in command prompt. I had downloaded Microsoft Visual Studio 2008 Redistributable.
I have MS VC 10.0 installed so my corresponding CRT file is 100 and not 90. I am checking this and working out. 
Meanwhile got another post http://stackoverflow.com/questions/323424/py2exe-fails-to-generate-an-executable
and pasted libiomp5md.dll from numpy now it is giving NLQ3.exe in dist and generating few errors in a corresponding log file.

Regards,
Subhabrata Banerjee. 

[toc] | [prev] | [next] | [standalone]


#92677

Fromsubhabrata.banerji@gmail.com
Date2015-06-16 06:56 -0700
Message-ID<5f6b802f-049b-48e3-b1fd-a5915b7f3dbb@googlegroups.com>
In reply to#92641
On Monday, June 15, 2015 at 9:59:33 PM UTC+5:30, Laura Creighton wrote:
> I don't have a windows system, so my knowledge of such things is
> minimal.  But looks like this person had the same problem you have,
> and got some suggestions on how to fix it.
> 
> http://stackoverflow.com/questions/12127869/error-msvcp90-dll-no-such-file-or-directory-even-though-microsoft-visual-c
> 
> But your code is working fine now?  There is no point in packaging
> something that doesn't run.
> 
> Laura

I have mostly solved the problem. But there are two issues making me slightly confusing:
i) In a bigger code I am calling scipy and after building .exe as I am calling 
\dist\...exe it is giving ImportError: No module named _ufuncs_cxx
I have checked the resolution http://stackoverflow.com/questions/20169728/exe-created-with-py2exe-doesnt-work-and-returns-logfile-with-errors
but it is not giving much help.
ii) In a class how may I include if __name__ == "__main__": with multiple methods? But I think this is easy question there should be lot of web help. 

If anyone may kindly suggest.

Regards,
Subhabrata Banerjee. 
 

[toc] | [prev] | [next] | [standalone]


#92681

FromLaura Creighton <lac@openend.se>
Date2015-06-16 17:04 +0200
Message-ID<mailman.515.1434467117.13271.python-list@python.org>
In reply to#92677
In a message of Tue, 16 Jun 2015 06:56:12 -0700, subhabrata.banerji@gmail.com w
rites:
>ii) In a class how may I include if __name__ == "__main__": with multiple methods? But I think this is easy question there should be lot of web help. 
>
>If anyone may kindly suggest.
>
>Regards,
>Subhabrata Banerjee. 

There is something wrong in the way you are thinking about this.
You don't _want_ to stick if __name__ = "__main__":
into every class you write.

See if reading this helps.
http://effbot.org/pyfaq/tutor-what-is-if-name-main-for.htm

Laura

[toc] | [prev] | [next] | [standalone]


#92683

Fromsubhabrata.banerji@gmail.com
Date2015-06-16 08:17 -0700
Message-ID<2de8f2c1-5a92-4f8b-be2d-c793de69d463@googlegroups.com>
In reply to#92681
On Tuesday, June 16, 2015 at 8:35:39 PM UTC+5:30, Laura Creighton wrote:
> In a message of Tue, 16 Jun 2015 06:56:12 -0700,  writes:
> >ii) In a class how may I include if __name__ == "__main__": with multiple methods? But I think this is easy question there should be lot of web help. 
> >
> >If anyone may kindly suggest.
> >
> >Regards,
> >Subhabrata Banerjee. 
> 
> There is something wrong in the way you are thinking about this.
> You don't _want_ to stick if __name__ = "__main__":
> into every class you write.
> 
> See if reading this helps.
> http://effbot.org/pyfaq/tutor-what-is-if-name-main-for.htm
> 
> Laura

Hi,
Thanks. The scipy issue seems solved. But this silly issue is giving so much of time. I am checking. Please see a sample code, 

import sys
sys.stderr = sys.stdout
class Colors:
    def Blue(self):
        self.var="This is Blue"
        print self.var
    def Red(self):
        print self.var
        
    
       
if __name__ == "__main__":
    Colors().Blue() #THIS IS FINE
    Colors().Red() #NOT FINE

Regards,
Subhabrata Banerjee. 

[toc] | [prev] | [next] | [standalone]


#92685

FromIan Kelly <ian.g.kelly@gmail.com>
Date2015-06-16 10:00 -0600
Message-ID<mailman.517.1434470471.13271.python-list@python.org>
In reply to#92683
On Tue, Jun 16, 2015 at 9:17 AM,  <subhabrata.banerji@gmail.com> wrote:
> On Tuesday, June 16, 2015 at 8:35:39 PM UTC+5:30, Laura Creighton wrote:
>> In a message of Tue, 16 Jun 2015 06:56:12 -0700,  writes:
>> >ii) In a class how may I include if __name__ == "__main__": with multiple methods? But I think this is easy question there should be lot of web help.
>> >
>> >If anyone may kindly suggest.
>> >
>> >Regards,
>> >Subhabrata Banerjee.
>>
>> There is something wrong in the way you are thinking about this.
>> You don't _want_ to stick if __name__ = "__main__":
>> into every class you write.
>>
>> See if reading this helps.
>> http://effbot.org/pyfaq/tutor-what-is-if-name-main-for.htm
>>
>> Laura
>
> Hi,
> Thanks. The scipy issue seems solved. But this silly issue is giving so much of time. I am checking. Please see a sample code,
>
> import sys
> sys.stderr = sys.stdout
> class Colors:
>     def Blue(self):
>         self.var="This is Blue"
>         print self.var
>     def Red(self):
>         print self.var
>
>
>
> if __name__ == "__main__":
>     Colors().Blue() #THIS IS FINE
>     Colors().Red() #NOT FINE

I'm assuming that when you run this, you get the output "This is Blue"
followed by an AttributeError from Colors.Red complaining that the var
attribute is not set. If you want this to work, then maybe you should
set the attribute.

But as Laura noted, you probably don't want to be calling more than
one thing in your if __name__ == "__main__" block. Just call the entry
point of your program.

[toc] | [prev] | [next] | [standalone]


#92686

FromChris Angelico <rosuav@gmail.com>
Date2015-06-17 02:03 +1000
Message-ID<mailman.518.1434470627.13271.python-list@python.org>
In reply to#92683
On Wed, Jun 17, 2015 at 1:17 AM,  <subhabrata.banerji@gmail.com> wrote:
> Thanks. The scipy issue seems solved. But this silly issue is giving so much of time. I am checking. Please see a sample code,
>
> import sys
> sys.stderr = sys.stdout
> class Colors:
>     def Blue(self):
>         self.var="This is Blue"
>         print self.var
>     def Red(self):
>         print self.var
>
>
>
> if __name__ == "__main__":
>     Colors().Blue() #THIS IS FINE
>     Colors().Red() #NOT FINE

You're still not saying what's going on. Did you try this code as a
simple Python script first, before trying to bundle it up into an .exe
file?

Fortunately, my primary crystal ball is active, and I believe what's
going on is that you expect Blue() to set something and then Red() to
see it. However, you're calling those methods on two different
throw-away objects, so they have separate state. What you expect to
happen, I honestly have no idea. (Also, why are you fiddling with
sys.stderr? You don't then appear to be using it, unless you have an
issue with exceptions getting printed to the other stream.)

ChrisA

[toc] | [prev] | [next] | [standalone]


#92687

Fromsubhabrata.banerji@gmail.com
Date2015-06-16 09:23 -0700
Message-ID<e87670d2-a26e-4da5-8e49-ab3c490e3f1a@googlegroups.com>
In reply to#92686
On Tuesday, June 16, 2015 at 9:33:58 PM UTC+5:30, Chris Angelico wrote:
> On Wed, Jun 17, 2015 at 1:17 AM,  wrote:
> > Thanks. The scipy issue seems solved. But this silly issue is giving so much of time. I am checking. Please see a sample code,
> >
> > import sys
> > sys.stderr = sys.stdout
> > class Colors:
> >     def Blue(self):
> >         self.var="This is Blue"
> >         print self.var
> >     def Red(self):
> >         print self.var
> >
> >
> >
> > if __name__ == "__main__":
> >     Colors().Blue() #THIS IS FINE
> >     Colors().Red() #NOT FINE
> 
> You're still not saying what's going on. Did you try this code as a
> simple Python script first, before trying to bundle it up into an .exe
> file?
> 
> Fortunately, my primary crystal ball is active, and I believe what's
> going on is that you expect Blue() to set something and then Red() to
> see it. However, you're calling those methods on two different
> throw-away objects, so they have separate state. What you expect to
> happen, I honestly have no idea. (Also, why are you fiddling with
> sys.stderr? You don't then appear to be using it, unless you have an
> issue with exceptions getting printed to the other stream.)
> 
> ChrisA

Thank you for your reply. I am trying to experimenting over small ones before going to actual code. Your error interpretations are right.
I could work out a small solution please check if it is going fine.
It is giving me result.

if __name__ == "__main__":
    c1=Colors()
    c2=c1.Blue()
    c3=c1.Red()

Regards,
Subhabrata Banerjee. 

[toc] | [prev] | [next] | [standalone]


#92739

Fromsubhabrata.banerji@gmail.com
Date2015-06-17 06:10 -0700
Message-ID<9e068291-09c2-4b2a-8e1c-8803050cfba1@googlegroups.com>
In reply to#92686
On Tuesday, June 16, 2015 at 9:33:58 PM UTC+5:30, Chris Angelico wrote:
> On Wed, Jun 17, 2015 at 1:17 AM, wrote:
> > Thanks. The scipy issue seems solved. But this silly issue is giving so much of time. I am checking. Please see a sample code,
> >
> > import sys
> > sys.stderr = sys.stdout
> > class Colors:
> >     def Blue(self):
> >         self.var="This is Blue"
> >         print self.var
> >     def Red(self):
> >         print self.var
> >
> >
> >
> > if __name__ == "__main__":
> >     Colors().Blue() #THIS IS FINE
> >     Colors().Red() #NOT FINE
> 
> You're still not saying what's going on. Did you try this code as a
> simple Python script first, before trying to bundle it up into an .exe
> file?
> 
> Fortunately, my primary crystal ball is active, and I believe what's
> going on is that you expect Blue() to set something and then Red() to
> see it. However, you're calling those methods on two different
> throw-away objects, so they have separate state. What you expect to
> happen, I honestly have no idea. (Also, why are you fiddling with
> sys.stderr? You don't then appear to be using it, unless you have an
> issue with exceptions getting printed to the other stream.)
> 
> ChrisA

Dear Group,

Thank you all. It seems going fine now. I have one additional question if I run the .exe files created in Non Python Windows environment. Linux has Python builtin but in Non Python environment how may I run it? Is there any set of prequisites I have to follow. I am not finding much web help, if any one may kindly suggest. 

Regards,
Subhabrata Banerjee.

[toc] | [prev] | [next] | [standalone]


#92740

FromChris Angelico <rosuav@gmail.com>
Date2015-06-17 23:20 +1000
Message-ID<mailman.547.1434547236.13271.python-list@python.org>
In reply to#92739
On Wed, Jun 17, 2015 at 11:10 PM,  <subhabrata.banerji@gmail.com> wrote:
> Thank you all. It seems going fine now. I have one additional question if I run the .exe files created in Non Python Windows environment. Linux has Python builtin but in Non Python environment how may I run it? Is there any set of prequisites I have to follow. I am not finding much web help, if any one may kindly suggest.
>

There have been some proposals to make an easy way to produce a single
package that has a Windows executable header, but can be easily
unpacked and run using a system-provided Linux or Mac OS Python.
However, I don't think any have been deployed yet. So the simple
answer is: You can't do what you're trying to do. Instead, take a step
back, and look at just getting your Python program to run on all
platforms... and that's easy, just distribute the .py files. Much MUCH
easier, more reliable, and simpler.

ChrisA

[toc] | [prev] | [next] | [standalone]


#92741

Fromhamilton <hamilton@nothere.com>
Date2015-06-17 07:33 -0600
Message-ID<mlrssm$j8p$1@dont-email.me>
In reply to#92740
On 6/17/2015 7:20 AM, Chris Angelico wrote:
> On Wed, Jun 17, 2015 at 11:10 PM,  <subhabrata.banerji@gmail.com> wrote:
>> Thank you all. It seems going fine now. I have one additional question if I run the .exe files created in Non Python Windows environment. Linux has Python builtin but in Non Python environment how may I run it? Is there any set of prequisites I have to follow. I am not finding much web help, if any one may kindly suggest.
>>
>
> There have been some proposals to make an easy way to produce a single
> package that has a Windows executable header, but can be easily
> unpacked and run using a system-provided Linux or Mac OS Python.
> However, I don't think any have been deployed yet. So the simple
> answer is: You can't do what you're trying to do. Instead, take a step
> back, and look at just getting your Python program to run on all
> platforms... and that's easy, just distribute the .py files. Much MUCH
> easier, more reliable, and simpler.
>
> ChrisA
>
Yes, this is easy.

However, the python source can be read by anyone.

As a .exe, the source can not be read.

Just because the interpreter is open source,
does not mean my application should be.

[toc] | [prev] | [next] | [standalone]


Page 1 of 2  [1] 2  Next page →

Back to top | Article view | comp.lang.python


csiph-web