gpt4 book ai didi

ubuntu - 从要求 txt 安装包并失败

转载 作者:太空宇宙 更新时间:2023-11-03 17:10:12 25 4
gpt4 key购买 nike

我阅读了https://github.com/dennybritz/rnn-tutorial-rnnlm中的rnn教程并按照安装设置环境。但是我得到了我不知道的错误。我在 Ubuntu 14 的 virtualenv 中设置了它。我搜索了类似的问题并使用了他们的解决方案,但它不起作用。

我试过的方法:1. 更新gcc2. 重新安装 python-dev3. 安装libxxx(不好意思这个名字不准确但是有一堆乱七八糟的文件所以我记不起来了)

注意: 1.我不是ubuntu的专家,所以如果你能帮助我,希望你能提供详细的解释或解决方案,如果你有空的话。2.我试过重装ubuntu还是不行

creating build/temp.linux-x86_64-2.7/Modules/2.x

x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DHAVE_RL_CALLBACK -DHAVE_RL_CATCH_SIGNAL -DHAVE_RL_COMPLETION_APPEND_CHARACTER -DHAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK -DHAVE_RL_COMPLETION_MATCHES -DHAVE_RL_COMPLETION_SUPPRESS_APPEND -DHAVE_RL_PRE_INPUT_HOOK -I. -I/usr/include/python2.7 -c Modules/2.x/readline.c -o build/temp.linux-x86_64-2.7/Modules/2.x/readline.o

In file included from Modules/2.x/readline.c:31:0:

./readline/readline.h:385:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]

extern int rl_message ();

^

x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/Modules/2.x/readline.o readline/libreadline.a readline/libhistory.a -lncurses -o build/lib.linux-x86_64-2.7/gnureadline.so

/usr/bin/ld: cannot find -lncurses

collect2: error: ld returned 1 exit status

error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

----------------------------------------
Cleaning up...
Command /home/shuyu-lyu/venv/bin/python -c "import setuptools, tokenize;__file__='/home/shuyu-lyu/venv/build/gnureadline/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-xF2y3k-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/shuyu-lyu/venv/include/site/python2.7 failed with error code 1 in /home/shuyu-lyu/venv/build/gnureadline
Traceback (most recent call last):
File "/home/shuyu-lyu/venv/bin/pip", line 11, in <module>
sys.exit(main())
File "/home/shuyu-lyu/venv/local/lib/python2.7/site-packages/pip/__init__.py", line 185, in main
return command.main(cmd_args)
File "/home/shuyu-lyu/venv/local/lib/python2.7/site-packages/pip/basecommand.py", line 161, in main
text = '\n'.join(complete_log)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 66: ordinal not in range(128)

最佳答案

看起来 ncurses 库没有安装。如果你在 Ubuntu 上,你应该先用

安装它
sudo apt-get install libncurses5-dev libncursesw5-dev

关于ubuntu - 从要求 txt 安装包并失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39960190/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com