简体   繁体   English

llvmpy在Ubuntu 14.04上

[英]llvmpy on Ubuntu 14.04

I am trying to install llvmpy on ubuntu 14.04. 我想在ubuntu 14.04上安装llvmpy。

uname -a 
Linux -esktop 3.13.0-30-generic #55-Ubuntu SMP Fri Jul 4 21:40:53 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

lsb_release -a
LSB Version:    core-2.0-amd64:core-2.0-noarch:core-3.0-amd64:core-3.0-noarch:core-3.1-amd64:core-3.1-noarch:core-3.2-amd64:core-3.2-noarch:core-4.0-amd64:core-4.0-noarch:core-4.1-amd64:core-4.1-noarch:security-4.0-amd64:security-4.0-noarch:security-4.1-amd64:security-4.1-noarch
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.1 LTS
Release:    14.04
Codename:   trusty

sudo pip install llvmpy fails. sudo pip install llvmpy失败。 The end of the output is 输出的结尾是

Cleaning up...
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_root/llvmpy/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-7HvRcB-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_root/llvmpy
Traceback (most recent call last):
  File "/usr/bin/pip", line 9, in <module>
    load_entry_point('pip==1.5.4', 'console_scripts', 'pip')()
  File "/usr/lib/python2.7/dist-packages/pip/__init__.py", line 185, in main
    return command.main(cmd_args)
  File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 161, in main
    text = '\n'.join(complete_log)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 42: ordinal not in range(128)

I have llvm version 3.4 installed. 我安装了llvm版本3.4。 The full output is at http://paste.ubuntu.com/8074574/ . 完整输出位于http://paste.ubuntu.com/8074574/

llvmpy requires llvm 3.3 at the moment. llvmpy目前需要llvm 3.3。 This is available, but not the default on Ubuntu 14.04 (which defaults to the newer llvm 3.4). 这是可用的,但不是Ubuntu 14.04上的默认值(默认为较新的llvm 3.4)。 First, install llvm3.3: 首先,安装llvm3.3:

sudo apt-get install llvm-3.3 llvm-3.3-runtime

Then, we need to tell pip to use the older llvm. 然后,我们需要告诉pip使用旧的llvm。

sudo sh -c "LLVM_CONFIG_PATH=/usr/bin/llvm-config-3.3 pip install llvmpy"

The above should also work for python3 using pip3 以上也适用于使用pip3的python3

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM