pipenv给出错误" ImportError"和" OSError"

时间:2017-03-03 06:00:41

标签: python virtualenv importerror

/proc

ImportError:/mnt/ilustre/users/.local/share/virtualenvs/lib/python2.7/lib-dynload/_io.so:undefined symbol:PyUnicodeUCS4_Concat

$ pipenv --two
Creating a Pipfile for this project...
Creating a virtualenv for this project...
Running virtualenv with interpreter /mnt/ilustre/users/miniconda2/bin/python2
New python executable in /mnt/ilustre/users/.local/share/virtualenvs/bin/python2
Also creating executable in /mnt/ilustre/users/.local/share/virtualenvs/bin/python
Installing setuptools, pip, wheel...
  Complete output from command /mnt/ilustre/users/s...s_report/bin/python2 - setuptools pip wheel:
  Traceback (most recent call last):
  File "<stdin>", line 4, in <module>
  File "/mnt/ilustre/users/miniconda2/lib/python2.7/tempfile.py", line 32, in <module>
    import io as _io
  File "/mnt/ilustre/users/miniconda2/lib/python2.7/io.py", line 51, in <module>
    import _io

1 个答案:

答案 0 :(得分:1)

我已经解决了这个问题。原因是virtualenv使用的python版本。你可以运行&#39;哪个virtualenv&#39;然后编辑virtualenv文件,这是一个python文件。您必须更改python解释器。我改为2.7.10版本,virtualenv运行正常。它以前是2.7.11版本,所以报告错误!