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 creates nonportable exe files in conda virtual environments

See original GitHub issue
  • Pip version: 9.0.1
  • Python version: 3.6.1
  • Operating system: Windows 8.1x64 (Russian interface)

Description:

I’ve installed miniconda3 version 4.3.15 with Python 3.6 for Windows x64, then have created environment:

conda create -p E:\Jupyter\dist\pyenv3.6-win64 --copy python=3

Then I’ve activated created environment:

activate E:\Jupyter\dist\pyenv3.6-win64

After that I installed Numpy, Scipy and Matplotlib:

conda install --copy numpy scipy matplotlib

Then I decided to install Jupyter Notebook via pip:

pip install jupyter

After that I’ve deactivated environment:

deactivate

Jupyter Notebook works fine on my computer, but when I try to run it on other computer, I get error:

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

Then I’ve removed created environment and have recreated it. But I’ve installed Jupyter Notebook via conda:

conda install jupyter

So it seems to me that problem is in pip. Paths to all files don’t contain any nonlatin symbols and spaces as well.

P.S.:

After downloading and installing miniconda from official site, you need add canary channel and update conda (see this comment):

conda config --add channels conda-canary
conda update conda

If you haven’t made this update you will get error on matplotlib installation. Best regards, Andrey.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:30 (13 by maintainers)

github_iconTop GitHub Comments

2reactions
pkienzlecommented, Jan 9, 2020

The best case would be that pip “just works” in a relocatable environment, with no extra flags. Yes, I could hack the installed scripts afterward but this is brittle. I suppose this logic belongs in distlib so that pip and other installers don’t even have to know about it, or the magic string “<launcher_dir>”.

1reaction
pfmoorecommented, Apr 20, 2021

yes can do a lot but this thread has all reasons why we don’t want it in our project scripts

And all the reasons why we don’t want it in pip.

it needs to go from demo code to a new pypa project v1, how hard can it be?

I’ve no idea. I suggest you try doing it and find out.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Is using pip from conda environment folder the same as using ...
Yes, they are effectively the same because Conda environment activation prepends the environment's bin/ directory to PATH and therefore the ...
Read more >
Managing environments - Conda
Pip accepts a list of Python packages with -r or --requirements . Conda env will export or create environments based on a file...
Read more >
Using Pip in a Conda Environment - Anaconda
For projects available on PyPI, the conda skeleton command (which is part of conda-build) frequently produces a recipe which can be used create...
Read more >
Creating and managing virtual environments - Pydicom |
By the end of the tutorial you should have a fully functioning virtual environment ready for installing pydicom. If you're using pip as...
Read more >
The guide to Python virtual environments with conda - WhiteBox
When you create a new virtual environment, you can install Python libraries using both conda or pip. Most of the time there is...
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