I'm trying to create a standard virtual environment for a project. I have a working virtual environment with all the required modules. I have a batch file to install the required stuff.
A portion of the batch code looks like this:
pip install --no-index "altgraph-0.17-py2.py3-none-any.whl"
pip install --no-index "pefile-2017.8.1.zip"
pip install --no-index "pywin32_ctypes-0.2.0-py2.py3-none-any.whl"
pip install --no-index "setuptools-40.8.0-py2.py3-none-any.whl "
pip install --no-index "PyInstaller-3.6.tar.gz"
When I run this, I get the following error:
(py368) C:\Users\kgreen\Source\Repos\MapTools\py368_modules>pip install --no-index "PyInstaller-3.6.tar.gz"
Processing c:\users\kgreen\source\repos\maptools\py368_modules\pyinstaller-3.6.tar.gz
Installing build dependencies ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\kgreen\source\repos\maptools\py368\scripts\python.exe' 'c:\users\kgreen\source\repos\maptools\py368\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\kgreen\AppData\Local\Temp\pip-build-env-fcj_djos\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: --no-index -- 'setuptools>=40.8.0' wheel
cwd: None
Complete output (2 lines):
ERROR: Could not find a version that satisfies the requirement setuptools>=40.8.0
ERROR: No matching distribution found for setuptools>=40.8.0
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\kgreen\source\repos\maptools\py368\scripts\python.exe' 'c:\users\kgreen\source\repos\maptools\py368\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\kgreen\AppData\Local\Temp\pip-build-env-fcj_djos\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: --no-index -- 'setuptools>=40.8.0' wheel Check the logs for full command output.
But that is exactly the version of setuptools I installed! I had previously tried setuptools-41.4.0 and when that didn't work I tried going back to the exact version they error message mentions.
Note: I get the same error when I try to install gazpacho later on ... fails to recognize that setuptools>=40.8.0 is already installed.
Note: When I do a pip list, I see that the correct version of setuptools has indeed been installed.
(edit) Note: I forgot to mention that this must also work for systems that are not connected to the Internet, and so the solution must point to wheel files or zips, but not directly to PyPi.
I also tried manually typing the install after the fact, thinking maybe it need a delay to finish doing some processing on the prior install of setuptools. (maybe silly, but I desperate.) Why doesn't it see that version? How can I fix this?