Skip to content

Commit 63b1ee4

Browse files
committed
removing pillow because cannot resolve it
1 parent 9520021 commit 63b1ee4

File tree

6 files changed

+41
-38
lines changed

6 files changed

+41
-38
lines changed

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ matplotlib
33
networkx
44
numba
55
numpy
6-
pillow
6+
# pillow
77
planarity
88
scipy
99
sympy

src/compas/plotters/core/helpers.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from numpy import argmin
44
from numpy import zeros
55

6+
import matplotlib
67
from mpl_toolkits.mplot3d.art3d import Poly3DCollection
78

89
from compas.plotters.core.utilities import assert_axes_dimension

src/compas/plotters/mogaplotter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
from __future__ import division
44

55
import os
6-
import matplotlib
76
import re
87
import json
8+
import matplotlib
99
import matplotlib.pyplot as plt
1010
from matplotlib.backends.backend_pdf import PdfPages
1111

src/compas/plotters/networkplotter.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from __future__ import absolute_import
33
from __future__ import division
44

5+
import matplotlib
56
from matplotlib.patches import Circle
67

78
from compas.utilities import valuedict

src/compas/plotters/plotter.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
from contextlib import contextmanager
1111

12+
import matplotlib
1213
import matplotlib.pyplot as plt
1314

1415
from matplotlib.patches import Circle

src/compas/utilities/remote.py

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,16 @@
1313
from urllib2 import urlopen
1414
from urllib import urlretrieve
1515

16-
try:
17-
from PIL import Image
18-
except ImportError:
19-
if compas.is_windows():
20-
compas.raise_if_not_ironpython()
21-
elif not compas.is_mono():
22-
raise
16+
# try:
17+
# from PIL import Image
18+
# except ImportError:
19+
# if compas.is_windows():
20+
# compas.raise_if_not_ironpython()
21+
# elif not compas.is_mono():
22+
# raise
2323

2424

25-
__all__ = ['download_file_from_remote', 'download_image_from_remote']
25+
__all__ = ['download_file_from_remote']
2626

2727

2828
def download_file_from_remote(source, target, overwrite=True):
@@ -67,42 +67,42 @@ def download_file_from_remote(source, target, overwrite=True):
6767
urlretrieve(source, target)
6868

6969

70-
def download_image_from_remote(source, target, show=False):
71-
"""Download an image from a remote source and save it to a local destination.
70+
# def download_image_from_remote(source, target, show=False):
71+
# """Download an image from a remote source and save it to a local destination.
7272

73-
Parameters
74-
----------
75-
source : str
76-
The url of the source file.
77-
target : str
78-
The path of the local destination.
79-
show : bool, optional
80-
Show the downloaded image.
81-
Default is ``False``
73+
# Parameters
74+
# ----------
75+
# source : str
76+
# The url of the source file.
77+
# target : str
78+
# The path of the local destination.
79+
# show : bool, optional
80+
# Show the downloaded image.
81+
# Default is ``False``
8282

83-
Examples
84-
--------
85-
.. code-block:: python
83+
# Examples
84+
# --------
85+
# .. code-block:: python
8686

87-
import os
88-
import compas
89-
from compas.utilities.remote import download_image_from_remote
87+
# import os
88+
# import compas
89+
# from compas.utilities.remote import download_image_from_remote
9090

91-
source = 'http://block.arch.ethz.ch/brg/images/cache/dsc02360_ni-2_cropped_1528706473_624x351.jpg'
92-
target = os.path.join(compas.APPDATA, 'data', 'theblock.jpg')
91+
# source = 'http://block.arch.ethz.ch/brg/images/cache/dsc02360_ni-2_cropped_1528706473_624x351.jpg'
92+
# target = os.path.join(compas.APPDATA, 'data', 'theblock.jpg')
9393

94-
download_image_from_remote(source, target, show=True)
94+
# download_image_from_remote(source, target, show=True)
9595

96-
"""
97-
# response = requests.get(source)
98-
# response.raise_for_status()
96+
# """
97+
# # response = requests.get(source)
98+
# # response.raise_for_status()
9999

100-
response = urlopen(source)
101-
image = Image.open(io.BytesIO(response.read()))
100+
# response = urlopen(source)
101+
# image = Image.open(io.BytesIO(response.read()))
102102

103-
if show:
104-
image.show()
105-
image.save(target)
103+
# if show:
104+
# image.show()
105+
# image.save(target)
106106

107107

108108
# ==============================================================================

0 commit comments

Comments
 (0)