Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSL handshake operation timeout #2037

Closed
SunMaungOo opened this issue Dec 18, 2020 · 2 comments
Closed

SSL handshake operation timeout #2037

SunMaungOo opened this issue Dec 18, 2020 · 2 comments
Labels

Comments

@SunMaungOo
Copy link

SunMaungOo commented Dec 18, 2020

Issue

I am getting SSL handshake operation timeout when I try to install the package inside the virtual environment.
If I try to install the package outside the virtual environment, everything work as it should.

How to reproduce

  1. virtualenv vitenv
  2. activate "vitenv"
  3. pip install pandas

Log

  WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', timeout('_ssl.c:1106: The handshake operation timed out'))': /simple/pandas/
  WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', timeout('_ssl.c:1106: The handshake operation timed out'))': /simple/pandas/
  WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', timeout('_ssl.c:1106: The handshake operation timed out'))': /simple/pandas/
  WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', timeout('_ssl.c:1106: The handshake operation timed out'))': /simple/pandas/
  WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', timeout('_ssl.c:1106: The handshake operation timed out'))': /simple/pandas/
  ERROR: Could not find a version that satisfies the requirement pandas
  ERROR: No matching distribution found for pandas

Environment

  • Windows OS

  • pip list of the host python where virtualenv is installed:

      Package          Version
      ---------------- ---------
      appdirs          1.4.4
      beautifulsoup4   4.9.1
      certifi          2020.6.20
      chardet          3.0.4
      distlib          0.3.1
      filelock         3.0.12
      idna             2.10
      pip              20.2.3
      pip-autoremove   0.9.1
      requests         2.24.0
      setuptools       49.2.1
      six              1.15.0
      soupsieve        2.0.1
      urllib3          1.25.10
      virtualenv       20.2.2
      virtualenv-clone 0.5.4

Output of the virtual environment creation

Make sure to run the creation with -vvv --with-traceback:

254 setup logging to NOTSET [DEBUG report:43]
272 find interpreter for spec PythonSpec(path=c:\users\admin\appdata\local\programs\python\python39\python.exe) [INFO builtin:52]
272 proposed PythonInfo(spec=CPython3.9.1.final.0-64, exe=c:\users\admin\appdata\local\programs\python\python39\python.exe, platform=win32, version='3.9.1 (tags/v3.9.1:1e5d33e, Dec  7 2020, 17:08:21) [MSC v.1927 64 bit (AMD64)]', encoding_fs_io=utf-8-utf-8) [INFO builtin:58]
272 accepted PythonInfo(spec=CPython3.9.1.final.0-64, exe=c:\users\admin\appdata\local\programs\python\python39\python.exe, platform=win32, version='3.9.1 (tags/v3.9.1:1e5d33e, Dec  7 2020, 17:08:21) [MSC v.1927 64 bit (AMD64)]', encoding_fs_io=utf-8-utf-8) [DEBUG builtin:60]
279 symlink on filesystem does not work [DEBUG info:47]
280 filesystem is not case-sensitive [DEBUG info:28]
395 create virtual environment via CPython3Windows(dest=C:\Users\Admin\Documents\python-workspace\Project\vitenv, clear=False, no_vcs_ignore=False, global=False) [INFO session:52]
396 create folder C:\Users\Admin\Documents\python-workspace\Project\vitenv\Lib\site-packages [DEBUG _sync:25]
397 create folder C:\Users\Admin\Documents\python-workspace\Project\vitenv\Scripts [DEBUG _sync:25]
398 write C:\Users\Admin\Documents\python-workspace\Project\vitenv\pyvenv.cfg [DEBUG pyenv_cfg:34]
398     home = c:\users\admin\appdata\local\programs\python\python39 [DEBUG pyenv_cfg:38]
398     implementation = CPython [DEBUG pyenv_cfg:38]
399     version_info = 3.9.1.final.0 [DEBUG pyenv_cfg:38]
399     virtualenv = 20.2.2 [DEBUG pyenv_cfg:38]
399     include-system-site-packages = false [DEBUG pyenv_cfg:38]
399     base-prefix = c:\users\admin\appdata\local\programs\python\python39 [DEBUG pyenv_cfg:38]
399     base-exec-prefix = c:\users\admin\appdata\local\programs\python\python39 [DEBUG pyenv_cfg:38]
399     base-executable = c:\users\admin\appdata\local\programs\python\python39\python.exe [DEBUG pyenv_cfg:38]
401 copy c:\users\admin\appdata\local\programs\python\python39\Lib\venv\scripts\nt\python.exe to C:\Users\Admin\Documents\python-workspace\Project\vitenv\Scripts\python.exe [DEBUG _sync:52]
405 copy c:\users\admin\appdata\local\programs\python\python39\Lib\venv\scripts\nt\pythonw.exe to C:\Users\admin\Documents\python-workspace\Project\vitenv\Scripts\pythonw.exe [DEBUG _sync:52]
410 create virtualenv import hook file C:\Users\admin\Documents\python-workspace\Project\vitenv\Lib\site-packages\_virtualenv.pth [DEBUG api:95]
411 create C:\Users\admin\Documents\python-workspace\Project\vitenv\Lib\site-packages\_virtualenv.py [DEBUG api:98]
413 ============================== target debug ============================== [DEBUG session:54]
413 debug via 'C:\Users\admin\Documents\python-workspace\Project\vitenv\Scripts\python.exe' 'c:\users\admin\appdata\local\programs\python\python39\lib\site-packages\virtualenv\create\debug.py' [DEBUG creator:223]
413 {
  "sys": {
    "executable": "C:\\Users\\Admin\\Documents\\python-workspace\\Project\\vitenv\\Scripts\\python.exe",
    "_base_executable": "c:\\users\\admin\\appdata\\local\\programs\\python\\python39\\python.exe",
    "prefix": "C:\\Users\\Admin\\Documents\\python-workspace\\Project\\vitenv",
    "base_prefix": "c:\\users\\admin\\appdata\\local\\programs\\python\\python39",
    "real_prefix": null,
    "exec_prefix": "C:\\Users\\Admin\\Documents\\python-workspace\\Project\\vitenv",
    "base_exec_prefix": "c:\\users\\admin\\appdata\\local\\programs\\python\\python39",
    "path": [
      "c:\\users\\admin\\appdata\\local\\programs\\python\\python39\\python39.zip",
      "c:\\users\\admin\\appdata\\local\\programs\\python\\python39\\DLLs",
      "c:\\users\\admin\\appdata\\local\\programs\\python\\python39\\lib",
      "c:\\users\\admin\\appdata\\local\\programs\\python\\python39",
      "C:\\Users\\Admin\\Documents\\python-workspace\\Project\\vitenv",
      "C:\\Users\\Admin\\Documents\\python-workspace\\Project\\vitenv\\lib\\site-packages"
    ],
    "meta_path": [
      "<class '_virtualenv._Finder'>",
      "<class '_frozen_importlib.BuiltinImporter'>",
      "<class '_frozen_importlib.FrozenImporter'>",
      "<class '_frozen_importlib_external.PathFinder'>"
    ],
    "fs_encoding": "utf-8",
    "io_encoding": "cp1252"
  },
  "version": "3.9.1 (tags/v3.9.1:1e5d33e, Dec  7 2020, 17:08:21) [MSC v.1927 64 bit (AMD64)]",
  "makefile_filename": "c:\\users\\admin\\appdata\\local\\programs\\python\\python39\\Lib\\config\\Makefile",
  "os": "<module 'os' from 'c:\\\\users\\\\admin\\\\appdata\\\\local\\\\programs\\\\python\\\\python39\\\\lib\\\\os.py'>",
  "site": "<module 'site' from 'c:\\\\users\\\\admin\\\\appdata\\\\local\\\\programs\\\\python\\\\python39\\\\lib\\\\site.py'>",
  "datetime": "<module 'datetime' from 'c:\\\\users\\\\admin\\\\appdata\\\\local\\\\programs\\\\python\\\\python39\\\\lib\\\\datetime.py'>",
  "math": "<module 'math' (built-in)>",
  "json": "<module 'json' from 'c:\\\\users\\\\admin\\\\appdata\\\\local\\\\programs\\\\python\\\\python39\\\\lib\\\\json\\\\__init__.py'>"
} [DEBUG session:55]
1132 add seed packages via FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=C:\Users\Admin\AppData\Local\pypa\virtualenv) [INFO session:59]
1138 got embed update of distribution pip from C:\Users\Admin\AppData\Local\pypa\virtualenv\wheel\3.9\embed\1\pip.json [DEBUG via_disk_folder:135]
1138 got embed update of distribution setuptools from C:\Users\Admin\AppData\Local\pypa\virtualenv\wheel\3.9\embed\1\setuptools.json [DEBUG via_disk_folder:135]
1138 got embed update of distribution wheel from C:\Users\Admin\AppData\Local\pypa\virtualenv\wheel\3.9\embed\1\wheel.json [DEBUG via_disk_folder:135]
1145 got embed update of distribution pip from C:\Users\Admin\AppData\Local\pypa\virtualenv\wheel\3.9\embed\1\pip.json [DEBUG via_disk_folder:135]
1145 got embed update of distribution setuptools from C:\Users\Admin\AppData\Local\pypa\virtualenv\wheel\3.9\embed\1\setuptools.json [DEBUG via_disk_folder:135]
1146 got embed update of distribution wheel from C:\Users\Admin\AppData\Local\pypa\virtualenv\wheel\3.9\embed\1\wheel.json [DEBUG via_disk_folder:135]
1147 install pip from wheel c:\users\admin\appdata\local\programs\python\python39\lib\site-packages\virtualenv\seed\wheels\embed\pip-20.3.1-py2.py3-none-any.whl via CopyPipInstall [DEBUG via_app_data:49]
1147 install setuptools from wheel c:\users\admin\appdata\local\programs\python\python39\lib\site-packages\virtualenv\seed\wheels\embed\setuptools-51.0.0-py3-none-any.whl via CopyPipInstall [DEBUG via_app_data:49]
1148 install wheel from wheel c:\users\admin\appdata\local\programs\python\python39\lib\site-packages\virtualenv\seed\wheels\embed\wheel-0.36.1-py2.py3-none-any.whl via CopyPipInstall [DEBUG via_app_data:49]
1148 Attempting to acquire lock 2250055410400 on C:\Users\Admin\AppData\Local\pypa\virtualenv\wheel\3.9\image\1\CopyPipInstall\pip-20.3.1-py2.py3-none-any.lock [DEBUG filelock:270]
1149 Attempting to acquire lock 2250055411312 on C:\Users\Admin\AppData\Local\pypa\virtualenv\wheel\3.9\image\1\CopyPipInstall\setuptools-51.0.0-py3-none-any.lock [DEBUG filelock:270]
1149 Lock 2250055410400 acquired on C:\Users\Admin\AppData\Local\pypa\virtualenv\wheel\3.9\image\1\CopyPipInstall\pip-20.3.1-py2.py3-none-any.lock [INFO filelock:274]
1149 Lock 2250055411312 acquired on C:\Users\Admin\AppData\Local\pypa\virtualenv\wheel\3.9\image\1\CopyPipInstall\setuptools-51.0.0-py3-none-any.lock [INFO filelock:274]
1150 Attempting to acquire lock 2250055411072 on C:\Users\Admin\AppData\Local\pypa\virtualenv\wheel\3.9\image\1\CopyPipInstall\wheel-0.36.1-py2.py3-none-any.lock [DEBUG filelock:270]
1150 Attempting to release lock 2250055410400 on C:\Users\Admin\AppData\Local\pypa\virtualenv\wheel\3.9\image\1\CopyPipInstall\pip-20.3.1-py2.py3-none-any.lock [DEBUG filelock:315]
1150 Attempting to release lock 2250055411312 on C:\Users\Admin\AppData\Local\pypa\virtualenv\wheel\3.9\image\1\CopyPipInstall\setuptools-51.0.0-py3-none-any.lock [DEBUG filelock:315]
1151 Lock 2250055411072 acquired on C:\Users\Admin\AppData\Local\pypa\virtualenv\wheel\3.9\image\1\CopyPipInstall\wheel-0.36.1-py2.py3-none-any.lock [INFO filelock:274]
1151 Lock 2250055410400 released on C:\Users\Admin\AppData\Local\pypa\virtualenv\wheel\3.9\image\1\CopyPipInstall\pip-20.3.1-py2.py3-none-any.lock [INFO filelock:318]
1151 Lock 2250055411312 released on C:\Users\Admin\AppData\Local\pypa\virtualenv\wheel\3.9\image\1\CopyPipInstall\setuptools-51.0.0-py3-none-any.lock [INFO filelock:318]
1152 Attempting to release lock 2250055411072 on C:\Users\Admin\AppData\Local\pypa\virtualenv\wheel\3.9\image\1\CopyPipInstall\wheel-0.36.1-py2.py3-none-any.lock [DEBUG filelock:315]
1153 copy directory C:\Users\Admin\AppData\Local\pypa\virtualenv\wheel\3.9\image\1\CopyPipInstall\pip-20.3.1-py2.py3-none-any\pip to C:\Users\Admin\Documents\python-workspace\Project\vitenv\Lib\site-packages\pip [DEBUG _sync:52]
1154 copy C:\Users\Admin\AppData\Local\pypa\virtualenv\wheel\3.9\image\1\CopyPipInstall\setuptools-51.0.0-py3-none-any\distutils-precedence.pth to C:\Users\Admin\Documents\python-workspace\Project\vitenv\Lib\site-packages\distutils-precedence.pth [DEBUG _sync:52]
1154 Lock 2250055411072 released on C:\Users\Admin\AppData\Local\pypa\virtualenv\wheel\3.9\image\1\CopyPipInstall\wheel-0.36.1-py2.py3-none-any.lock [INFO filelock:318]
1157 copy directory C:\Users\Admin\AppData\Local\pypa\virtualenv\wheel\3.9\image\1\CopyPipInstall\wheel-0.36.1-py2.py3-none-any\wheel to C:\Users\Admin\Documents\python-workspace\Project\vitenv\Lib\site-packages\wheel [DEBUG _sync:52]
1158 copy C:\Users\Admin\AppData\Local\pypa\virtualenv\wheel\3.9\image\1\CopyPipInstall\setuptools-51.0.0-py3-none-any\easy_install.py to C:\Users\Admin\Documents\python-workspace\Project\vitenv\Lib\site-packages\easy_install.py [DEBUG _sync:52]
1162 copy directory C:\Users\Admin\AppData\Local\pypa\virtualenv\wheel\3.9\image\1\CopyPipInstall\setuptools-51.0.0-py3-none-any\pkg_resources to C:\Users\Admin\Documents\python-workspace\Project\vitenv\Lib\site-packages\pkg_resources [DEBUG _sync:52]
1204 copy directory C:\Users\Admin\AppData\Local\pypa\virtualenv\wheel\3.9\image\1\CopyPipInstall\wheel-0.36.1-py2.py3-none-any\wheel-0.36.1.dist-info to C:\Users\Admin\Documents\python-workspace\Project\vitenv\Lib\site-packages\wheel-0.36.1.dist-info [DEBUG _sync:52]
1209 copy directory C:\Users\Admin\AppData\Local\pypa\virtualenv\wheel\3.9\image\1\CopyPipInstall\setuptools-51.0.0-py3-none-any\setuptools to C:\Users\Admin\Documents\python-workspace\Project\vitenv\Lib\site-packages\setuptools [DEBUG _sync:52]
1224 copy C:\Users\Admin\AppData\Local\pypa\virtualenv\wheel\3.9\image\1\CopyPipInstall\wheel-0.36.1-py2.py3-none-any\wheel-0.36.1.virtualenv to C:\Users\Admin\Documents\python-workspace\Project\vitenv\Lib\site-packages\wheel-0.36.1.virtualenv [DEBUG _sync:52]
1234 generated console scripts wheel-3.9.exe wheel.exe wheel3.9.exe wheel3.exe [DEBUG base:48]
1556 copy directory C:\Users\Admin\AppData\Local\pypa\virtualenv\wheel\3.9\image\1\CopyPipInstall\setuptools-51.0.0-py3-none-any\setuptools-51.0.0.dist-info to C:\Users\Admin\Documents\python-workspace\Project\vitenv\Lib\site-packages\setuptools-51.0.0.dist-info [DEBUG _sync:52]
1580 copy C:\Users\Admin\AppData\Local\pypa\virtualenv\wheel\3.9\image\1\CopyPipInstall\setuptools-51.0.0-py3-none-any\setuptools-51.0.0.virtualenv to C:\Users\Admin\Documents\python-workspace\Project\vitenv\Lib\site-packages\setuptools-51.0.0.virtualenv [DEBUG _sync:52]
1584 copy directory C:\Users\Admin\AppData\Local\pypa\virtualenv\wheel\3.9\image\1\CopyPipInstall\setuptools-51.0.0-py3-none-any\_distutils_hack to C:\Users\Admin\Documents\python-workspace\Project\vitenv\Lib\site-packages\_distutils_hack [DEBUG _sync:52]
1598 generated console scripts easy_install3.9.exe easy_install.exe easy_install-3.9.exe easy_install3.exe [DEBUG base:48]
2159 copy directory C:\Users\Admin\AppData\Local\pypa\virtualenv\wheel\3.9\image\1\CopyPipInstall\pip-20.3.1-py2.py3-none-any\pip-20.3.1.dist-info to C:\Users\Admin\Documents\python-workspace\Project\vitenv\Lib\site-packages\pip-20.3.1.dist-info [DEBUG _sync:52]
2179 copy C:\Users\Admin\AppData\Local\pypa\virtualenv\wheel\3.9\image\1\CopyPipInstall\pip-20.3.1-py2.py3-none-any\pip-20.3.1.virtualenv to C:\Users\Admin\Documents\python-workspace\Project\vitenv\Lib\site-packages\pip-20.3.1.virtualenv [DEBUG _sync:52]
2189 generated console scripts pip3.9.exe pip-3.9.exe pip.exe pip3.exe [DEBUG base:48]
2189 add activators for Bash, Batch, Fish, PowerShell, Python, Xonsh [INFO session:64]
2200 write C:\Users\Admin\Documents\python-workspace\Project\vitenv\pyvenv.cfg [DEBUG pyenv_cfg:34]
2200    home = c:\users\Admin\appdata\local\programs\python\python39 [DEBUG pyenv_cfg:38]
2201    implementation = CPython [DEBUG pyenv_cfg:38]
2201    version_info = 3.9.1.final.0 [DEBUG pyenv_cfg:38]
2201    virtualenv = 20.2.2 [DEBUG pyenv_cfg:38]
2202    include-system-site-packages = false [DEBUG pyenv_cfg:38]
2202    base-prefix = c:\users\Admin\appdata\local\programs\python\python39 [DEBUG pyenv_cfg:38]
2202    base-exec-prefix = c:\users\Admin\appdata\local\programs\python\python39 [DEBUG pyenv_cfg:38]
2202    base-executable = c:\users\Admin\appdata\local\programs\python\python39\python.exe [DEBUG pyenv_cfg:38]
2203 created virtual environment CPython3.9.1.final.0-64 in 1957ms
  creator CPython3Windows(dest=C:\Users\Admin\Documents\python-workspace\Project\vitenv, clear=False, no_vcs_ignore=False, global=False)
  seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=C:\Users\Admin\AppData\Local\pypa\virtualenv)
    added seed packages: pip==20.3.1, setuptools==51.0.0, wheel==0.36.1
  activators BashActivator,BatchActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator [WARNING __main__:17]
@SunMaungOo SunMaungOo added the bug label Dec 18, 2020
@hafei
Copy link

hafei commented Dec 22, 2020

Same issue.

I think this is an issue with python39, when I upgraded to python39 I ran into this problem.

I downgraded the pip version to 20.2.1
There is no such problem
I think this is a problem with pip 20.3

pypa/pip#9223

please refer to this issue pypa/pip#9190

@SunMaungOo
Copy link
Author

@hafei

Thank you. It seem to be problem with pip.

When I downgrade to pip version 20.2.1, it work.

@pypa pypa locked and limited conversation to collaborators Jan 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants