I am trying to run sample codes using selenium and webdriver manager from the following site: https://pypi.org/project/webdriver-manager/. I am using google chrome, i tried the following codes:
Selenium version: 4.1.0
webdriver_manager version: 3.5.2
# code for chrome
# Selenium 4
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from webdriver_manager.chrome import ChromeDriverManager
driver = webdriver.Chrome(service=Service(ChromeDriverManager().install()))
I also tried:
# code for chromium
# selenium 4
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from webdriver_manager.chrome import ChromeDriverManager
from webdriver_manager.utils import ChromeType
driver = webdriver.Chrome(service=Service(ChromeDriverManager(chrome_type=ChromeType.CHROMIUM).install()))
Unfortunately i get the following error (it's similar for both codes):
JSONDecodeError Traceback (most recent call last)
5 from webdriver_manager.utils import ChromeType
6
----> 7 driver = webdriver.Chrome(service=Service(ChromeDriverManager(chrome_type=ChromeType.CHROMIUM).install()))
C:\ProgramData\Anaconda3\lib\site-packages\webdriver_manager\chrome.py in install(self)
30
31 def install(self):
---> 32 driver_path = self._get_driver_path(self.driver)
33
34 os.chmod(driver_path, 0o755)
C:\ProgramData\Anaconda3\lib\site-packages\webdriver_manager\manager.py in _get_driver_path(self, driver)
21 driver_name = driver.get_name()
22 os_type = driver.get_os_type()
---> 23 driver_version = driver.get_version()
24
25 binary_path = self.driver_cache.find_driver(browser_version, driver_name, os_type,
C:\ProgramData\Anaconda3\lib\site-packages\webdriver_manager\driver.py in get_version(self)
39 driver_version = self._version
40 if driver_version == "latest":
---> 41 return self.get_latest_release_version()
42 return self._version
43
C:\ProgramData\Anaconda3\lib\site-packages\webdriver_manager\driver.py in get_latest_release_version(self)
72 verify=self.ssl_verify
73 )
---> 74 validate_response(resp)
75 self._version = resp.text.rstrip()
76 return self._version
C:\ProgramData\Anaconda3\lib\site-packages\webdriver_manager\utils.py in validate_response(resp)
81 elif resp.status_code != 200:
82 raise ValueError(
---> 83 f'response body:\n{resp.json()}\n'
84 f'request url:\n{resp.request.url}\n'
85 f'response headers:\n{dict(resp.headers)}\n'
C:\ProgramData\Anaconda3\lib\site-packages\requests\models.py in json(self, **kwargs)
908 # used.
909 pass
--> 910 return complexjson.loads(self.text, **kwargs)
911
912 #property
C:\ProgramData\Anaconda3\lib\json\__init__.py in loads(s, cls, object_hook, parse_float, parse_int, parse_constant, object_pairs_hook, **kw)
344 parse_int is None and parse_float is None and
345 parse_constant is None and object_pairs_hook is None and not kw):
--> 346 return _default_decoder.decode(s)
347 if cls is None:
348 cls = JSONDecoder
C:\ProgramData\Anaconda3\lib\json\decoder.py in decode(self, s, _w)
335
336 """
--> 337 obj, end = self.raw_decode(s, idx=_w(s, 0).end())
338 end = _w(s, end).end()
339 if end != len(s):
C:\ProgramData\Anaconda3\lib\json\decoder.py in raw_decode(self, s, idx)
353 obj, end = self.scan_once(s, idx)
354 except StopIteration as err:
--> 355 raise JSONDecodeError("Expecting value", s, err.value) from None
356 return obj, end
JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Related
I am using Azure ML Notebook to run both python and R code in notebook cells. I have installed python packages pandas 1.1.5 and rpy2 3.5.4 but when I run the following lines of code:
%load_ext rpy2.ipython
print("ankit")
I get the following error message:
AttributeError: module 'pandas' has no attribute 'Float64Dtype'
Can anyone please help to resolve this error ? Any help would be appreciated.
Complete error is as following:
AttributeError Traceback (most recent call last)
Input In [10], in <cell line: 1>()
----> 1 get_ipython().run_line_magic('load_ext', 'rpy2.ipython')
2 print("ankit")
File /anaconda/envs/azureml_py38/lib/python3.8/site-packages/IPython/core/interactiveshell.py:2305, in InteractiveShell.run_line_magic(self, magic_name, line, _stack_depth)
2303 kwargs['local_ns'] = self.get_local_scope(stack_depth)
2304 with self.builtin_trap:
-> 2305 result = fn(*args, **kwargs)
2306 return result
File /anaconda/envs/azureml_py38/lib/python3.8/site-packages/IPython/core/magics/extension.py:33, in ExtensionMagics.load_ext(self, module_str)
31 if not module_str:
32 raise UsageError('Missing module name.')
---> 33 res = self.shell.extension_manager.load_extension(module_str)
35 if res == 'already loaded':
36 print("The %s extension is already loaded. To reload it, use:" % module_str)
File /anaconda/envs/azureml_py38/lib/python3.8/site-packages/IPython/core/extensions.py:76, in ExtensionManager.load_extension(self, module_str)
69 """Load an IPython extension by its module name.
70
71 Returns the string "already loaded" if the extension is already loaded,
72 "no load function" if the module doesn't have a load_ipython_extension
73 function, or None if it succeeded.
74 """
75 try:
---> 76 return self._load_extension(module_str)
77 except ModuleNotFoundError:
78 if module_str in BUILTINS_EXTS:
File /anaconda/envs/azureml_py38/lib/python3.8/site-packages/IPython/core/extensions.py:92, in ExtensionManager._load_extension(self, module_str)
90 if module_str not in sys.modules:
91 with prepended_to_syspath(self.ipython_extension_dir):
---> 92 mod = import_module(module_str)
93 if mod.__file__.startswith(self.ipython_extension_dir):
94 print(("Loading extensions from {dir} is deprecated. "
95 "We recommend managing extensions like any "
96 "other Python packages, in site-packages.").format(
97 dir=compress_user(self.ipython_extension_dir)))
File /anaconda/envs/azureml_py38/lib/python3.8/importlib/__init__.py:127, in import_module(name, package)
125 break
126 level += 1
--> 127 return _bootstrap._gcd_import(name[level:], package, level)
File <frozen importlib._bootstrap>:1014, in _gcd_import(name, package, level)
File <frozen importlib._bootstrap>:991, in _find_and_load(name, import_)
File <frozen importlib._bootstrap>:975, in _find_and_load_unlocked(name, import_)
File <frozen importlib._bootstrap>:671, in _load_unlocked(spec)
File <frozen importlib._bootstrap_external>:783, in exec_module(self, module)
File <frozen importlib._bootstrap>:219, in _call_with_frames_removed(f, *args, **kwds)
File /anaconda/envs/azureml_py38/lib/python3.8/site-packages/rpy2/ipython/__init__.py:1, in <module>
----> 1 from . import rmagic
3 load_ipython_extension = rmagic.load_ipython_extension
File /anaconda/envs/azureml_py38/lib/python3.8/site-packages/rpy2/ipython/rmagic.py:121, in <module>
116 def _get_converter(template_converter=template_converter):
117 return Converter('ipython conversion',
118 template=template_converter)
--> 121 ipy_template_converter = _get_ipython_template_converter(template_converter,
122 numpy=numpy,
123 pandas=pandas)
124 converter = _get_converter(template_converter=ipy_template_converter)
127 def CELL_DISPLAY_DEFAULT(res, args):
File /anaconda/envs/azureml_py38/lib/python3.8/site-packages/rpy2/ipython/rmagic.py:111, in _get_ipython_template_converter(template_converter, numpy, pandas)
109 template_converter += numpy2ri.converter
110 if pandas:
--> 111 from rpy2.robjects import pandas2ri
112 template_converter += pandas2ri.converter
113 return template_converter
File /anaconda/envs/azureml_py38/lib/python3.8/site-packages/rpy2/robjects/pandas2ri.py:144, in <module>
125 v = math.nan
126 set_elt(r_vector, i, cast_value(v))
129 _PANDASTYPE2RPY2 = {
130 datetime.date: DateVector,
131 int: functools.partial(
132 IntVector.from_iterable,
133 populate_func=_int_populate_r_vector
134 ),
135 pandas.BooleanDtype: functools.partial(
136 BoolVector.from_iterable,
137 populate_func=_bool_populate_r_vector
138 ),
139 None: BoolVector,
140 str: functools.partial(
141 StrVector.from_iterable,
142 populate_func=_str_populate_r_vector
143 ),
--> 144 pandas.Float64Dtype: functools.partial(
145 FloatVector.from_iterable,
146 populate_func=_float_populate_r_vector
147 ),
148 bytes: (numpy2ri.converter.py2rpy.registry[
149 numpy.ndarray
150 ])
151 }
154 #py2rpy.register(pandas.core.series.Series)
155 def py2rpy_pandasseries(obj):
156 if obj.dtype.name == 'O':
File /anaconda/envs/azureml_py38/lib/python3.8/site-packages/pandas/__init__.py:258, in __getattr__(name)
254 from pandas.core.arrays.sparse import SparseArray as _SparseArray
256 return _SparseArray
--> 258 raise AttributeError(f"module 'pandas' has no attribute '{name}'")
AttributeError: module 'pandas' has no attribute 'Float64Dtype'
I replicate your situation on my system and it works.
You can use this set of library versions:
R version: 4.2.1
rpy2 version: 3.4.5
Pandas version: 1.3.5
Something is wrong with my pandas module. I tried to read in an excel file using the following code, which works on my classmate's computer, but it's giving me an error on my computer:
FFT1=pd.read_excel('FFT1.xlsx', sheet_name='sheet1')
The file named 'FFT1.xlsx' is in the same directory as my jupyter notebook. The error message says:
XLRDError Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_7436/2793485739.py in <module>
----> 1 FFT1=pd.read_excel('FFT1.xlsx', sheet_name='sheet1')
D:\Softwares\Anaconda\lib\site-packages\pandas\io\excel\_base.py in read_excel(io, sheet_name, header, names, index_col, usecols, squeeze, dtype, engine, converters, true_values, false_values, skiprows, nrows, na_values, keep_default_na, verbose, parse_dates, date_parser, thousands, comment, skipfooter, convert_float, mangle_dupe_cols, **kwds)
302
303 if not isinstance(io, ExcelFile):
--> 304 io = ExcelFile(io, engine=engine)
305 elif engine and engine != io.engine:
306 raise ValueError(
D:\Softwares\Anaconda\lib\site-packages\pandas\io\excel\_base.py in __init__(self, io, engine)
819 self._io = stringify_path(io)
820
--> 821 self._reader = self._engines[engine](self._io)
822
823 def __fspath__(self):
D:\Softwares\Anaconda\lib\site-packages\pandas\io\excel\_xlrd.py in __init__(self, filepath_or_buffer)
19 err_msg = "Install xlrd >= 1.0.0 for Excel support"
20 import_optional_dependency("xlrd", extra=err_msg)
---> 21 super().__init__(filepath_or_buffer)
22
23 #property
D:\Softwares\Anaconda\lib\site-packages\pandas\io\excel\_base.py in __init__(self, filepath_or_buffer)
351 self.book = self.load_workbook(filepath_or_buffer)
352 elif isinstance(filepath_or_buffer, str):
--> 353 self.book = self.load_workbook(filepath_or_buffer)
354 elif isinstance(filepath_or_buffer, bytes):
355 self.book = self.load_workbook(BytesIO(filepath_or_buffer))
D:\Softwares\Anaconda\lib\site-packages\pandas\io\excel\_xlrd.py in load_workbook(self, filepath_or_buffer)
34 return open_workbook(file_contents=data)
35 else:
---> 36 return open_workbook(filepath_or_buffer)
37
38 #property
D:\Softwares\Anaconda\lib\site-packages\xlrd\__init__.py in open_workbook(filename, logfile, verbosity, use_mmap, file_contents, encoding_override, formatting_info, on_demand, ragged_rows, ignore_workbook_corruption)
168 # files that xlrd can parse don't start with the expected signature.
169 if file_format and file_format != 'xls':
--> 170 raise XLRDError(FILE_FORMAT_DESCRIPTIONS[file_format]+'; not supported')
171
172 bk = open_workbook_xls(
XLRDError: Excel xlsx file; not supported
How should I fix this?
Make sure that you already install openpyxl, if you don't try
pip install openpyxl
Change your code to
FFT1=pd.read_excel('FFT1.xlsx', sheet_name='sheet1',engine='openpyxl')
I'm trying to run a Jupyter Notebook that uses "Pool" From the Multiprocessing package and getting the "[Errno 13] Permission denied" error
---------------------------------------------------------------------------
PermissionError Traceback (most recent call last)
<timed exec> in <module>
<ipython-input-9-9d32e1938b9e> in get_ray_tracing(rays, population_element)
7 # Necessario para o windows
8 if __name__ == '__main__':
----> 9 p=Pool(processes = len(rays))
10 # O jupyter notebook necessita que a funcao esteja em um arquivo diference
11 # O programa ficara travado nessa linha ate que todos os processos terminem
/snap/jupyter/6/lib/python3.7/multiprocessing/context.py in Pool(self, processes, initializer, initargs, maxtasksperchild)
117 from .pool import Pool
118 return Pool(processes, initializer, initargs, maxtasksperchild,
--> 119 context=self.get_context())
120
121 def RawValue(self, typecode_or_type, *args):
/snap/jupyter/6/lib/python3.7/multiprocessing/pool.py in __init__(self, processes, initializer, initargs, maxtasksperchild, context)
156 maxtasksperchild=None, context=None):
157 self._ctx = context or get_context()
--> 158 self._setup_queues()
159 self._taskqueue = queue.SimpleQueue()
160 self._cache = {}
/snap/jupyter/6/lib/python3.7/multiprocessing/pool.py in _setup_queues(self)
249
250 def _setup_queues(self):
--> 251 self._inqueue = self._ctx.SimpleQueue()
252 self._outqueue = self._ctx.SimpleQueue()
253 self._quick_put = self._inqueue._writer.send
/snap/jupyter/6/lib/python3.7/multiprocessing/context.py in SimpleQueue(self)
110 '''Returns a queue object'''
111 from .queues import SimpleQueue
--> 112 return SimpleQueue(ctx=self.get_context())
113
114 def Pool(self, processes=None, initializer=None, initargs=(),
/snap/jupyter/6/lib/python3.7/multiprocessing/queues.py in __init__(self, ctx)
330 def __init__(self, *, ctx):
331 self._reader, self._writer = connection.Pipe(duplex=False)
--> 332 self._rlock = ctx.Lock()
333 self._poll = self._reader.poll
334 if sys.platform == 'win32':
/snap/jupyter/6/lib/python3.7/multiprocessing/context.py in Lock(self)
65 '''Returns a non-recursive lock object'''
66 from .synchronize import Lock
---> 67 return Lock(ctx=self.get_context())
68
69 def RLock(self):
/snap/jupyter/6/lib/python3.7/multiprocessing/synchronize.py in __init__(self, ctx)
160
161 def __init__(self, *, ctx):
--> 162 SemLock.__init__(self, SEMAPHORE, 1, 1, ctx=ctx)
163
164 def __repr__(self):
/snap/jupyter/6/lib/python3.7/multiprocessing/synchronize.py in __init__(self, kind, value, maxvalue, ctx)
57 sl = self._semlock = _multiprocessing.SemLock(
58 kind, value, maxvalue, self._make_name(),
---> 59 unlink_now)
60 except FileExistsError:
61 pass
PermissionError: [Errno 13] Permission denied
I tried, without success, to apply the suggestions of the question Python multiprocessing: Permission denied - Stack Overflow
What else could i try?
My code, which used to work until yesterday, suddenly stopped working. I'd been running codes from jupyter notebook to auto-collect repeating data from a webpage. It is as follows (URL is changed to Google for privacy reasons):
# use selenium to start Chrome session to open a certain page
dr = webdriver.Chrome()
dr.get("http://www.google.com")
The error message I got:
---------------------------------------------------------------------------
WebDriverException Traceback (most recent call last)
<ipython-input-25-84be89301b0d> in <module>()
1 # use selenium to start Chrome session to open google.
----> 2 dr = webdriver.Chrome()
3 dr.get("http://www.google.com")
/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/selenium/webdriver/chrome/webdriver.py in __init__(self, executable_path, port, chrome_options, service_args, desired_capabilities, service_log_path)
65 command_executor=ChromeRemoteConnection(
66 remote_server_addr=self.service.service_url),
---> 67 desired_capabilities=desired_capabilities)
68 except:
69 self.quit()
/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/selenium/webdriver/remote/webdriver.py in __init__(self, command_executor, desired_capabilities, browser_profile, proxy, keep_alive)
85 self.error_handler = ErrorHandler()
86 self.start_client()
---> 87 self.start_session(desired_capabilities, browser_profile)
88 self._switch_to = SwitchTo(self)
89 self._mobile = Mobile(self)
/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/selenium/webdriver/remote/webdriver.py in start_session(self, desired_capabilities, browser_profile)
139 desired_capabilities['firefox_profile'] = browser_profile.encoded
140 response = self.execute(Command.NEW_SESSION, {
--> 141 'desiredCapabilities': desired_capabilities,
142 })
143 self.session_id = response['sessionId']
/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/selenium/webdriver/remote/webdriver.py in execute(self, driver_command, params)
199 response = self.command_executor.execute(driver_command, params)
200 if response:
--> 201 self.error_handler.check_response(response)
202 response['value'] = self._unwrap_value(
203 response.get('value', None))
/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/selenium/webdriver/remote/errorhandler.py in check_response(self, response)
179 elif exception_class == UnexpectedAlertPresentException and 'alert' in value:
180 raise exception_class(message, screen, stacktrace, value['alert'].get('text'))
--> 181 raise exception_class(message, screen, stacktrace)
182
183 def _value_or_default(self, obj, key, default):
WebDriverException: Message: session not created exception
from unknown error: Runtime.executionContextCreated has invalid 'context': {"auxData":{"frameId":"7600.1","isDefault":true},"id":1,"name":"","origin":"://"}
(Session info: chrome=54.0.2840.71)
(Driver info: chromedriver=2.20.353124 (035346203162d32c80f1dce587c8154a1efa0c3b),platform=Mac OS X 10.11.6 x86_64)
I really have no idea how to solve this and why I'm suddenly getting this message.
Download again new chrome driver from below link and use the same
http://chromedriver.storage.googleapis.com/index.html?path=2.24/
When I try the magic command %pylab I get the following error:
In [1]: %pylab
---------------------------------------------------------------------------
UnicodeDecodeError Traceback (most recent call last)
<ipython-input-1-5c1faa999e5b> in <module>()
----> 1 get_ipython().magic(u'pylab')
/Users/rafaelrodrigues/anaconda/lib/python2.7/site-packages/IPython/core/interactiveshell.pyc in magic(self, arg_s)
2203 magic_name, _, magic_arg_s = arg_s.partition(' ')
2204 magic_name = magic_name.lstrip(prefilter.ESC_MAGIC)
-> 2205 return self.run_line_magic(magic_name, magic_arg_s)
2206
2207 #-------------------------------------------------------------------------
/Users/rafaelrodrigues/anaconda/lib/python2.7/site-packages/IPython/core/interactiveshell.pyc in run_line_magic(self, magic_name, line)
2124 kwargs['local_ns'] = sys._getframe(stack_depth).f_locals
2125 with self.builtin_trap:
-> 2126 result = fn(*args,**kwargs)
2127 return result
2128
/Users/rafaelrodrigues/anaconda/lib/python2.7/site-packages/IPython/core/magics/pylab.pyc in pylab(self, line)
/Users/rafaelrodrigues/anaconda/lib/python2.7/site-packages/IPython/core/magic.pyc in <lambda>(f, *a, **k)
191 # but it's overkill for just that one bit of state.
192 def magic_deco(arg):
--> 193 call = lambda f, *a, **k: f(*a, **k)
194
195 if callable(arg):
/Users/rafaelrodrigues/anaconda/lib/python2.7/site-packages/IPython/core/magics/pylab.pyc in pylab(self, line)
134 import_all = not args.no_import_all
135
--> 136 gui, backend, clobbered = self.shell.enable_pylab(args.gui, import_all=import_all)
137 self._show_matplotlib_backend(args.gui, backend)
138 print ("Populating the interactive namespace from numpy and matplotlib")
/Users/rafaelrodrigues/anaconda/lib/python2.7/site-packages/IPython/core/interactiveshell.pyc in enable_pylab(self, gui, import_all, welcome_message)
2980 from IPython.core.pylabtools import import_pylab
2981
-> 2982 gui, backend = self.enable_matplotlib(gui)
2983
2984 # We want to prevent the loading of pylab to pollute the user's
/Users/rafaelrodrigues/anaconda/lib/python2.7/site-packages/IPython/core/interactiveshell.pyc in enable_matplotlib(self, gui)
2941 gui, backend = pt.find_gui_and_backend(self.pylab_gui_select)
2942
-> 2943 pt.activate_matplotlib(backend)
2944 pt.configure_inline_support(self, backend)
2945
/Users/rafaelrodrigues/anaconda/lib/python2.7/site-packages/IPython/core/pylabtools.pyc in activate_matplotlib(backend)
287 matplotlib.rcParams['backend'] = backend
288
--> 289 import matplotlib.pyplot
290 matplotlib.pyplot.switch_backend(backend)
291
/Users/rafaelrodrigues/anaconda/lib/python2.7/site-packages/matplotlib/pyplot.p in <module>()
25
26 import matplotlib
---> 27 import matplotlib.colorbar
28 from matplotlib import style
29 from matplotlib import _pylab_helpers, interactive
/Users/rafaelrodrigues/anaconda/lib/python2.7/site-packages/matplotlib/colorbar.py in <module>()
32 import matplotlib.artist as martist
33 import matplotlib.cbook as cbook
---> 34 import matplotlib.collections as collections
35 import matplotlib.colors as colors
36 import matplotlib.contour as contour
/Users/rafaelrodrigues/anaconda/lib/python2.7/site-packages/matplotlib/collections.py in <module>()
25 import matplotlib.artist as artist
26 from matplotlib.artist import allow_rasterization
---> 27 import matplotlib.backend_bases as backend_bases
28 import matplotlib.path as mpath
29 from matplotlib import _path
/Users/rafaelrodrigues/anaconda/lib/python2.7/site-packages/matplotlib/backend_bases.py in <module>()
54
55 import matplotlib.tight_bbox as tight_bbox
---> 56 import matplotlib.textpath as textpath
57 from matplotlib.path import Path
58 from matplotlib.cbook import mplDeprecation
/Users/rafaelrodrigues/anaconda/lib/python2.7/site-packages/matplotlib/textpath.py in <module>()
17 from matplotlib.path import Path
18 from matplotlib import rcParams
---> 19 import matplotlib.font_manager as font_manager
20 from matplotlib.ft2font import FT2Font, KERNING_DEFAULT, LOAD_NO_HINTING
21 from matplotlib.ft2font import LOAD_TARGET_LIGHT
/Users/rafaelrodrigues/anaconda/lib/python2.7/site-packages/matplotlib/font_manager.py in <module>()
1410 verbose.report("Using fontManager instance from %s" % _fmcache)
1411 except:
-> 1412 _rebuild()
1413 else:
1414 _rebuild()
/Users/rafaelrodrigues/anaconda/lib/python2.7/site-packages/matplotlib/font_manager.py in _rebuild()
1395 def _rebuild():
1396 global fontManager
-> 1397 fontManager = FontManager()
1398 if _fmcache:
1399 pickle_dump(fontManager, _fmcache)
/Users/rafaelrodrigues/anaconda/lib/python2.7/site-packages/matplotlib/font_manager.py in __init__(self, size, weight)
1035 # Load TrueType fonts and create font dictionary.
1036
-> 1037 self.ttffiles = findSystemFonts(paths) + findSystemFonts()
1038 self.defaultFamily = {
1039 'ttf': 'Bitstream Vera Sans',
/Users/rafaelrodrigues/anaconda/lib/python2.7/site-packages/matplotlib/font_manager.py in findSystemFonts(fontpaths, fontext)
320 fontfiles[f] = 1
321
--> 322 for f in get_fontconfig_fonts(fontext):
323 fontfiles[f] = 1
324
/Users/rafaelrodrigues/anaconda/lib/python2.7/site-packages/matplotlib/font_manager.py in get_fontconfig_fonts(fontext)
272 pipe = subprocess.Popen(['fc-list', '--format=%{file}\\n'],
273 stdout=subprocess.PIPE,
--> 274 stderr=subprocess.PIPE)
275 output = pipe.communicate()[0]
276 except (OSError, IOError):
/Users/rafaelrodrigues/anaconda/lib/python2.7/subprocess.pyc in __init__(self, args, bufsize, executable, stdin, stdout, stderr, preexec_fn, close_fds, shell, cwd, env, universal_newlines, startupinfo, creationflags)
708 p2cread, p2cwrite,
709 c2pread, c2pwrite,
--> 710 errread, errwrite)
711 except Exception:
712 # Preserve original exception in case os.close raises.
/Users/rafaelrodrigues/anaconda/lib/python2.7/subprocess.pyc in _execute_child(self, args, executable, preexec_fn, close_fds, cwd, env, universal_newlines, startupinfo, creationflags, shell, to_close, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite)
1325 raise
1326 child_exception = pickle.loads(data)
-> 1327 raise child_exception
1328
1329
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 0: ordinal not in range(128)
I have uninstalled and installed matplotlib again many times. I am using the latest versions of IPython and Matplotlib in my Mac OS Mavericks.
What else should I try?
Tks
activate your conda environment if you're not using the default environment, then do conda install matplotlib
#Clarinetist:
try with fresh official Python installation.
setup ipython notebook server according to this guide:
http://ipython.org/ipython-doc/3/notebook/notebook.html
pylab is discouraged:
http://matplotlib.org/faq/usage_faq.html#matplotlib-pyplot-and-pylab-how-are-they-related