question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pip install .whl create launchers that are pointing to a "fix address" python.exe, to the opposite of installing from .tar.gz format

See original GitHub issue

Hi all,

I have an issue when installing from a .whl format instead of a .tar format ,on windows. Indeed :

  • apparently the .whl format create an executable launcher that point to the FIXED “python.exe” address that unpacked it,
  • the .tar format doesn’t do that.

==> as I’m creating an “usb” windows distribution, Winpython, that users do unpack/install (and move) anywhere on their PC, the application.exe doesn’t want to launch on their PC, as it doesn’t find a python in that “not-existing” ‘construction site of the original PC’ place.

==> Is it a bug ?

==> Is it a missing .whl installation option when preparing the “usb” distribution ?

(otherwise, could there be an option when installing the .whl ?)

example:

  • pylint.1.4.0.tar.gz creates a working pylint.exe of 65 536 bytes
  • pylint-1.4.0-py2.py3-none-any.whl creates a ‘fixed-adress pointing’ pylint.exe of 92 041 bytes

other simpler example:

  • pep8-1.5.7.tar.gz creates a working pep8.exe of 65 536 bytes
  • pep8-1.5.7-py2.py3-none-any.whl creates a ‘fixed-address pointing’ pep8.exe of 92 029 bytes

typical error message:

D:\result_tests\WinPython-64bit-3.4.2.4_build0\python-3.4.2.amd64>pylint
Fatal error in launcher: Unable to create process using '"D:\Winpython\basedir34
\build\winpython-3.4.2.amd64\python-3.4.2.amd64\python.exe" "D:\result_tests\Win
Python-64bit-3.4.2.4_build0\python-3.4.2.amd64\Scripts\pylint.exe" '

D:\result_tests\WinPython-64bit-3.4.2.4_build0\python-3.4.2.amd64>

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:23 (21 by maintainers)

github_iconTop GitHub Comments

1reaction
ankostiscommented, Oct 6, 2015

I’m clarifying the situation in the help of others like me.

If you relocate WinPython base-folder, all wheels containing executables that have been installed manually by the user will fail to start-up with this error:

Fatal error in launcher: Unable to create process using '"'

To fix it, patch pip like that and re-install affected packages (hand made patch):

++++ <python-dir>/Lib/site-packages/pip/_vendor/distlib/scripts.py#L126
@@ -126, +126 @@
  elif not sysconfig.is_python_build():
-     executable = get_executable()
+     executable = os.path.join(os.path.basename(get_executable()))
  elif in_venv():

Remember to re-apply patch after every reinstalling pip.

Read more comments on GitHub >

github_iconTop Results From Across the Web

pip install .whl create launchers that are pointing to a "fix ...
pip install .whl create launchers that are pointing to a "fix address" python.exe, to the opposite of installing from .tar.gz format #130.
Read more >
How do I install a Python package with a .whl file?
I just used the following which was quite simple. First open a console then cd to where you've downloaded your file like some-package.whl...
Read more >
How to install, download and build Python wheels - ActiveState
Open source Python packages can be installed from Source Distributions (sdist) or Wheels (whl). According to the Python Packaging Authority ( ...
Read more >
setuptools 2.1 - PyPI
Easily download, build, install, upgrade, and uninstall Python packages.
Read more >
pip vs easy_install - Python Packaging User Guide
It was notable at the time for installing packages from PyPI using requirement specifiers, and automatically installing dependencies. pip came later in 2008,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found