Python Forum
pip 2.7 problem with compiler
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
pip 2.7 problem with compiler
#1
Hello,

I am trying to install a package (https://github.com/curtacircuitos/pcb-tools) with the python version bundled with kicad (python 2.7)
I am facing some problems that i didn't had with python/pip 3.7

Do you know how could i solve this?

Quote:PS C:\Program Files\KiCad\bin> ./pip install cairocffi
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/developmen...-2-support
Collecting cairocffi
Using cached https://files.pythonhosted.org/packages/...9.0.tar.gz
ERROR: Command errored out with exit status 1:
command: 'C:/Program Files/KiCad/bin/python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'c:\\users\\vincenzo\\appdata\\local\\temp\\pip-install-fqkwcm\\cairocffi\\setup.py'"'"'; __file__='"'"'c:\\users\\vincenzo\\appdata\\local\\temp\\pip-install-fqkwcm\\cairocffi\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
cwd: c:\users\vincenzo\appdata\local\temp\pip-install-fqkwcm\cairocffi\
Complete output (42 lines):

No working compiler found, or bogus compiler options passed to
the compiler from Python's standard "distutils" module. See
the error messages above. Likely, the problem is not related
to CFFI but generic to the setup.py of any Python package that
tries to compile C code. (Hints: on OS/X 10.8, for errors about
-mno-fused-madd see http://stackoverflow.com/questions/22313407/
Otherwise, see https://wiki.python.org/moin/CompLangPython or
the IRC channel #python on irc.freenode.net.)

Trying to continue anyway. If you are trying to install CFFI from
a build done in a different context, you can ignore this warning.

Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:\users\vincenzo\appdata\local\temp\pip-install-fqkwcm\cairocffi\setup.py", line 51, in <module>
'test': ['pytest-runner', 'pytest-cov'],
File "C:\Program Files\KiCad\lib\python2.7\site-packages/setuptools/__init__.py", line 144, in setup
_install_setup_requires(attrs)
File "C:\Program Files\KiCad\lib\python2.7\site-packages/setuptools/__init__.py", line 139, in _install_setup_requires
dist.fetch_build_eggs(dist.setup_requires)
File "C:\Program Files\KiCad\lib\python2.7\site-packages/setuptools/dist.py", line 719, in fetch_build_eggs replace_conflicting=True,
File "C:\Program Files\KiCad\lib\python2.7\site-packages/pkg_resources/__init__.py", line 782, in resolve
replace_conflicting=replace_conflicting
File "C:\Program Files\KiCad\lib\python2.7\site-packages/pkg_resources/__init__.py", line 1065, in best_match return self.obtain(req, installer)
File "C:\Program Files\KiCad\lib\python2.7\site-packages/pkg_resources/__init__.py", line 1077, in obtain
return installer(requirement)
File "C:\Program Files\KiCad\lib\python2.7\site-packages/setuptools/dist.py", line 786, in fetch_build_egg return cmd.easy_install(req)
File "C:\Program Files\KiCad\lib\python2.7\site-packages/setuptools/command/easy_install.py", line 679, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "C:\Program Files\KiCad\lib\python2.7\site-packages/setuptools/command/easy_install.py", line 705, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "C:\Program Files\KiCad\lib\python2.7\site-packages/setuptools/command/easy_install.py", line 890, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "C:\Program Files\KiCad\lib\python2.7\site-packages/setuptools/command/easy_install.py", line 1158, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "C:\Program Files\KiCad\lib\python2.7\site-packages/setuptools/command/easy_install.py", line 1146, in run_setup
raise DistutilsError("Setup script exited with %s" % (v.args[0],))
distutils.errors.DistutilsError: Setup script exited with error: command 'x86_64-w64-mingw32-gcc' failed: No such file or directory
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Reply
#2
try to install cairocffi binary from Gholke:
https://www.lfd.uci.edu/~gohlke/pythonlibs/#cairocffi
then proceed with the installation of that package
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply
#3
this is weird, both the packages are not working

I am using windows 64 bit and the lastest kicad (which uses the python/pip version listed above)

Quote:PS C:\Users\vincenzo> pip-kicad --version
pip 19.2.3 from C:\Program Files\KiCad\lib\python2.7\site-packages\pip (python 2.7)

PS C:\Users\vincenzo> pip-kicad install $env:desktop/cairocffi-0.9.0-cp27-cp27m-win32.whl
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/developmen...-2-support
ERROR: cairocffi-0.9.0-cp27-cp27m-win32.whl is not a supported wheel on this platform.

PS C:\Users\vincenzo> pip-kicad install $env:desktop/cairocffi-0.9.0-cp27-cp27m-win_amd64.whl
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/developmen...-2-support
ERROR: cairocffi-0.9.0-cp27-cp27m-win_amd64.whl is not a supported wheel on this platform.

PS C:\Users\vincenzo> python-kicad
Python 2.7.16 (default, Aug 15 2019, 17:51:40) [GCC 9.2.0 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> ^Z
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  When does Python need to use a compiler? JanOlvegg 5 2,927 Mar-09-2023, 04:24 PM
Last Post: snippsat
  Compiler wallgraffiti 3 2,260 Aug-21-2020, 06:57 AM
Last Post: Gribouillis
  f2py: no Fortran compiler found FMJS 2 5,337 May-25-2020, 02:51 PM
Last Post: FMJS
  how do i make a compiler? lol 2 2,410 Nov-29-2018, 05:43 PM
Last Post: Larz60+
  Compiler fault or some kind of weird referencing bug? Joseph_f2 11 9,063 May-09-2017, 08:50 PM
Last Post: volcano63

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020