Skip to content

Commit

Permalink
Add numpy as an explicit dependency.
Browse files Browse the repository at this point in the history
As of pytorch/pytorch#52794, numpy is a dynamic
dependency and is not installed automatically when installing torch.
  • Loading branch information
dstein64 committed Jun 15, 2021
1 parent df09d74 commit 41859e8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/build.yml
Expand Up @@ -49,12 +49,11 @@ jobs:
- name: Install Torch (windows)
if: startsWith(matrix.os, 'windows-')
run: |
pip install torch==1.8.0+cpu torchvision==0.9.0+cpu `
pip install torch==1.9.0+cpu torchvision==0.10.0+cpu `

This comment has been minimized.

Copy link
@malfet

malfet Jun 15, 2021

Windows CPU PyTorch binaries are available via https://pypi.org/project/torch/#files so you don't need a special rule here

This comment has been minimized.

Copy link
@dstein64

dstein64 Jun 15, 2021

Author Owner

Thanks @malfet! I just removed the special handling in 253ed66.

I think I added that handling around the time of PyTorch 1.4.0, when there were no Windows binaries and I may have encountered an issue trying to build from source.

FYI, the Windows CPU Pip installation instructions at https://pytorch.org/ show:

pip3 install torch==1.9.0+cpu torchvision==0.10.0+cpu torchaudio===0.9.0 -f https://download.pytorch.org/whl/torch_stable.html

in contrast to a simplification that can presumably be made based on your comment.

(if Linux CPU binaries are also available via pypi.org, my FYI above applies for that too)

This comment has been minimized.

Copy link
@malfet

malfet Jun 15, 2021

Thank you for the feedback, let me update the installation instructions on the website:
pytorch/pytorch.github.io#757

-f https://download.pytorch.org/whl/torch_stable.html
- name: Install
run: |
pip install numpy
pip install .
- name: Test
Expand Down
2 changes: 1 addition & 1 deletion pastiche/version.txt
@@ -1 +1 @@
1.2.0
1.3.0
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -37,7 +37,7 @@
package_data={'pastiche': ['version.txt', 'vgg19_weights_tf_dim_ordering_tf_kernels_notop_q.bin']},
packages=['pastiche'],
python_requires='>=3.6',
install_requires=['h5py', 'pillow', 'torch', 'torchvision'],
install_requires=['h5py', 'numpy', 'pillow', 'torch', 'torchvision'],
url='https://github.com/dstein64/pastiche',
version=version,
)

0 comments on commit 41859e8

Please sign in to comment.