Python Forum
Building Wheel files (why would it ask for the wrong version?)
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Building Wheel files (why would it ask for the wrong version?)
#1
I've been getting some unexpected behavior when creating a wheel for a manual build of Pytorch. If I decide to just directly install it (using python 3.8), it works perfectly, but if I try to save those files to a wheel, and install from directly from that it suddenly decides that python 3.7 and under should be required.

This is bash code, but the problem is python based
# I'm doing it inside a custom conda environment
source activate $CONDA_ROOT
# Just a temp directory to save out the wheel to
mkdir /opt/conda/wheel-pytorch
git clone https://github.com/pytorch/pytorch.git
cd pytorch
git submodule sync && git submodule update --init --recursive
TORCH_CUDA_ARCH_LIST="3.5 5.2 6.0 6.1 7.0+PTX" TORCH_NVCC_FLAGS="-Xfatbin -compress-all" \
CMAKE_PREFIX_PATH="$(dirname $(which conda))/../" \
# If these last two lines are replaced with a simple "pip install -v" . , the install works
pip wheel . --wheel-dir=/opt/conda/wheel-pytorch
pip install --no-index --find-links=/opt/conda/wheel-pytorch -r requirements.txt
This is what happens when trying to run the above code. It breaks the Dockerfile that I'm creating it with (for the purpose of a non-bloated multistage build)

Error:
Looking in links: /opt/conda/wheel-pytorch Ignoring dataclasses: markers 'python_version < "3.7"' don't match your environment ERROR: Could not find a version that satisfies the requirement future ERROR: No matching distribution found for future
I suspect that some of the dependencies might be responsible for asking for the wrong python version, but why would it break during an install using the wheel (with the same exact version) if it worked on the standard install.

Is there a way to force the wheel to behave as expected and respect the specs of the environment that built it?
Reply
#2
Might have been a mindless oversight instead of a problem with the wheel package.

Testing a build to see if changing directories will fix the problem (looking at the wrong requirements.txt)

Will update thread in case it works.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Downloading time zone aware files, getting wrong files(by date))s tester_V 9 1,017 Jul-23-2023, 08:32 AM
Last Post: deanhystad
  Am I wrong or is Udemy wrong? String Slicing! Mavoz 3 2,535 Nov-05-2022, 11:33 AM
Last Post: Mavoz
  Python wheel packages - how to add timestamp to the wheel name? vcankovic 0 959 Jul-06-2022, 12:04 PM
Last Post: vcankovic
  python wheel file Led_Zeppelin 1 1,192 Jun-15-2022, 04:08 PM
Last Post: Led_Zeppelin
  Building python (3.9.5) with different libexpat version (2.4.6) raghupcr 0 1,304 Feb-25-2022, 11:29 AM
Last Post: raghupcr
  Unpacking wheel files DavidTheGrockle 3 11,280 Dec-15-2020, 05:11 PM
Last Post: DavidTheGrockle
  pip install -e ., ERROR: Failed building wheel for pyfarmhash mostafaPython 1 6,299 Jun-09-2020, 08:24 PM
Last Post: mcmxl22
  Wrong pip3 python location or new Version 007fred50 1 3,777 Apr-02-2020, 02:36 PM
Last Post: philgoetz
  compiled cpython output wrong version bigrockcrasher 0 1,503 Feb-25-2020, 06:31 PM
Last Post: bigrockcrasher
  Error building wheel for grpcio on win10 Topiii 1 5,206 Nov-13-2019, 03:08 PM
Last Post: snippsat

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020