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

pyinstaller 4.2 do not support Python embed 3.9.2 #5599

Closed
ivysrono opened this issue Mar 3, 2021 · 5 comments
Closed

pyinstaller 4.2 do not support Python embed 3.9.2 #5599

ivysrono opened this issue Mar 3, 2021 · 5 comments

Comments

@ivysrono
Copy link

ivysrono commented Mar 3, 2021

Same issue: #4513

Windows 10 x64

.\pip.exe install PyInstaller


PS .\python-3.9.2-embed-win32\Scripts> .\pip.exe install PyInstaller
Collecting PyInstaller
  Using cached pyinstaller-4.2.tar.gz (3.6 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Collecting pefile>=2017.8.1
  Using cached pefile-2019.4.18.tar.gz (62 kB)
Requirement already satisfied: setuptools in .\python-3.9.2-embed-win32\lib\site-packages (from PyInstaller) (54.0.0)
Collecting altgraph
  Using cached altgraph-0.17-py2.py3-none-any.whl (21 kB)
Collecting pywin32-ctypes>=0.2.0
  Using cached pywin32_ctypes-0.2.0-py2.py3-none-any.whl (28 kB)
Collecting pyinstaller-hooks-contrib>=2020.6
  Using cached pyinstaller_hooks_contrib-2020.11-py2.py3-none-any.whl (172 kB)
Collecting future
  Downloading future-0.18.2.tar.gz (829 kB)
     |████████████████████████████████| 829 kB 9.3 kB/s
    ERROR: Command errored out with exit status 1:
     command: '.\python-3.9.2-embed-win32\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\xx\\AppData\\Local\\Temp\\pip-install-9vawqxb2\\future_9b8fa746c9154bcfaeefa5052459ef26\\setup.py'"'"'; __file__='"'"'C:\\Users\\xx\\AppData\\Local\\Temp\\pip-install-9vawqxb2\\future_9b8fa746c9154bcfaeefa5052459ef26\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\Pp\AppData\Local\Temp\pip-pip-egg-info-ii740vam'
         cwd: C:\Users\Pp\AppData\Local\Temp\pip-install-9vawqxb2\future_9b8fa746c9154bcfaeefa5052459ef26\
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\Pp\AppData\Local\Temp\pip-install-9vawqxb2\future_9b8fa746c9154bcfaeefa5052459ef26\setup.py", line 86, in <module>
        import src.future
    ModuleNotFoundError: No module named 'src'
    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/45/0b/38b06fd9b92dc2b68d58b75f900e97884c45bedd2ff83203d933cf5851c9/future-0.18.2.tar.gz#sha256=b1bead90b70cf6ec3f0710ae53a525360fa360d306a86583adc6bf83a4db537d (from https://pypi.org/simple/future/) (requires-python:>=2.6, !=3.0.*, !=3.1.*, !=3.2.*). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
  Downloading future-0.18.1.tar.gz (828 kB)
     |████████████████████████████████| 828 kB 12 kB/s
    ERROR: Command errored out with exit status 1:
     command: '.\python-3.9.2-embed-win32\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\xx\\AppData\\Local\\Temp\\pip-install-9vawqxb2\\future_4dcf1af6e72e4c628c9ec644891b1b62\\setup.py'"'"'; __file__='"'"'C:\\Users\\xx\\AppData\\Local\\Temp\\pip-install-9vawqxb2\\future_4dcf1af6e72e4c628c9ec644891b1b62\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\Pp\AppData\Local\Temp\pip-pip-egg-info-e7joukw2'
         cwd: C:\Users\Pp\AppData\Local\Temp\pip-install-9vawqxb2\future_4dcf1af6e72e4c628c9ec644891b1b62\
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\Pp\AppData\Local\Temp\pip-install-9vawqxb2\future_4dcf1af6e72e4c628c9ec644891b1b62\setup.py", line 86, in <module>
        import src.future
    ModuleNotFoundError: No module named 'src'
    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/3f/bf/57733d44afd0cf67580658507bd11d3ec629612d5e0e432beb4b8f6fbb04/future-0.18.1.tar.gz#sha256=858e38522e8fd0d3ce8f0c1feaf0603358e366d5403209674c7b617fa0c24093 (from https://pypi.org/simple/future/) (requires-python:>=2.6, !=3.0.*, !=3.1.*, !=3.2.*). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
  Downloading future-0.18.0.tar.gz (830 kB)
     |████████████████████████████████| 830 kB 8.7 kB/s
    ERROR: Command errored out with exit status 1:
     command: '.\python-3.9.2-embed-win32\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\xx\\AppData\\Local\\Temp\\pip-install-9vawqxb2\\future_76c985a6ad4845e2a7f677a3105b95bc\\setup.py'"'"'; __file__='"'"'C:\\Users\\xx\\AppData\\Local\\Temp\\pip-install-9vawqxb2\\future_76c985a6ad4845e2a7f677a3105b95bc\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\Pp\AppData\Local\Temp\pip-pip-egg-info-lhi96ezz'
         cwd: C:\Users\Pp\AppData\Local\Temp\pip-install-9vawqxb2\future_76c985a6ad4845e2a7f677a3105b95bc\
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\Pp\AppData\Local\Temp\pip-install-9vawqxb2\future_76c985a6ad4845e2a7f677a3105b95bc\setup.py", line 86, in <module>
        import src.future
    ModuleNotFoundError: No module named 'src'
    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/f6/85/c273089eb6efa5644c0a1382ea553554bc0d40e00a46d989ec67f123f8b5/future-0.18.0.tar.gz#sha256=6142ef79e2416e432931d527452a1cab3aa4a754a0a53d25b2589f79e1106f34 (from https://pypi.org/simple/future/) (requires-python:>=2.6, !=3.0.*, !=3.1.*, !=3.2.*). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
  Downloading future-0.17.1.tar.gz (829 kB)
     |████████████████████████████████| 829 kB 10 kB/s
    ERROR: Command errored out with exit status 1:
     command: '.\python-3.9.2-embed-win32\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\xx\\AppData\\Local\\Temp\\pip-install-9vawqxb2\\future_3276ab4dfd654d748f287ae4c5a8b856\\setup.py'"'"'; __file__='"'"'C:\\Users\\xx\\AppData\\Local\\Temp\\pip-install-9vawqxb2\\future_3276ab4dfd654d748f287ae4c5a8b856\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\Pp\AppData\Local\Temp\pip-pip-egg-info-x2hi6_ig'
         cwd: C:\Users\Pp\AppData\Local\Temp\pip-install-9vawqxb2\future_3276ab4dfd654d748f287ae4c5a8b856\
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\Pp\AppData\Local\Temp\pip-install-9vawqxb2\future_3276ab4dfd654d748f287ae4c5a8b856\setup.py", line 87, in <module>
        import src.future
    ModuleNotFoundError: No module named 'src'
    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/90/52/e20466b85000a181e1e144fd8305caf2cf475e2f9674e797b222f8105f5f/future-0.17.1.tar.gz#sha256=67045236dcfd6816dc439556d009594abf643e5eb48992e36beac09c2ca659b8 (from https://pypi.org/simple/future/) (requires-python:>=2.6, !=3.0.*, !=3.1.*, !=3.2.*). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
  Downloading future-0.17.0.tar.gz (827 kB)
     |███████████████████████▌        | 604 kB 14 kB/s eta 0:00:16ERROR: Exception:
Traceback (most recent call last):
  File ".\python-3.9.2-embed-win32\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 171, in _merge_into_criterion
    crit = self.state.criteria[name]
KeyError: 'future'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File ".\python-3.9.2-embed-win32\lib\site-packages\pip\_vendor\urllib3\response.py", line 438, in _error_catcher
    yield
  File ".\python-3.9.2-embed-win32\lib\site-packages\pip\_vendor\urllib3\response.py", line 519, in read
    data = self._fp.read(amt) if not fp_closed else b""
  File ".\python-3.9.2-embed-win32\lib\site-packages\pip\_vendor\cachecontrol\filewrapper.py", line 62, in read
    data = self.__fp.read(amt)
  File "http\client.py", line 458, in read
  File "http\client.py", line 502, in readinto
  File "socket.py", line 704, in readinto
  File "ssl.py", line 1241, in recv_into
  File "ssl.py", line 1099, in read
socket.timeout: The read operation timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File ".\python-3.9.2-embed-win32\lib\site-packages\pip\_internal\cli\base_command.py", line 189, in _main
    status = self.run(options, args)
  File ".\python-3.9.2-embed-win32\lib\site-packages\pip\_internal\cli\req_command.py", line 178, in wrapper
    return func(self, options, args)
  File ".\python-3.9.2-embed-win32\lib\site-packages\pip\_internal\commands\install.py", line 316, in run
    requirement_set = resolver.resolve(
  File ".\python-3.9.2-embed-win32\lib\site-packages\pip\_internal\resolution\resolvelib\resolver.py", line 121, in resolve
    self._result = resolver.resolve(
  File ".\python-3.9.2-embed-win32\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 453, in resolve
    state = resolution.resolve(requirements, max_rounds=max_rounds)
  File ".\python-3.9.2-embed-win32\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 347, in resolve
    failure_causes = self._attempt_to_pin_criterion(name, criterion)
  File ".\python-3.9.2-embed-win32\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 207, in _attempt_to_pin_criterion
    criteria = self._get_criteria_to_update(candidate)
  File ".\python-3.9.2-embed-win32\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 199, in _get_criteria_to_update
    name, crit = self._merge_into_criterion(r, parent=candidate)
  File ".\python-3.9.2-embed-win32\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 173, in _merge_into_criterion
    crit = Criterion.from_requirement(self._p, requirement, parent)
  File ".\python-3.9.2-embed-win32\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 82, in from_requirement
    if not cands:
  File ".\python-3.9.2-embed-win32\lib\site-packages\pip\_vendor\resolvelib\structs.py", line 124, in __bool__
    return bool(self._sequence)
  File ".\python-3.9.2-embed-win32\lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 143, in __bool__
    return any(self)
  File ".\python-3.9.2-embed-win32\lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 38, in _iter_built
    candidate = func()
  File ".\python-3.9.2-embed-win32\lib\site-packages\pip\_internal\resolution\resolvelib\factory.py", line 167, in _make_candidate_from_link
    self._link_candidate_cache[link] = LinkCandidate(
  File ".\python-3.9.2-embed-win32\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 300, in __init__
    super().__init__(
  File ".\python-3.9.2-embed-win32\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 144, in __init__
    self.dist = self._prepare()
  File ".\python-3.9.2-embed-win32\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 226, in _prepare
    dist = self._prepare_distribution()
  File ".\python-3.9.2-embed-win32\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 311, in _prepare_distribution
    return self._factory.preparer.prepare_linked_requirement(
  File ".\python-3.9.2-embed-win32\lib\site-packages\pip\_internal\operations\prepare.py", line 457, in prepare_linked_requirement
    return self._prepare_linked_requirement(req, parallel_builds)
  File ".\python-3.9.2-embed-win32\lib\site-packages\pip\_internal\operations\prepare.py", line 480, in _prepare_linked_requirement
    local_file = unpack_url(
  File ".\python-3.9.2-embed-win32\lib\site-packages\pip\_internal\operations\prepare.py", line 230, in unpack_url
    file = get_http_url(
  File ".\python-3.9.2-embed-win32\lib\site-packages\pip\_internal\operations\prepare.py", line 108, in get_http_url
    from_path, content_type = download(link, temp_dir.path)
  File ".\python-3.9.2-embed-win32\lib\site-packages\pip\_internal\network\download.py", line 163, in __call__
    for chunk in chunks:
  File ".\python-3.9.2-embed-win32\lib\site-packages\pip\_internal\cli\progress_bars.py", line 159, in iter
    for x in it:
  File ".\python-3.9.2-embed-win32\lib\site-packages\pip\_internal\network\utils.py", line 64, in response_chunks
    for chunk in response.raw.stream(
  File ".\python-3.9.2-embed-win32\lib\site-packages\pip\_vendor\urllib3\response.py", line 576, in stream
    data = self.read(amt=amt, decode_content=decode_content)
  File ".\python-3.9.2-embed-win32\lib\site-packages\pip\_vendor\urllib3\response.py", line 541, in read
    raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
  File "contextlib.py", line 135, in __exit__
  File ".\python-3.9.2-embed-win32\lib\site-packages\pip\_vendor\urllib3\response.py", line 443, in _error_catcher
    raise ReadTimeoutError(self._pool, None, "Read timed out.")
pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.
@ivysrono ivysrono changed the title pyinstaller 3.5 do not support Python embed 3.9.2 pyinstaller 4.2 do not support Python embed 3.9.2 Mar 3, 2021
@bwoodsend
Copy link
Member

bwoodsend commented Mar 3, 2021

Duplicate of #4989.

@rokm
Copy link
Member

rokm commented Mar 3, 2021

Duplicate of #4989.

Actually, it's not. #4989 is about freezing a program (with successfully installed PyInstaller).

The above log is from a failed attempt to install PyInstaller, but those errors have nothing to do with PyInstaller. The package that's failing to install is future, and likely due to incorrectly set up environment with embedded python.

@rokm
Copy link
Member

rokm commented Mar 3, 2021

Anyhow, it seems the error can be avoided by (temporarily) renaming/removing python39._pth.

But afterwards, freezing programs will not work due to #4989.

@ivysrono
Copy link
Author

ivysrono commented Mar 3, 2021

@rokm Thank you, I will try again.

@ivysrono
Copy link
Author

ivysrono commented Mar 3, 2021

I uncomment #import site in python39._pth.
By default, it's ok.
@rokm is right, thanks.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants