Python 3.x Python包已安装但无法使用,pip搜索将抛出回溯

Python 3.x Python包已安装但无法使用,pip搜索将抛出回溯,python-3.x,pip,Python 3.x,Pip,我安装了一个软件包来代替SimpleHTTPServer,因为某些原因,SimpleHTTPServer无法工作: # python3 -m pip install http-here Requirement already satisfied: http-here in /usr/local/lib/python3.5/dist-packages Requirement already satisfied: click in /usr/local/lib/python3.5/dist-pack

我安装了一个软件包来代替SimpleHTTPServer,因为某些原因,SimpleHTTPServer无法工作:

# python3 -m pip install http-here
Requirement already satisfied: http-here in /usr/local/lib/python3.5/dist-packages
Requirement already satisfied: click in /usr/local/lib/python3.5/dist-packages (from http-here)
但是当我尝试使用它时,我有一个错误:

  # python3 -m http-here
/usr/bin/python3: No module named http-here
Pip搜索和其他输出显示回溯:

# python3 -m pip search http-here
http-here (0.0.2)        - Simple Python HTTP server short for SimpleHTTPServer.
  INSTALLED: 0.0.2 (latest)

--- Logging error ---
Traceback (most recent call last):
  File "/usr/lib/python3.5/logging/__init__.py", line 983, in emit
    stream.write(msg)
UnicodeEncodeError: 'ascii' codec can't encode character '\ub294' in position 78: ordinal not in range(128)
Call stack:
  File "/usr/lib/python3.5/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.5/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/lib/python3/dist-packages/pip/__main__.py", line 19, in <module>
    sys.exit(pip.main())
  File "/usr/lib/python3/dist-packages/pip/__init__.py", line 233, in main
    return command.main(cmd_args)
  File "/usr/lib/python3/dist-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/usr/lib/python3/dist-packages/pip/commands/search.py", line 52, in run
    print_results(hits, terminal_width=terminal_width)
  File "/usr/lib/python3/dist-packages/pip/commands/search.py", line 118, in print_results
    logger.info(line)
Message: 'hacked-http (0.0.1)                                          - Hacked Urllib2 \ub294 warning.or.kr \uac19\uc740 \ubc29\uc5b4\ubcbd\uc744 \ub6ab\ub294\ub370 \ubaa9\uc801\uc774 \uc788\uc2b5\ub2c8\ub2e4.'
另外,python3-pipseams要安装,但通过CLI调用时也不起作用:

# apt install python3-pip
Reading package lists... Done
Building dependency tree       
Reading state information... Done
python3-pip is already the newest version (9.0.1-2).
0 upgraded, 0 newly installed, 0 to remove and 40 not upgraded.

# python3-pip search whatever
-bash: python3-pip: command not found

# which python3
/usr/bin/python3
我的区域设置输出顽固地显示了一些空字段,这可能是回溯的原因吗?我应该在/etc/environment中写入它吗

# locale
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE=UTF-8
...
LC_ALL=
我是否遇到了需要报告的python错误,或者如何修复?
谢谢。

回答我自己的问题:

添加

export LC\u ALL=“en\u US.UTF-8”
导出语言=“en_US.UTF-8”
出口信用证类型=“en_US.UTF-8”

要想
/etc/profile
~/.profile
~/.bashrc
确保这种情况不再发生,请取消回溯

关于被黑客攻击的Urllib2
pip搜索
显示可用的软件包,未安装,以查看已安装的软件包。我使用了
pip列表
,但此垃圾不存在,这很好

关于

# python3 -m http-here
/usr/bin/python3: No module named http-here
它应该被称为
pip3

应使用,而不是用于python2的SimpleHTTPServer

# python3 -m http-here
/usr/bin/python3: No module named http-here
python3 -m http.server
Serving HTTP on 0.0.0.0 port 8000 ...