You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ImportError: No module named sysconfig when installing the dependencies #733
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?
Got it sorted out. It was an issue with python 2.6.6 that I was having. I updated the python to 2.7.12 and used it to create a virtual environment. bash-4.1$ virtualenv -p python2.7 env
Dependencies got installed correctly except pyaudio. Issue could be due to portaudio not been installed in CentOS. For now, I can live with it as I'm working on using arecord / alsa for streaming audio to cloud speech API. See #728
When I ran into this, it was caused by having /usr/lib/python2.6/site-packages/pkg_resources/ conflicting with /usr/lib/python2.6/site-packages/pkg_resources.py. Erasing the directory allowed everything to work as before. I assume a pip install was the cause, but don't know which package.
Activity
chan71 commentedon Dec 21, 2016
Got it sorted out. It was an issue with python 2.6.6 that I was having. I updated the python to 2.7.12 and used it to create a virtual environment.
bash-4.1$ virtualenv -p python2.7 envDependencies got installed correctly except pyaudio. Issue could be due to portaudio not been installed in CentOS. For now, I can live with it as I'm working on using arecord / alsa for streaming audio to cloud speech API. See #728
jerjou commentedon Dec 21, 2016
Yeah - the portaudio dependency is a pain, but necessary for cross-platform device support. Hopefully getting alsa to work will be easier :-)
bradelkin commentedon Aug 8, 2018
When I ran into this, it was caused by having /usr/lib/python2.6/site-packages/pkg_resources/ conflicting with /usr/lib/python2.6/site-packages/pkg_resources.py. Erasing the directory allowed everything to work as before. I assume a pip install was the cause, but don't know which package.
chore(deps): update dependency google-cloud-storage to v2.2.0 (#733)