lambci / docker-lambda

Docker images and test runners that replicate the live AWS Lambda environment
MIT License
5.83k stars 431 forks source link

/var/lang/bin/python -v shows an error #151

Closed wobeng closed 5 years ago

wobeng commented 5 years ago

Dockerfile :

FROM lambci/lambda:build-python3.7

RUN which pip
RUN which python
RUN /var/lang/bin/pip -v
RUN /var/lang/bin/python -v

Show an error below, am I missing something:

Step 5/33 : RUN /var/lang/bin/python -v
import _frozen_importlib # frozen
import _imp # builtin
import '_thread' # <class '_frozen_importlib.BuiltinImporter'>
import '_warnings' # <class '_frozen_importlib.BuiltinImporter'>
import '_weakref' # <class '_frozen_importlib.BuiltinImporter'>
# installing zipimport hook
import 'zipimport' # <class '_frozen_importlib.BuiltinImporter'>
# installed zipimport hook
import '_frozen_importlib_external' # <class '_frozen_importlib.FrozenImporter'>
import '_io' # <class '_frozen_importlib.BuiltinImporter'>
import 'marshal' # <class '_frozen_importlib.BuiltinImporter'>
import 'posix' # <class '_frozen_importlib.BuiltinImporter'>
import _thread # previously loaded ('_thread')
import '_thread' # <class '_frozen_importlib.BuiltinImporter'>
import _weakref # previously loaded ('_weakref')
import '_weakref' # <class '_frozen_importlib.BuiltinImporter'>
# /var/lang/lib/python3.7/encodings/__pycache__/__init__.cpython-37.pyc matches /var/lang/lib/python3.7/encodings/__init__.py
# code object from '/var/lang/lib/python3.7/encodings/__pycache__/__init__.cpython-37.pyc'
# /var/lang/lib/python3.7/__pycache__/codecs.cpython-37.pyc matches /var/lang/lib/python3.7/codecs.py
# code object from '/var/lang/lib/python3.7/__pycache__/codecs.cpython-37.pyc'
import '_codecs' # <class '_frozen_importlib.BuiltinImporter'>
import 'codecs' # <_frozen_importlib_external.SourceFileLoader object at 0x7f792575aac8>
# /var/lang/lib/python3.7/encodings/__pycache__/aliases.cpython-37.pyc matches /var/lang/lib/python3.7/encodings/aliases.py
# code object from '/var/lang/lib/python3.7/encodings/__pycache__/aliases.cpython-37.pyc'
import 'encodings.aliases' # <_frozen_importlib_external.SourceFileLoader object at 0x7f792576f4e0>
import 'encodings' # <_frozen_importlib_external.SourceFileLoader object at 0x7f792575a588>
# /var/lang/lib/python3.7/encodings/__pycache__/utf_8.cpython-37.pyc matches /var/lang/lib/python3.7/encodings/utf_8.py
# code object from '/var/lang/lib/python3.7/encodings/__pycache__/utf_8.cpython-37.pyc'
import 'encodings.utf_8' # <_frozen_importlib_external.SourceFileLoader object at 0x7f792577d208>
import '_signal' # <class '_frozen_importlib.BuiltinImporter'>
# /var/lang/lib/python3.7/encodings/__pycache__/latin_1.cpython-37.pyc matches /var/lang/lib/python3.7/encodings/latin_1.py
# code object from '/var/lang/lib/python3.7/encodings/__pycache__/latin_1.cpython-37.pyc'
import 'encodings.latin_1' # <_frozen_importlib_external.SourceFileLoader object at 0x7f792577dcc0>
# /var/lang/lib/python3.7/__pycache__/io.cpython-37.pyc matches /var/lang/lib/python3.7/io.py
# code object from '/var/lang/lib/python3.7/__pycache__/io.cpython-37.pyc'
# /var/lang/lib/python3.7/__pycache__/abc.cpython-37.pyc matches /var/lang/lib/python3.7/abc.py
# code object from '/var/lang/lib/python3.7/__pycache__/abc.cpython-37.pyc'
import '_abc' # <class '_frozen_importlib.BuiltinImporter'>
import 'abc' # <_frozen_importlib_external.SourceFileLoader object at 0x7f79257832e8>
import 'io' # <_frozen_importlib_external.SourceFileLoader object at 0x7f792577def0>
# /var/lang/lib/python3.7/__pycache__/_bootlocale.cpython-37.pyc matches /var/lang/lib/python3.7/_bootlocale.py
# code object from '/var/lang/lib/python3.7/__pycache__/_bootlocale.cpython-37.pyc'
import '_locale' # <class '_frozen_importlib.BuiltinImporter'>
import '_bootlocale' # <_frozen_importlib_external.SourceFileLoader object at 0x7f79257831d0>
Python 3.7.1 (default, Nov 11 2018, 21:17:16)
[GCC 4.8.3 20140911 (Red Hat 4.8.3-9)] on linux
Type "help", "copyright", "credits" or "license" for more information.
# /var/lang/lib/python3.7/__pycache__/site.cpython-37.pyc matches /var/lang/lib/python3.7/site.py
# code object from '/var/lang/lib/python3.7/__pycache__/site.cpython-37.pyc'
# /var/lang/lib/python3.7/__pycache__/os.cpython-37.pyc matches /var/lang/lib/python3.7/os.py
# code object from '/var/lang/lib/python3.7/__pycache__/os.cpython-37.pyc'
# /var/lang/lib/python3.7/__pycache__/stat.cpython-37.pyc matches /var/lang/lib/python3.7/stat.py
# code object from '/var/lang/lib/python3.7/__pycache__/stat.cpython-37.pyc'
import '_stat' # <class '_frozen_importlib.BuiltinImporter'>
import 'stat' # <_frozen_importlib_external.SourceFileLoader object at 0x7f79257212b0>
# /var/lang/lib/python3.7/__pycache__/posixpath.cpython-37.pyc matches /var/lang/lib/python3.7/posixpath.py
# code object from '/var/lang/lib/python3.7/__pycache__/posixpath.cpython-37.pyc'
# /var/lang/lib/python3.7/__pycache__/genericpath.cpython-37.pyc matches /var/lang/lib/python3.7/genericpath.py
# code object from '/var/lang/lib/python3.7/__pycache__/genericpath.cpython-37.pyc'
import 'genericpath' # <_frozen_importlib_external.SourceFileLoader object at 0x7f7925725d68>
import 'posixpath' # <_frozen_importlib_external.SourceFileLoader object at 0x7f79257219e8>
# /var/lang/lib/python3.7/__pycache__/_collections_abc.cpython-37.pyc matches /var/lang/lib/python3.7/_collections_abc.py
# code object from '/var/lang/lib/python3.7/__pycache__/_collections_abc.cpython-37.pyc'
import '_collections_abc' # <_frozen_importlib_external.SourceFileLoader object at 0x7f792572e400>
import 'os' # <_frozen_importlib_external.SourceFileLoader object at 0x7f792578ef28>
# /var/lang/lib/python3.7/__pycache__/_sitebuiltins.cpython-37.pyc matches /var/lang/lib/python3.7/_sitebuiltins.py
# code object from '/var/lang/lib/python3.7/__pycache__/_sitebuiltins.cpython-37.pyc'
import '_sitebuiltins' # <_frozen_importlib_external.SourceFileLoader object at 0x7f7925717320>
import 'site' # <_frozen_importlib_external.SourceFileLoader object at 0x7f792578cc50>
# clear builtins._
# clear sys.path
# clear sys.argv
# clear sys.ps1
# clear sys.ps2
# clear sys.last_type
# clear sys.last_value
# clear sys.last_traceback
# clear sys.path_hooks
# clear sys.path_importer_cache
# clear sys.meta_path
# clear sys.__interactivehook__
# clear sys.flags
# clear sys.float_info
# restore sys.stdin
# restore sys.stdout
# restore sys.stderr
# cleanup[2] removing sys
# cleanup[2] removing builtins
# cleanup[2] removing _frozen_importlib
# cleanup[2] removing _imp
# cleanup[2] removing _thread
# cleanup[2] removing _warnings
# cleanup[2] removing _weakref
# cleanup[2] removing zipimport
# cleanup[2] removing _frozen_importlib_external
# cleanup[2] removing _io
# cleanup[2] removing marshal
# cleanup[2] removing posix
# cleanup[2] removing encodings
# destroy encodings
# cleanup[2] removing codecs
# cleanup[2] removing _codecs
# cleanup[2] removing encodings.aliases
# cleanup[2] removing encodings.utf_8
# cleanup[2] removing _signal
# cleanup[2] removing __main__
# destroy __main__
# cleanup[2] removing encodings.latin_1
# cleanup[2] removing io
# destroy io
# cleanup[2] removing abc
# cleanup[2] removing _abc
# cleanup[2] removing _bootlocale
# destroy _bootlocale
# cleanup[2] removing _locale
# cleanup[2] removing site
# destroy site
# cleanup[2] removing os
# cleanup[2] removing stat
# cleanup[2] removing _stat
# cleanup[2] removing posixpath
# cleanup[2] removing genericpath
# cleanup[2] removing os.path
# cleanup[2] removing _collections_abc
# destroy _collections_abc
# cleanup[2] removing _sitebuiltins
# destroy zipimport
# destroy _signal
# destroy _abc
# destroy _locale
# destroy _sitebuiltins
# destroy abc
# destroy posixpath
# destroy _stat
# destroy genericpath
# destroy os
# destroy stat
# cleanup[3] wiping _frozen_importlib
# destroy _frozen_importlib_external
# cleanup[3] wiping _imp
# cleanup[3] wiping _thread
# cleanup[3] wiping _warnings
# cleanup[3] wiping _weakref
# cleanup[3] wiping _io
# cleanup[3] wiping marshal
# cleanup[3] wiping posix
# cleanup[3] wiping codecs
# cleanup[3] wiping _codecs
# cleanup[3] wiping encodings.aliases
# cleanup[3] wiping encodings.utf_8
# cleanup[3] wiping encodings.latin_1
# cleanup[3] wiping sys
# cleanup[3] wiping builtins
mhart commented 5 years ago

I'm not sure what you mean – what's the error you're seeing?

avborik commented 4 years ago

Hi Wobeng, There is no problem with python. To check the python version, just type python in cmd and it will print the version