小编msm*_*azh的帖子

命令'x86_64-linux-gnu-gcc'以退出状态1失败

我试图安装"学术"包,但我一直收到这个错误:

x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c build/temp.linux-x86_64-2.7/_openssl.c -o build/temp.linux-x86_64-2.7/build/temp.linux-x86_64-2.7/_openssl.o
build/temp.linux-x86_64-2.7/_openssl.c:434:30: fatal error: openssl/opensslv.h: No such file or directory
compilation terminated.

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


Command "/usr/bin/python -u -c "import setuptools,tokenize;__file__='/tmp/pip-build-0OXGEx/cryptography/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-EdgZGB-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-0OXGEx/cryptography/
Run Code Online (Sandbox Code Playgroud)

已经尝试过以下帖子中的解决方案,但它没有用:

pip install lxml错误

python linux gcc ubuntu-16.04

23
推荐指数
3
解决办法
4万
查看次数

Pandas列表:如何设置项目的dtype

我有一个数据框,其中包含多列包含列表,每行中列表的长度不同:

tweetid tweet_date    user_mentions       hashtags
00112   11-02-2014    []                  []
00113   11-02-2014    [00113]             [obama, trump]
00114   30-07-2015    [00114, 00115]      [hillary, trump, sanders]
00115   30-07-2015    []                  []
Run Code Online (Sandbox Code Playgroud)

数据帧是三个不同数据帧的连续,我不确定列表中的项是否具有相同的dtype.例如,在user_mentions列中,有时数据如下:

[00114, 00115]
Run Code Online (Sandbox Code Playgroud)

但有时是这样的:

['00114','00115'] 
Run Code Online (Sandbox Code Playgroud)

如何设置列表中项目的dtype?

python pandas

1
推荐指数
1
解决办法
363
查看次数

Python 正则表达式引发“无重复”错误

我发现其他几个帖子都在谈论这个问题,但仍然无法找到如何解决我的问题。这是我的代码:

words = [':\)','sleeping','... :\(','facebook','tired','out of the',"i'm"]
regex = re.compile(r'\b%s\b' % '\\b|\\b'.join(words), flags=re.IGNORECASE)
Run Code Online (Sandbox Code Playgroud)

我收到此错误:

error: nothing to repeat
Run Code Online (Sandbox Code Playgroud)

python regex

0
推荐指数
1
解决办法
1752
查看次数

标签 统计

python ×3

gcc ×1

linux ×1

pandas ×1

regex ×1

ubuntu-16.04 ×1