Search code examples
pythonpipanacondacondapyinstaller

Unable to install pyinstaller in anaconda environment


I have an environment in Anaconda called myEnv. I am trying to install pyinstaller to it. I tried all 3 of the options given here https://anaconda.org/conda-forge/pyinstaller for installing pyinstaller, however, none of them worked.

This is what the message looks like in Anaconda Prompt:

Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve. 

PackagesNotFoundError: The following packages are not available from current channels:
-pyinstaller 

This is weird since I do have conda-forge as a channel:

conda config --show channels

The response is:

channels:
- defaults
- conda-forge

As a last resort, I tried pip install pyinstaller and that gave an error.

WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 407 Proxy Authentication Required'))': /simple/pyinstaller/
ERROR: Could not find a version that satisfies the requirement pyinstaller (from versions: none)
ERROR: No matching distribution found for pyinstaller
WARNING: There was an error checking the latest version of pip.

Edit: I also tried conda update conda but that still didn't seem to do the trick.

Installing it from the Anaconda channel also didn't work:

conda install -c anaconda pyinstaller

It just gave me the same error when I tried to install pyinstaller from the conda-forge channel.

Some Extra Details:

My Python version: 3.10.9

Laptop: Windows 64


Solution

  • You can directly install pyinstaller from GitHub

    python -m pip install git+https://github.com/pyinstaller/pyinstaller
    

    If you're using a conda env file, you can also configure the package to be installed in the same way.

    name: myEnv
    channels:
    dependencies:
       - pip:
         - "--editable=git+https://github.com/pyinstaller/pyinstaller"
         # other dependencies