pymc2
pymc2 copied to clipboard
UnicodeDecodeError while installing for Python3.3
Just came across this
File "/usr/lib/python3.3/distutils/dist.py", line 930, in run_commands[50/4922]
self.run_command(cmd)
File "/usr/lib/python3.3/distutils/dist.py", line 949, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.3/dist-packages/numpy/distutils/command/egg_info.p
self.run_command("build_src")
File "/usr/lib/python3.3/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.3/distutils/dist.py", line 949, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.3/dist-packages/numpy/distutils/command/build_src.
self.build_sources()
File "/usr/local/lib/python3.3/dist-packages/numpy/distutils/command/build_src.
self.build_extension_sources(ext)
File "/usr/local/lib/python3.3/dist-packages/numpy/distutils/command/build_src.
sources = self.f2py_sources(sources, ext)
File "/usr/local/lib/python3.3/dist-packages/numpy/distutils/command/build_src.
['-m', ext_name]+f_sources)
File "/usr/local/lib/python3.3/dist-packages/numpy/f2py/f2py2e.py", line 361, i
postlist=callcrackfortran(files, options)
File "/usr/local/lib/python3.3/dist-packages/numpy/f2py/f2py2e.py", line 283, i
postlist=crackfortran.crackfortran(files)
File "/usr/local/lib/python3.3/dist-packages/numpy/f2py/crackfortran.py", line
readfortrancode(files, crackline)
File "/usr/local/lib/python3.3/dist-packages/numpy/f2py/crackfortran.py", line
l=fin.readline()
File "/usr/lib/python3.3/fileinput.py", line 354, in readline
self._buffer = self._file.readlines(self._bufsize)
File "/usr/lib/python3.3/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xce in position 5125: ordinal not in range(128)
Happens for pymc==2.3.2 thru pymc==2.3.6, for Python 3.4 and 3.3. Python 2.7 installs ok.
Can you post the code that generates this error? I'd like to try to replicate it here.
Just pip install pymc
(in a Python 3.3/3.4 virtualenv, or use pip-3.4
, or whatever is available in your env to pip install for a particular python version...)
I can't replicate this with Anaconda Python 3.3 in a virtualenv:
Collecting pymc
Downloading pymc-2.3.6.tar.gz (348kB)
100% |████████████████████████████████| 352kB 414kB/s
Building wheels for collected packages: pymc
Running setup.py bdist_wheel for pymc
Stored in directory: /Users/fonnescj/Library/Caches/pip/wheels/b4/12/14/094b6184fc97f474640caba446f451335daaf32c5b547e1c87
Successfully built pymc
Installing collected packages: pymc
Successfully installed pymc-2.3.6
I'm on Ubuntu. I think it's fairly consistent, not something to do with my setup. I can repro it in a minimal dockerfile:
FROM ubuntu:trusty
RUN apt-get update
RUN apt-get install -y python3-dev python3-pip
RUN apt-get install -y python3-numpy python3-matplotlib
RUN pip3 install pymc
Here's the full output from the minimal repro run: http://pastebin.com/9SEww4CT
when I install pymc in windows platform use “pip install pymc", it will report this error:
File "c:\Python34\lib\site-packages\numpy\f2py\crackfortran.py", line 336, in readfortrancode
l=fin.readline()
File "c:\Python34\lib\fileinput.py", line 363, in readline
self._buffer = self._file.readlines(self._bufsize)
UnicodeDecodeError: 'gbk' codec can't decode byte 0xa1 in position 6844: illegal multibyte sequence
I fixed it by setting the LANG
environment variable(s):
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_ALL=en_US.UTF-8
But it might be nice to get it working without that...
We do have a .cfg file for Debian installs. Would it work to put these there?
Ran into the same issue myself on a Mac (10.11) using Python 3.5. hjwp's environment variable fix worked for me to successfully install. https://github.com/pymc-devs/pymc/issues/62#issuecomment-151760213
#62 (comment) did't work for me. I got the same error:
UnicodeDecodeError: 'gbk' codec can't decode byte 0xa1 in position 6844: illegal multibyte sequence