Reputation: 330
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
Upvotes: 2
Views: 1449
Reputation: 1
$ conda update conda
$ conda create -n new-env-name python=3.8 # Replace python=3.8 with your desired Python version
$ conda activate new-env-name
$ conda install -c conda-forge pyinstaller
$ pip install pyinstaller
If the env is already activated then only use install command to install pyinstaller
.
Upvotes: -1
Reputation: 11
Might not be pretty but you can download the .conda/.tar.bz2 file from the anaconda website, you can then install it with:
conda install *filepath to file* --offline
Make sure you check for dependencies and ensure they are fulfilled prior.
Upvotes: 1
Reputation: 41367
First I created a conda environment using the following command:
conda create --name myEnv
Now check the conda version with conda --version
:
conda --version
conda 23.5.2
After that you could simply install the package using conda install pyinstaller
:
conda install pyinstaller
Collecting package metadata (current_repodata.json): done
Solving environment: done
==> WARNING: A newer version of conda exists. <==
current version: 23.5.2
latest version: 23.7.2
Please update conda by running
$ conda update -n base -c defaults conda
Or to minimize the number of packages updated during conda update use
conda install conda=23.7.2
## Package Plan ##
environment location: /Users/quinten/opt/miniconda3/envs/myEnv
added / updated specs:
- pyinstaller
The following packages will be downloaded:
package | build
---------------------------|-----------------
altgraph-0.17.3 | py311hecd8cb5_0 41 KB
macholib-1.16.2 | py311hecd8cb5_0 89 KB
pip-23.2.1 | py311hecd8cb5_0 3.3 MB
pyinstaller-5.6.2 | py311h6c40b1e_0 1.2 MB
pyinstaller-hooks-contrib-2022.14| py311hecd8cb5_0 178 KB
setuptools-68.0.0 | py311hecd8cb5_0 1.2 MB
------------------------------------------------------------
Total: 6.0 MB
The following NEW packages will be INSTALLED:
altgraph pkgs/main/osx-64::altgraph-0.17.3-py311hecd8cb5_0
bzip2 pkgs/main/osx-64::bzip2-1.0.8-h1de35cc_0
ca-certificates pkgs/main/osx-64::ca-certificates-2023.05.30-hecd8cb5_0
libffi pkgs/main/osx-64::libffi-3.4.4-hecd8cb5_0
macholib pkgs/main/osx-64::macholib-1.16.2-py311hecd8cb5_0
ncurses pkgs/main/osx-64::ncurses-6.4-hcec6c5f_0
openssl pkgs/main/osx-64::openssl-3.0.10-hca72f7f_0
pip pkgs/main/osx-64::pip-23.2.1-py311hecd8cb5_0
pyinstaller pkgs/main/osx-64::pyinstaller-5.6.2-py311h6c40b1e_0
pyinstaller-hooks~ pkgs/main/osx-64::pyinstaller-hooks-contrib-2022.14-py311hecd8cb5_0
python pkgs/main/osx-64::python-3.11.4-hf27a42d_0
readline pkgs/main/osx-64::readline-8.2-hca72f7f_0
setuptools pkgs/main/osx-64::setuptools-68.0.0-py311hecd8cb5_0
sqlite pkgs/main/osx-64::sqlite-3.41.2-h6c40b1e_0
tk pkgs/main/osx-64::tk-8.6.12-h5d9f67b_0
tzdata pkgs/main/noarch::tzdata-2023c-h04d1e81_0
wheel pkgs/main/osx-64::wheel-0.38.4-py311hecd8cb5_0
xz pkgs/main/osx-64::xz-5.4.2-h6c40b1e_0
zlib pkgs/main/osx-64::zlib-1.2.13-h4dc903c_0
Proceed ([y]/n)? y
Downloading and Extracting Packages
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
Now let's check if the package is installed using conda list pyinstaller
:
conda list pyinstaller
# packages in environment at /Users/quinten/opt/miniconda3/envs/myEnv:
#
# Name Version Build Channel
pyinstaller 5.6.2 py311h6c40b1e_0
pyinstaller-hooks-contrib 2022.14 py311hecd8cb5_0
Upvotes: 2
Reputation: 6115
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
Upvotes: 3