Intel® Distribution for Python*
Engage in discussions with community peers related to Python* applications and core computational packages.
424 Discussions

SyntaxError on unicode_literal occurs when I start a new terminal


Hi there,

I had a problem when I start a new terminal or when I use conda.

The problem seems to be related to unicode_literal.

Before this error occurs, I had a problem on path definition to libarchive.
Manually, I change the default path to libarchive_path = f'{sys.prefix}/lib/libarchive.13.dylib'
The error was removed at that time.

However, another error appears since I updated conda this morning.

The update included libarchive. I thought it would be related to the previous bug but it causes another error.

Does anyone know a good solution for this error?

# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<

    Traceback (most recent call last):
      File "/opt/intel/intelpython3/lib/python3.6/site-packages/conda/", line 1043, in __call__
        return func(*args, **kwargs)
      File "/opt/intel/intelpython3/lib/python3.6/site-packages/conda/cli/", line 84, in _main
        exit_code = do_call(args, p)
      File "/opt/intel/intelpython3/lib/python3.6/site-packages/conda/cli/", line 80, in do_call
        module = import_module(relative_mod, __name__.rsplit('.', 1)[0])
      File "/opt/intel/intelpython3/lib/python3.6/importlib/", line 126, in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
      File "<frozen importlib._bootstrap>", line 994, in _gcd_import
      File "<frozen importlib._bootstrap>", line 971, in _find_and_load
      File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
      File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
      File "<frozen importlib._bootstrap_external>", line 678, in exec_module
      File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
      File "/opt/intel/intelpython3/lib/python3.6/site-packages/conda/cli/", line 19, in <module>
        from ..core.index import _supplement_index_with_system
      File "/opt/intel/intelpython3/lib/python3.6/site-packages/conda/core/", line 9, in <module>
        from .package_cache_data import PackageCacheData
      File "/opt/intel/intelpython3/lib/python3.6/site-packages/conda/core/", line 15, in <module>
        from conda_package_handling.api import InvalidArchiveError
      File "/opt/intel/intelpython3/lib/python3.6/site-packages/conda_package_handling/", line 3, in <module>
        from libarchive.exception import ArchiveError as _LibarchiveArchiveError
      File "/opt/intel/intelpython3/lib/python3.6/site-packages/libarchive/", line 1, in <module>
        from .entry import ArchiveEntry
      File "/opt/intel/intelpython3/lib/python3.6/site-packages/libarchive/", line 6, in <module>
        from . import ffi
      File "/opt/intel/intelpython3/lib/python3.6/site-packages/libarchive/", line 1
        from __future__ import division, print_function, unicode_literal
    SyntaxError: future feature unicode_literal is not defined

`$ /opt/intel/intelpython3/bin/conda info --root`

An unexpected error has occurred. Conda has prepared the above report.

Upload successful.


0 Kudos
1 Reply

I fixed the problem. 

I changed two points in /opt/intel/intelpython3/lib/python3.6/site-packages/libarchive/

1. unicode_literal -> unicode_literals

2. # libarchive_path = os.environ.get('LIBARCHIVE') or find_library('archive')
    libarchive_path = f'{sys.prefix}/lib/libarchive.13.dylib'

I hope that next update solves all problem.

0 Kudos