ImportError: cannot import name _remove_dead_weakref

joseph pareti joepareti54 at gmail.com
Thu May 3 16:10:49 EDT 2018


please excuse my full python ignorance, however if I set PYTHONPTAH as
shown below, then the results are quite different than before:

$ echo $PYTHONPATH
/backupdata/anaconda/lib/python2.7/
$ python tf_train_pressure.py
Fatal Python error: Py_Initialize: Unable to get the locale encoding
  File "/backupdata/anaconda/lib/python2.7/encodings/__init__.py", line 124
    raise CodecRegistryError,\
                            ^
SyntaxError: invalid syntax

Current thread 0x00007f2b4459f700 (most recent call first):
Aborted (core dumped)


2018-05-03 19:15 GMT+02:00 Chris Angelico <rosuav at gmail.com>:

> On Fri, May 4, 2018 at 1:53 AM, joseph pareti <joepareti54 at gmail.com>
> wrote:
> > on an Ubuntu VM with :
> >
> >
> >    1. Linux JP-Paid-UBUNTU-DSVM 4.13.0-1014-azure
> >    2. Python 3.5.4 :: Anaconda custom (64-bit)
> >
> > $ manta manta_genSimData.py
> > Loading script 'manta_genSimData.py'
> > Traceback (most recent call last):
> >
> > skipping some details
> >
> > ...
> > File "/anaconda/lib/python2.7/weakref.py", line 14, in <module>
> >     from _weakref import (
> > *ImportError: cannot import name _remove_dead_weakref*
> > Script finished.
>
> Somehow, the details you're skipping include jumping from a Python
> 3.5.4 into a Python 2.7's standard library. Check your Anaconda
> settings and see if you have something bizarre going on with your
> PYTHONPATH.
>
> ChrisA
> --
> https://mail.python.org/mailman/listinfo/python-list
>



More information about the Python-list mailing list