Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PyYAML
#1
I am having a devil of a time with PyYAML. Any package with a dependency to it tries to compile it, and always fails from cython. There have apparently been prior noted bugs between the two.
ext/_yaml.c:24216:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
         tstate->exc_value = local_value;
                 ^~~~~~~~~
                 curexc_value
    ext/_yaml.c:24217:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
         tstate->exc_traceback = local_tb;
                 ^~~~~~~~~~~~~
                 curexc_traceback
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
    
    ----------------------------------------
  Rolling back uninstall of PyYAML
I cannot import(correction- pip3 install ) PyYAML. Debian has a module called pyaml, which does import.

If I 'pip3 install -U PyYAML' I get:
Requirement already up-to-date: PyYAML in /usr/local/lib/python3.7/dist-packages (5.1.2)
However the actual version is 3.13 (lastest for 3.7)
The RECORDS file in dist-packages has the files dumped to the /yaml pycache.

I see part of the problem is:
Collecting PyYaml==3.12 (from zegami-cli) Using cached https://files.pythonhosted.org/packages/....12.tar.gz

The module is calling the wrong version. Should it be >= 3.12?
Is this a standard practice in Python? Exact versions? I guess I can patch the wheel file on the installing module to >=3.12 (if I can find it!)

In the meantime, is there a symlink or something to fix the confusion (once again 'import pyaml' does work!)
Reply
#2
Is there something in the examples that might help?
https://github.com/yaml/pyyaml/tree/master/examples
Reply
#3
'import -U PyYAML - above should be 'pip3 install -U'
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  PyYAML read list of int zisco 2 275 Apr-02-2024, 12:36 PM
Last Post: zisco
  Question about YAMLLoadWarning (PyYAML error / deprecated) UniKlixX 4 4,212 Sep-10-2019, 11:49 AM
Last Post: UniKlixX

Forum Jump:

User Panel Messages

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