-1

while i'm trying to install pyGObject in my Pycharm. it does not work. and has an error : enter image description here

and the output command :

Collecting PyGObject
  Using cached https://files.pythonhosted.org/packages/8c/1f/76533985b054473ef6ab1ba4d9c00d62da502f8b43d3171ae588ec81ae93/PyGObject-3.30.4.tar.gz
Collecting pycairo>=1.11.1 (from PyGObject)
  Using cached https://files.pythonhosted.org/packages/a6/54/23d6cf3e8d8f1eb30e0e58f171b6f62b2ea75c024935492373639a1a08e4/pycairo-1.18.0.tar.gz
Installing collected packages: pycairo, PyGObject
  Running setup.py install for pycairo: started
    Running setup.py install for pycairo: finished with status 'error'
    Complete output from command C:\Users\asus\PycharmProjects\Testt\venv\Scripts\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\asus\\AppData\\Local\\Temp\\pycharm-packaging\\pycairo\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\asus\AppData\Local\Temp\pip-record-tyl1chno\install-record.txt --single-version-externally-managed --compile --install-headers C:\Users\asus\PycharmProjects\Testt\venv\include\site\python3.4\pycairo:
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.4
    creating build\lib.win-amd64-3.4\cairo
    copying cairo\__init__.py -> build\lib.win-amd64-3.4\cairo
    copying cairo\__init__.pyi -> build\lib.win-amd64-3.4\cairo
    copying cairo\py.typed -> build\lib.win-amd64-3.4\cairo
    warning: build_py: byte-compiling is disabled, skipping.

    running build_ext
    building 'cairo._cairo' extension
    error: Microsoft Visual C++ 10.0 is required. Get it with "Microsoft Windows SDK 7.1": www.microsoft.com/download/details.aspx?id=8279

    ----------------------------------------

my python version is 3.4.8 and working in windows 8.1

inaz
  • 1,755
  • 4
  • 20
  • 41
  • The problem is clearly mentioned: `error: Microsoft Visual C++ 10.0 is required` . you will need to install the required windows software before you install the module. – ParvBanks Jan 21 '19 at 08:36
  • I've found the link and added it to my answer below. Please check if it works for you. – ParvBanks Jan 21 '19 at 08:39

1 Answers1

0

The problem is clearly mentioned: error: Microsoft Visual C++ 10.0 is required.

You will need to install the required windows software before you install the module.

You can download Microsoft Visual C++ 10.0 from here.

In case your system already has another installation, you can find the workaround here.

ParvBanks
  • 1,316
  • 1
  • 9
  • 15
  • but I have Microsoft Visual C++ in my system. while I tried to download it from the link that u sent me ,it told me "A newer version of Microsoft Visual C++ 2010 Redistributable has been detected on the machine. " – inaz Jan 21 '19 at 08:47
  • That might be true. However, different software have specific dependencies. I have about 14 different versions of `Microsoft visual C++` on my system (which I don't think should be the ideal scenario). Go ahead and install it anyway and then check if it works. – ParvBanks Jan 21 '19 at 08:50
  • how can I install when it prevents me to continue installing ? – inaz Jan 21 '19 at 08:53
  • I installed that Visual C++ 10.0 from the link u sent me. but again have the previous error while I want to install pyGObject – inaz Jan 21 '19 at 09:21
  • Ok, I think I had the incorrect version for Visual C++ 10. Looking at the error in more detail actually gave the correct link: `Get it with "Microsoft Windows SDK 7.1": www.microsoft.com/download/details.aspx?id=8279` Please uninstall what you just installed and install https://www.microsoft.com/en-us/download/details.aspx?id=8279 Sorry for not noticing earlier. – ParvBanks Jan 21 '19 at 09:24
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/187043/discussion-between-inaz-and-parvbanks). – inaz Jan 21 '19 at 10:36