关于python:当’pip install openpyxl`时出现错误“需求已经满足”

Error “Requirement already satisfied” when `pip install openpyxl`

我有Win10(64位),我使用的是python 3.6.2

我在命令上尝试了:$ pip install openpyxl,但出现了以下错误:

1
2
3
4
5
6
7
> C:\Users\Joct? Arg?lo>pip install openpyxl
> Collecting openpyxl Using
> cached openpyxl-2.4.8.tar.gz Requirement already satisfied: jdcal in
> c:\users\joct?arg?lo\appdata\local\programs\python\python36\lib\site-packages (from openpyxl)
> Requirement already satisfied: et_xmlfile in c:\users\joct?arg?lo\appdata\local\programs\python\python36\lib\site-packages (from openpyxl)
> Installing collected packages: openpyxl   Running setup.py
> install for openpyxl ... error Exception:

Traceback (most recent call last):

1
2
3
File"c:\users\joct?arg?lo\appdata\local\programs\python\python36\lib\site-packages\pip\compat\__init__.py", line 73, in console_to_str
   return s.decode(sys.__stdout__.encoding)  
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe3 in position 56: invalid continuation byte

During handling of the above exception, another exception occurred:
Traceback (most recent call last):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
File"c:\users\joct?arg?lo\appdata\local\programs\python\python36\lib\site-packages\pip\basecommand.py", line 215, in main
  status = self.run(options, args)  
File"c:\users\joct? arg?lo\appdata\local\programs\python\python36\lib\site-packages\pip\commands\install.py", line 342, in run
  prefix=options.prefix_path,  
File"c:\users\joct? arg?lo\appdata\local\programs\python\python36\lib\site-packages\pip
eq
eq_set.py"
, line 784, in install
  **kwargs  
File"c:\users\joct? arg?lo\appdata\local\programs\python\python36\lib\site-packages\pip
eq
eq_install.py"
, line 878, in install
  spinner=spinner,  
File"c:\users\joct? arg?lo\appdata\local\programs\python\python36\lib\site-packages\pip\utils\__init__.py", line 676, in call_subprocess
  line = console_to_str(proc.stdout.readline())  
File"c:\users\joct?arg?lo\appdata\local\programs\python\python36\lib\site-packages\pip\compat\__init__.py", line 75, in console_to_str
  return s.decode('utf_8')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe3 in position 56: invalid continuation byte

我怎么解决这个问题?


当你的文件夹以一些疯狂的字母命名时,就会发生这种错误。"Joct?精氨酸?洛

这样错误就对我们说"嘿,伙计!你到底在我身上放了什么??!"

  • 或者,如果知道如何重命名用户文件夹
  • 或更改文件
  • c:\users\joct?
    arg?lo\appdata\local\programs\python\python36\lib\site-packages\pip\compat__init__.py

    1
    return s.decode(sys.__stdout__.encoding)

    1
    return s.decode('cp1251')

    CP1251-是我的俄语解决方案(从我的解决方案)。输入您自己的编码(portugale?)其中有一个文件夹。你一定认识她。只要不更改用户文件夹的名称,就不要将python文件中的条目更改回原处。更新无法解决问题。