Python 在windows中,pip不会将控制返回到命令提示符

Python 在windows中,pip不会将控制返回到命令提示符,python,windows,Python,Windows,我最近在windows中安装了python 3.7。每当我通过pip安装模块时,它不会将控制返回到命令提示符。示例如下所示 pip install praw Collecting praw Downloading https://files.pythonhosted.org/packages/a4/d7/0c7fb864ab9469f2964b2787910c78ade6d98c2d1710df1deab61beb99a1/praw-6.0.0-py2.py3-none-any.whl (

我最近在windows中安装了python 3.7。每当我通过pip安装模块时,它不会将控制返回到命令提示符。示例如下所示

 pip install praw
Collecting praw
  Downloading https://files.pythonhosted.org/packages/a4/d7/0c7fb864ab9469f2964b2787910c78ade6d98c2d1710df1deab61beb99a1/praw-6.0.0-py2.py3-none-any.whl (99kB)
    100% |████████████████████████████████| 102kB 556kB/s
Collecting update-checker>=0.16 (from praw)
  Downloading https://files.pythonhosted.org/packages/17/c9/ab11855af164d03be0ff4fddd4c46a5bd44799a9ecc1770e01a669c21168/update_checker-0.16-py2.py3-none-any.whl
Collecting prawcore<2.0,>=1.0.0 (from praw)
  Downloading https://files.pythonhosted.org/packages/cd/6d/4bf4d65d4771b15c70284c0626d24f230a5de6edac75c446fd22008ddbf6/prawcore-1.0.0-py2.py3-none-any.whl
Collecting requests>=2.3.0 (from update-checker>=0.16->praw)
  Downloading https://files.pythonhosted.org/packages/65/47/7e02164a2a3db50ed6d8a6ab1d6d60b69c4c3fdf57a284257925dfc12bda/requests-2.19.1-py2.py3-none-any.whl (91kB)
    100% |████████████████████████████████| 92kB 1.5MB/s
Collecting urllib3<1.24,>=1.21.1 (from requests>=2.3.0->update-checker>=0.16->praw)
  Downloading https://files.pythonhosted.org/packages/bd/c9/6fdd990019071a4a32a5e7cb78a1d92c53851ef4f56f62a3486e6a7d8ffb/urllib3-1.23-py2.py3-none-any.whl (133kB)
    100% |████████████████████████████████| 143kB 2.2MB/s
Collecting chardet<3.1.0,>=3.0.2 (from requests>=2.3.0->update-checker>=0.16->praw)
  Downloading https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl (133kB)
    100% |████████████████████████████████| 143kB 3.9MB/s
Collecting idna<2.8,>=2.5 (from requests>=2.3.0->update-checker>=0.16->praw)
  Downloading https://files.pythonhosted.org/packages/4b/2a/0276479a4b3caeb8a8c1af2f8e4355746a97fab05a372e4a2c6a6b876165/idna-2.7-py2.py3-none-any.whl (58kB)
    100% |████████████████████████████████| 61kB 2.5MB/s
Collecting certifi>=2017.4.17 (from requests>=2.3.0->update-checker>=0.16->praw)
  Downloading https://files.pythonhosted.org/packages/7c/e6/92ad559b7192d846975fc916b65f667c7b8c3a32bea7372340bfe9a15fa5/certifi-2018.4.16-py2.py3-none-any.whl (150kB)
    100% |████████████████████████████████| 153kB 4.7MB/s
Installing collected packages: urllib3, chardet, idna, certifi, requests, update-checker, prawcore, praw
  The script chardetect.exe is installed in 'c:\users\ragha\appdata\local\programs\python\python37-32\Scripts' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed certifi-2018.4.16 chardet-3.0.4 idna-2.7 praw-6.0.0 prawcore-1.0.0 requests-2.19.1 update-checker-0.16 urllib3-1.23

如何解决此问题?

新安装的软件包可以工作吗?可以。在我使用CTRL+C退出后,新安装的软件包工作正常。乍一看,它像是一个bug,因为pip需要一个锁文件。@Sraw-Yup。我只是想知道如何解决这个问题我认为手动删除缓存目录可以解决这个问题。
Traceback (most recent call last):
  File "c:\users\ragha\appdata\local\programs\python\python37-32\lib\site-packages\pip\_vendor\lockfile\linklockfile.py", line 31, in acquire
    os.link(self.unique_name, self.lock_file)
FileExistsError: [WinError 183] Cannot create a file when that file already exists: 'C:\\Users\\ragha\\AppData\\Local\\pip\\Cache\\DESKTOP-KKG32L1-54fc.16400-1747620134' -> 'C:\\Users\\ragha\\AppData\\Local\\pip\\Cache\\selfcheck.json.lock'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\users\ragha\appdata\local\programs\python\python37-32\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\users\ragha\appdata\local\programs\python\python37-32\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\ragha\AppData\Local\Programs\Python\Python37-32\Scripts\pip.exe\__main__.py", line 9, in <module>
  File "c:\users\ragha\appdata\local\programs\python\python37-32\lib\site-packages\pip\_internal\__init__.py", line 246, in main
    return command.main(cmd_args)
  File "c:\users\ragha\appdata\local\programs\python\python37-32\lib\site-packages\pip\_internal\basecommand.py", line 265, in main
    pip_version_check(session, options)
  File "c:\users\ragha\appdata\local\programs\python\python37-32\lib\site-packages\pip\_internal\utils\outdated.py", line 140, in pip_version_check
    state.save(pypi_version, current_time)
  File "c:\users\ragha\appdata\local\programs\python\python37-32\lib\site-packages\pip\_internal\utils\outdated.py", line 70, in save
    with lockfile.LockFile(self.statefile_path):
  File "c:\users\ragha\appdata\local\programs\python\python37-32\lib\site-packages\pip\_vendor\lockfile\__init__.py", line 197, in __enter__
    self.acquire()
  File "c:\users\ragha\appdata\local\programs\python\python37-32\lib\site-packages\pip\_vendor\lockfile\linklockfile.py", line 50, in acquire
    time.sleep(timeout is not None and timeout / 10 or 0.1)
KeyboardInterrupt