头像

jlqwer

这让人揪心的代码

  1年前  •    WEB, 系统  •    , ,   •    892  •    0

1.首次生成或更新Let’s Encrypt 证书时卡死在Installing Python packages
这是一些国内服务器容易出现的问题,需要修改pip源,网上搜到有4个源,但是只有一个能用(豆瓣的),其他的都有些小问题:

shellmkdir /root/.pip
cd /root/.pip
vi pip.conf

 

pip.conf:

conf[global]
trusted-host = pypi.douban.com
index-url = http://pypi.douban.com/simple

2.利用letsencrypt生成证书时 ,出现下面错误提示

error0 upgraded, 0 newly installed, 0 to remove and 6 not upgraded.

Creating virtual environment...

Traceback (most recent call last):

File "/usr/lib/python3/dist-packages/virtualenv.py", line 2363, in <module>

main()

File "/usr/lib/python3/dist-packages/virtualenv.py", line 719, in main

symlink=options.symlink)

File "/usr/lib/python3/dist-packages/virtualenv.py", line 988, in create_environment

download=download,

File "/usr/lib/python3/dist-packages/virtualenv.py", line 918, in install_wheel

call_subprocess(cmd, show_stdout=False, extra_env=env, stdin=SCRIPT)

File "/usr/lib/python3/dist-packages/virtualenv.py", line 812, in call_subprocess

% (cmd_desc, proc.returncode))

OSError: Command /root/.local/share/letsencrypt/bin/python - setuptools pkg_resources pip wheel failed with error code 1

解决办法:
卸载virtualenv

shellpip uninstall virtualenv

安装virtualenv

shellpip install virtualenv

不过有的主机没有安装pip
会提示 安装Python-pip
安装完Python-pip在执行上面的语句

上一篇:
下一篇:

 评论


 已有0条评论

    还没有任何评论,你来说两句吧!