私はpygobject
をインストールしようとしていますが、依存関係の1つはpy3cairoです。私は既にPython 3.4で使用するためにそれをインストールしましたが、今はPython 3.6で使用したいと思います。py3cairo for Python 3.6をインストール
私はsudo apt-get install python3-cairo
でそれをインストールすることができます知っているが、それはそれはすでにインストールさだと言う:
$ sudo apt-get install python3-cairo
Reading package lists... Done
Building dependency tree
Reading state information... Done
python3-cairo is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
私が得るので、/ソースからインストール構築しようと
Python 3.6.0 (default, Feb 20 2017, 17:34:58)
[GCC 4.9.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import gi
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'gi'
>>> import cairo
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'cairo'
>>> quit()
[email protected]:~/Downloads$ python3.4
Python 3.4.2 (default, Oct 8 2014, 10:45:20)
[GCC 4.9.1] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import gi
>>> import cairo
が、醜いですすべて種類号:
$ PYTHON="python3.6" ./waf configure
./options()
Setting top to : /home/brandon/Downloads/pycairo-1.10.0
Setting out to : /home/brandon/Downloads/pycairo-1.10.0/build_directory
./configure()
Checking for 'gcc' (c compiler) : ok
Checking for program python : python3.6
python executable 'python3.6' different from sys.executable '/usr/local/bin/python3.6'
Checking for python version : (3, 6, 0, 'final', 0)
Traceback (most recent call last):
File "/home/brandon/Downloads/pycairo-1.10.0/.waf3-1.6.4-e3c1e08604b18a10567cfcd2d02eb6e6/waflib/Scripting.py", line 93, in waf_entry_point
run_commands()
File "/home/brandon/Downloads/pycairo-1.10.0/.waf3-1.6.4-e3c1e08604b18a10567cfcd2d02eb6e6/waflib/Scripting.py", line 145, in run_commands
run_command(cmd_name)
File "/home/brandon/Downloads/pycairo-1.10.0/.waf3-1.6.4-e3c1e08604b18a10567cfcd2d02eb6e6/waflib/Scripting.py", line 138, in run_command
ctx.execute()
File "/home/brandon/Downloads/pycairo-1.10.0/.waf3-1.6.4-e3c1e08604b18a10567cfcd2d02eb6e6/waflib/Configure.py", line 124, in execute
super(ConfigurationContext,self).execute()
File "/home/brandon/Downloads/pycairo-1.10.0/.waf3-1.6.4-e3c1e08604b18a10567cfcd2d02eb6e6/waflib/Context.py", line 87, in execute
self.recurse([os.path.dirname(g_module.root_path)])
File "/home/brandon/Downloads/pycairo-1.10.0/.waf3-1.6.4-e3c1e08604b18a10567cfcd2d02eb6e6/waflib/Context.py", line 127, in recurse
user_function(self)
File "/home/brandon/Downloads/pycairo-1.10.0/wscript", line 29, in configure
ctx.check_python_headers()
File "/home/brandon/Downloads/pycairo-1.10.0/.waf3-1.6.4-e3c1e08604b18a10567cfcd2d02eb6e6/waflib/Configure.py", line 217, in fun
return f(*k,**kw)
File "/home/brandon/Downloads/pycairo-1.10.0/.waf3-1.6.4-e3c1e08604b18a10567cfcd2d02eb6e6/waflib/Tools/python.py", line 146, in check_python_headers
result=conf.check(lib=name,uselib='PYEMBED',libpath=path,mandatory=False,msg='Checking for library %s in LIBDIR'%name)
File "/home/brandon/Downloads/pycairo-1.10.0/.waf3-1.6.4-e3c1e08604b18a10567cfcd2d02eb6e6/waflib/Configure.py", line 217, in fun
return f(*k,**kw)
File "/home/brandon/Downloads/pycairo-1.10.0/.waf3-1.6.4-e3c1e08604b18a10567cfcd2d02eb6e6/waflib/Tools/c_config.py", line 357, in check
ret=self.run_c_code(*k,**kw)
File "/home/brandon/Downloads/pycairo-1.10.0/.waf3-1.6.4-e3c1e08604b18a10567cfcd2d02eb6e6/waflib/Configure.py", line 217, in fun
return f(*k,**kw)
File "/home/brandon/Downloads/pycairo-1.10.0/.waf3-1.6.4-e3c1e08604b18a10567cfcd2d02eb6e6/waflib/Tools/c_config.py", line 435, in run_c_code
bld.compile()
File "/home/brandon/Downloads/pycairo-1.10.0/.waf3-1.6.4-e3c1e08604b18a10567cfcd2d02eb6e6/waflib/Build.py", line 190, in compile
self.store()
File "/home/brandon/Downloads/pycairo-1.10.0/.waf3-1.6.4-e3c1e08604b18a10567cfcd2d02eb6e6/waflib/Utils.py", line 300, in f
ret=fun(*k,**kw)
File "/home/brandon/Downloads/pycairo-1.10.0/.waf3-1.6.4-e3c1e08604b18a10567cfcd2d02eb6e6/waflib/Build.py", line 164, in store
cPickle.dump(data,f)
AttributeError: Can't pickle local object 'Context.__init__.<locals>.node_class'
Checking for library python3.6 in LIBDIR :
py3cairoをインストールしてこれらの問題を解決するにはどうすればよいですか?
これは役に立ちます。私は試してみて、何が起こるか見てみましょう。 – bjd2385