Skip to content

ImportError: No module named sysconfig when installing the dependencies #733

@chan71

Description

@chan71

In which file did you encounter the issue?

https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/speech/grpc/requirements.txt

Did you change the file? If so, how?

No

Describe the issue

Target was to install cloud speech SDK in CentOS 6.6. and run the transcribe_streaming.py sample. Installed python 2.7.12 and OS has 2.6.6.
When I try to install dependencies of cloud speech from requriements.txt, following error is thrown.

bash-4.1$ pip install -r requirements.txt
Downloading/unpacking grpcio==1.0.4 (from -r requirements.txt (line 1))
  Running setup.py egg_info for package grpcio
    Traceback (most recent call last):
      File "<string>", line 16, in <module>
      File "/tmp/pip-build-ck40283/grpcio/setup.py", line 42, in <module>
        import sysconfig
    ImportError: No module named sysconfig
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

  File "<string>", line 16, in <module>
  File "/tmp/pip-build-ck40283/grpcio/setup.py", line 42, in <module>
    import sysconfig
ImportError: No module named sysconfig
----------------------------------------
Command python setup.py egg_info failed with error code 1 in /tmp/pip-build-ck40283/grpcio
Storing complete log in /home/ck40283/.pip/pip.log

Error suggests that sysconfig is not available in the python env but the command line doesn't throw an error when it is imported.

bash-4.1$ python 
Python 2.7.12 (default, Dec 20 2016, 18:17:56) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-11)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sysconfig
>>> 

When individual modules in requirements.txt is attempted to be installed, only the following module were giving errors. Rest for installed without errors.

grpcio==1.0.4
PyAudio==0.2.9

What could be the reason and how could this be resolved?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions