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.

Python 3.6.0 embedded and pip installation

See original GitHub issue
  • Pip version: get-pip.py
  • Python version: 3.6.0 (Win64)
  • Operating System: Windows 10 x64

Description:

Pip won’t install on python 3.6.0 embedded on Windows 10. Pip installs without errors on python 3.5.2 embedded on Windows 10.

What I’ve run:

D:\APPS\python-3.6.0-embed-amd64>python
Python 3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 08:06:12) [MSC v.1900 64 bit (AMD64)] on win32
>>>

D:\APPS\python-3.6.0-embed-amd64>python get-pip.py
Traceback (most recent call last):
  File "get-pip.py", line 20061, in <module>
    main()
  File "get-pip.py", line 194, in main
    bootstrap(tmpdir=tmpdir)
  File "get-pip.py", line 82, in bootstrap
    import pip
  File "<frozen importlib._bootstrap>", line 961, in _find_and_load
  File "<frozen importlib._bootstrap>", line 950, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 646, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 616, in _load_backward_compatible
  File "C:\Users\M\AppData\Local\Temp\tmp82eue0h9\pip.zip\pip\__init__.py", line 26, in <module>
  File "<frozen importlib._bootstrap>", line 961, in _find_and_load
  File "<frozen importlib._bootstrap>", line 950, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 646, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 616, in _load_backward_compatible
  File "C:\Users\M\AppData\Local\Temp\tmp82eue0h9\pip.zip\pip\utils\__init__.py", line 23, in <module>
  File "<frozen importlib._bootstrap>", line 961, in _find_and_load
  File "<frozen importlib._bootstrap>", line 950, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 646, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 616, in _load_backward_compatible
  File "C:\Users\M\AppData\Local\Temp\tmp82eue0h9\pip.zip\pip\locations.py", line 88, in <module>
  File "ntpath.py", line 75, in join
TypeError: expected str, bytes or os.PathLike object, not NoneType

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:7
  • Comments:37 (15 by maintainers)

github_iconTop GitHub Comments

23reactions
ccllcommented, Feb 21, 2017

@pfmoore Really nice to know there is a solution! Thanks! For now I work around this by modifying ‘python36._pth’:

lib/site-packages
python36.zip
.
# Uncomment to run site.main() automatically
import site

Then pip install all the packages into the lib/site-packages. I’ll definitely try your approach later, it looks less hackish.

17reactions
ccllcommented, Feb 20, 2017

@pfmoore For me I’m using Python to develop client side program for non-technical guys, using embeddable-python is more convenient and less surprise when the product is delivered. Just unzip and click (this batch script which calls embedded-python.exe main.py) and the user is good to go. As long as the source code(or byte code) leak is not a concern to us, it’s much simpler and stable than py2exe/pyinstaller and the variants. For now Python lacks good support for portable installation is really a PITA in such client-side use cases, where require the user to deploy & setup a Python environment is a big NO NO.

Read more comments on GitHub >

github_iconTop Results From Across the Web

pip with embedded python - Stack Overflow
Download and unzip Python embeddable zip file. · In the file python39._pth or similar, uncomment the import command. · Download get-pip.py to the...
Read more >
Python Release Python 3.6.0
Python 3.6.0. Release Date: Dec. 23, 2016. Note: The release you are looking at is Python 3.6.0, the initial feature release for the...
Read more >
Install Python with pip on Windows by the embeddable zip file
Hi, to install Python on Windows download the latest version. In this example Python 3.6.5. Extract the zip file to an directory, ...
Read more >
3. Using Python on Windows — documentation Python 3.6.1
Installs Python Launcher for Windows for all users. 1. Include_lib, Install standard library and extension modules, 1. Include_pip, Install bundled pip and ...
Read more >
How to install Python Embedded and Pip - YouTube
This video goes through the installation embedded version of python and sets up the environment with pip.
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