OSDir


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Python27.dll module error from Python 2.7.15/PCbuild/get_externals.bat


On 6/29/2018 3:42 AM, amit.singh2241 at gmail.com wrote:
> I am trying to compile the freshly downloaded Python 2.7.15.
> When the PCBuild/build.bat goes to pull-in the external modules along with their dependencies it encounters this error for each of the external modules.
> 
> F:\Dev\depot\tools\source\python\Python-2.7.15>.\PCbuild\get_externals.bat
> Using "F:\Dev\depot\tools\source\python\Python-2.7.15\PCbuild\\..\externals\pyth
> onx86\tools\python.exe" (found in externals directory)
> Fetching external libraries...
> e is e
> Fetching bzip2-1.0.6...
> Traceback (most recent call last):
>    File "F:\Dev\depot\tools\source\python\Python-2.7.15\PCbuild\\get_external.py"
> , line 7, in <module>
>      from urllib.request import urlretrieve
>    File "F:\Dev\depot\tools\source\python\Python-2.7.15\externals\pythonx86\tools
> \lib\urllib\request.py", line 88, in <module>
>      import http.client
>    File "F:\Dev\depot\tools\source\python\Python-2.7.15\externals\pythonx86\tools
> \lib\http\client.py", line 71, in <module>
>      import email.parser
>    File "F:\Dev\depot\tools\source\python\Python-2.7.15\externals\pythonx86\tools
> \lib\email\parser.py", line 12, in <module>
>      from email.feedparser import FeedParser, BytesFeedParser
>    File "F:\Dev\depot\tools\source\python\Python-2.7.15\externals\pythonx86\tools
> \lib\email\feedparser.py", line 27, in <module>
>      from email._policybase import compat32
>    File "F:\Dev\depot\tools\source\python\Python-2.7.15\externals\pythonx86\tools
> \lib\email\_policybase.py", line 9, in <module>
>      from email.utils import _has_surrogates
>    File "F:\Dev\depot\tools\source\python\Python-2.7.15\externals\pythonx86\tools
> \lib\email\utils.py", line 29, in <module>
>      import socket
>    File "F:\Dev\depot\tools\source\python\Python-2.7.15\externals\pythonx86\tools
> \lib\socket.py", line 49, in <module>
>      import _socket
> ImportError: Module use of python27.dll conflicts with this version of Python.
> Fetching bsddb-4.7.25.0...
> Traceback (most recent call last):
>    File "F:\Dev\depot\tools\source\python\Python-2.7.15\PCbuild\\get_external.py"
> 
> I tried installing python versions 3.6.4 and 2.7.15 to see if it works because I read in the build script that if python is already installed then it will use that else it will install it's own python in externals and use it.
> But no luck! It keeps giving me the same error again and again. Even if I execute "builds.bat -e" it gets into the same trap though it goes ahead and compiles but then compiler throws error due to half-baked external modules.
> 
> Any help will be highly appreciated !

I updated my repository, including the 2.7 branch and ran
PCbuild\build.bat -e -d
Everything built fine, but no external fetches were done.
I renamed the bz dir and built again.

Using py -3.6 (found with py.exe)
Fetching external libraries...
Fetching bzip2-1.0.6...
...
blocksort.c
   bzlib.c
   compress.c
   crctable.c
   decompress.c
   huffman.c
   randtable.c
   Generating Code...
   bz2.vcxproj -> f:\dev\27\PCBuild\bz2_d.pyd
as expected.  So the .bat files are ok.

You had
 > Using 
"F:\Dev\depot\tools\source\python\Python-2.7.15\PCbuild\\..\externals\pyth
 > onx86\tools\python.exe" (found in externals directory)
and got
 > ImportError: Module use of python27.dll conflicts with this version 
of Python.

I don't understand that at all, but I would remove the python.exe within 
external, as it did not work, so it cannot be used.  Did you install the 
py launcher when you installed 3.6 (3.6.6 was just released).

Here is the list of what you need.
Fetching bzip2-1.0.6...
bsddb-4.7.25.0 already exists, skipping.
openssl-1.0.2o already exists, skipping.
sqlite-3.14.2.0 already exists, skipping.
tcl-8.5.19.0 already exists, skipping.
tk-8.5.19.0 already exists, skipping.
tix-8.4.3.5 already exists, skipping.
Fetching external binaries...
nasm-2.11.06 already exists, skipping.

I would delete anything not in the list.

-- 
Terry Jan Reedy