Skip to content
This repository has been archived by the owner on Apr 9, 2024. It is now read-only.

Cannot run python3 code from the command line #170

Open
ReagentX opened this issue Jul 9, 2017 · 4 comments
Open

Cannot run python3 code from the command line #170

ReagentX opened this issue Jul 9, 2017 · 4 comments

Comments

@ReagentX
Copy link

ReagentX commented Jul 9, 2017

There is no argument in the documentation that allows you to specify a different command other than python to run the code, so this will always run Python 2.7 instead of Python 3.x.

@rawrgulmuffins
Copy link

Seconding thing running on python3.5.

 pycallgraph graphviz -- test.py
Traceback (most recent call last):
  File "/home/alex/.virtualenvs/pycallgraph/bin/pycallgraph", line 26, in <module>
    exec(__file_content)
  File "<string>", line 800
    print v.to_dot(draw_defines=options.draw_defines,
          ^
SyntaxError: invalid syntax

@jagibson
Copy link

A workaround is to use virtualenv

$ virtualenv -p /usr/bin/python3 .virtualenv
$ source .virtualenv/bin/activate
$ python --version
Python 3.6.5
$ pip install pycallgraph

@YuntaoTan
Copy link

YuntaoTan commented Nov 29, 2018

I try to use python3.3 , but i get following warning:
`(process:11443): Pango-CRITICAL **: 16:38:25.373: pango_cairo_show_layout: assertion 'PANGO_IS_LAYOUT (layout)' failed

(process:11443): Pango-CRITICAL **: 16:38:25.373: pango_cairo_show_layout: assertion 'PANGO_IS_LAYOUT (layout)' failed

(process:11443): Pango-CRITICAL **: 16:38:25.373: pango_cairo_show_layout: assertion 'PANGO_IS_LAYOUT (layout)' failed

(process:11443): Pango-CRITICAL **: 16:38:25.373: pango_cairo_show_layout: assertion 'PANGO_IS_LAYOUT (layout)' failed

(process:11443): Pango-CRITICAL **: 16:38:25.373: pango_cairo_show_layout: assertion 'PANGO_IS_LAYOUT (layout)' failed`
and i get following ugly picture:
test
@jagibson can you help me, or any person can help me?

@jagibson
Copy link

jagibson commented Dec 3, 2018

@YuntaoTan I'm certainly not an expert on this project - however with those errors I would check that you have the libpango and libcairo2 OS libraries installed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants