I have Vista(please avoid comment ;D)... I'm sure of the right install of pip because I have installed other package but when I try to install selenium by pip that's the result.:
C:\Program Files\Python2.7.6>pip install selenium
Downloading/unpacking selenium Running setup.py
(path:c:\users\gianlu~1\appdata\local\temp\pip_build_Gianluca
«\selenium\setup.py) egg_info for package selenium
Cleaning up...
The line below are in red(this is my comment)
Exception:
Traceback (most recent call last):
File "C:\Program Files\Python2.7.6\lib\site-packages\pip\basecommand.py", line
122, in main
status = self.run(options, args)
File "C:\Program Files\Python2.7.6\lib\site-packages\pip\commands\install.py",
line 278, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundl
e=self.bundle)
File "C:\Program Files\Python2.7.6\lib\site-packages\pip\req.py", line 1234, i
n prepare_files
req_to_install.assert_source_matches_version()
File "C:\Program Files\Python2.7.6\lib\site-packages\pip\req.py", line 464, in
assert_source_matches_version
% (display_path(self.source_dir), version, self))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xae in position 65: ordinal
not in range(128)
End of the red
Traceback (most recent call last):
File "C:\Program Files\Python2.7.6\lib\runpy.py", line 162, in _run_module_as_
main
"__main__", fname, loader, pkg_name)
File "C:\Program Files\Python2.7.6\lib\runpy.py", line 72, in _run_code
exec code in run_globals
File "C:\Program Files\Python2.7.6\pip.exe\__main__.py", line 9, in <module>
File "C:\Program Files\Python2.7.6\lib\site-packages\pip\__init__.py", line 18
5, in main
return command.main(cmd_args)
File "C:\Program Files\Python2.7.6\lib\site-packages\pip\basecommand.py", line
161, in main
text = '\n'.join(complete_log)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xae in position 80: ordinal
not in range(128)
I'm new of Phyton and that is over for me. The only thing that I can suppose and investigate is that the matter is about the last line "Unicode...".
Thank you for any suggestion.
Yes, really a bad question. I was very tired after a code marathon ;D. Starting from my edit of investigate the unicode error and only after a few hours of sleep I find a lot of intresting and working solution. Here the more considerable and useful link:
Python ez_install : UnicodeDecodeError: 'ascii' codec can't decode byte 0xae in position 11
UnicodeDecodeError : 'ascii' codec can't decode byte 0xe0 in position 0: ordinal not in range(128)
pip install tabulate UnicodeDecodeError
Related
gcloud components update fails with UnicodeDecodeError in MacOS. Its not clear what would be causing this issue in MacOS and it says Hotfix for UnicodeDecodeError issue affecting logging. How do I get past this issue?
This is my current configuration
gcloud -v
Google Cloud SDK 190.0.0
beta 2017.09.15
bq 2.0.29
core 2018.02.16
gsutil 4.28
Updates are available for some Cloud SDK components. To install them,
please run:
$ gcloud components update
This is the error I get
Container Engine
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/logging/__init__.py", line 859, in emit
msg = self.format(record)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/logging/__init__.py", line 732, in format
return fmt.format(record)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/logging/__init__.py", line 474, in format
s = self._fmt % record.__dict__
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 6: ordinal not in range(128)
Logged from file log.py, line 184
▪ Added container/use_v1_api_client property as an alias of
container/use_v1_api. container/use_v1_api is still supported.
Kubernetes Engine
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/logging/__init__.py", line 859, in emit
msg = self.format(record)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/logging/__init__.py", line 732, in format
return fmt.format(record)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/logging/__init__.py", line 474, in format
s = self._fmt % record.__dict__
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 6: ordinal not in range(128)
Logged from file log.py, line 184
▪ Added --enable-pod-security-policy flag to enable PodSecurityPolicy
enforcement in clusters: gcloud <alpha|beta> container clusters
<create|update> --enable-pod-security-policy
Stackdriver Debugger
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/logging/__init__.py", line 859, in emit
msg = self.format(record)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/logging/__init__.py", line 732, in format
return fmt.format(record)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/logging/__init__.py", line 474, in format
s = self._fmt % record.__dict__
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 6: ordinal not in range(128)
Logged from file log.py, line 184
▪ Changed gcloud beta source upload command to use the .gcloudignore
file if present. If not present and .gitignore is, .gitignore will
still be used. See gcloud topic gcloudignore to learn more.
190.0.1 (2018-02-22)
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/logging/__init__.py", line 859, in emit
msg = self.format(record)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/logging/__init__.py", line 732, in format
return fmt.format(record)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/logging/__init__.py", line 474, in format
s = self._fmt % record.__dict__
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 6: ordinal not in range(128)
Logged from file log.py, line 184
▪ Hotfix for UnicodeDecodeError issue affecting logging.
I can see your Python version is Ok (2.7).
You may need to run gcloud init before trying to update.
If the issue persists or you already ran the aforementioned command, it would be faster to reinstall gcloud. Current version was released today (198.0.0).
I've been trying to install this Python wrapper for the past two days. I went through all the other questions here on Stack Overflow. Tried literally everything, and nothing seems to work.
Processing /../../../../../wrappers/Python
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/tmp/pip-twPZdY-build/setup.py", line 50, in <module>
**cffi_args
File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 111, in setup
_setup_distribution = dist = klass(attrs)
File "/usr/local/lib/python2.7/site-packages/setuptools/dist.py", line 319, in __init__
_Distribution.__init__(self, attrs)
File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 287, in __init__
self.finalize_options()
File "/usr/local/lib/python2.7/site-packages/setuptools/dist.py", line 386, in finalize_options
ep.load()(self, ep.name, value)
File "/private/tmp/pip-twPZdY-build/.eggs/cffi-1.10.0-py2.7-macosx-10.11-x86_64.egg/cffi/setuptools_ext.py", line 188, in cffi_modules
add_cffi_module(dist, cffi_module)
File "/private/tmp/pip-twPZdY-build/.eggs/cffi-1.10.0-py2.7-macosx-10.11-x86_64.egg/cffi/setuptools_ext.py", line 49, in add_cffi_module
execfile(build_file_name, mod_vars)
File "/private/tmp/pip-twPZdY-build/.eggs/cffi-1.10.0-py2.7-macosx-10.11-x86_64.egg/cffi/setuptools_ext.py", line 25, in execfile
exec(code, glob, glob)
File "../ffi_build.py", line 34, in <module>
ffi.set_source('../_ffi', None)
File "/private/tmp/pip-twPZdY-build/.eggs/cffi-1.10.0-py2.7-macosx-10.11-x86_64.egg/cffi/api.py", line 612, in set_source
raise ValueError("'module_name' must not contain '/': use a dotted "
ValueError: 'module_name' must not contain '/': use a dotted name to make a 'package.module' location
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/tmp/pip-twPZdY-build/
I've reinstalled everything at least twice, updated, tried sudo -H, but nothing seems to work. It seems like a problem with setuptools, but I have no idea how to fix it.
Mac OSX 10.11.6 (El Capitan)
Python 2.7.13
Pip 9.0.1
After carefully reading through the error message, I managed to find the file called ffi_build.py under the Python folder I was trying to bind. As stated in the error message, at line 34 there was a module naming statement that contained a '/'. By replacing that '/' with a '.' I solved the issue and managed to bind the Python wrapper with no issue whatsoever.
When I run spyder on command line, I got error message like below.
Traceback (most recent call last): File
"/home/park/anaconda2/lib/python2.7/site-packages/spyder/app/mainwindow.py",
line 2998, in main
mainwindow = run_spyder(app, options, args) File "/home/park/anaconda2/lib/python2.7/site-packages/spyder/app/mainwindow.py",
line 2902, in run_spyder
main.setup() File "/home/park/anaconda2/lib/python2.7/site-packages/spyder/app/mainwindow.py",
line 1153, in setup
self.setup_layout(default=False) File "/home/park/anaconda2/lib/python2.7/site-packages/spyder/app/mainwindow.py",
line 1414, in setup_layout
self.setup_default_layouts('default', settings) File "/home/park/anaconda2/lib/python2.7/site-packages/spyder/app/mainwindow.py",
line 1593, in setup_default_layouts
widget.toggle_view(True) File "/home/park/anaconda2/lib/python2.7/site-packages/spyder/plugins/ipythonconsole.py",
line 677, in toggle_view
self.create_new_client(give_focus=False) File "/home/park/anaconda2/lib/python2.7/site-packages/spyder/plugins/ipythonconsole.py",
line 886, in create_new_client
self.connect_client_to_kernel(client) File "/home/park/anaconda2/lib/python2.7/site-packages/spyder/plugins/ipythonconsole.py",
line 903, in connect_client_to_kernel
km, kc = self.create_kernel_manager_and_kernel_client(connection_file) File
"/home/park/anaconda2/lib/python2.7/site-packages/spyder/plugins/ipythonconsole.py",
line 1276, in create_kernel_manager_and_kernel_client
kernel_manager._kernel_spec = self.create_kernel_spec() File "/home/park/anaconda2/lib/python2.7/site-packages/spyder/plugins/ipythonconsole.py",
line 1256, in create_kernel_spec
uv = to_text_string(v) File "/home/park/anaconda2/lib/python2.7/site-packages/spyder/py3compat.py",
line 136, in to_text_string
return unicode(obj) UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 73: ordinal not in range(128)
I have been searching the solution but I can not get the solution.
I have tried :
Reinstall using "pip install spyder"
Reinstall using "conda install spyder"
How do I fix it. If you give me some ideas, I can really appreciate for this.
Thanks.
I also had some problems with Spyder 3 on Ubuntu 14.04. So I uninstalled it and reinstalled Spyer 2, which then worked just fine for me. If you don't mind using Spyder 2, you can run the following command to see if it works for you
conda install -c spyder-ide spyder=2.3.9
I just reinstalled python and pip, but when i run the command pip i should expect to see the help info for pip commands. instead i get this:
Traceback (most recent call last):
File "C:\Python27\lib\runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "C:\Python27\lib\runpy.py", line 72, in _run_code
exec code in run_globals
File "C:\Python27\Scripts\pip.exe\__main__.py", line 9, in <module>
File "C:\Python27\lib\site-packages\pip\__init__.py", line 210, in main
cmd_name, cmd_args = parseopts(args)
File "C:\Python27\lib\site-packages\pip\__init__.py", line 165, in parseopts
parser.print_help()
File "C:\Python27\lib\optparse.py", line 1670, in print_help
file.write(self.format_help().encode(encoding, "replace"))
File "C:\Python27\lib\optparse.py", line 1650, in format_help
result.append(self.format_option_help(formatter))
File "C:\Python27\lib\optparse.py", line 1633, in format_option_help
result.append(group.format_help(formatter))
File "C:\Python27\lib\optparse.py", line 1114, in format_help
result += OptionContainer.format_help(self, formatter)
File "C:\Python27\lib\optparse.py", line 1085, in format_help
result.append(self.format_option_help(formatter))
File "C:\Python27\lib\optparse.py", line 1074, in format_option_help
result.append(formatter.format_option(option))
File "C:\Python27\lib\optparse.py", line 316, in format_option
help_text = self.expand_default(option)
File "C:\Python27\lib\site-packages\pip\baseparser.py", line 110, in expand_de
fault
return optparse.IndentedHelpFormatter.expand_default(self, option)
File "C:\Python27\lib\optparse.py", line 288, in expand_default
return option.help.replace(self.default_tag, str(default_value))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xf8' in position 11:
ordinal not in range(128)
i have had python 3.4 installed before this but wanted to change to 2.7. on 3.4 pip were running fine, but there were some issues with django on python3.4
edit: user folder contains non-ascii character. This worked with python 3.4 but not with 2.7
Created a new user with ascii compliant characters. Pip now works fine with no errors.
I'm using python 3.3 and Windows XP(32x).
I tried to install setuptools.
I write in command line:
py ez_setup.py install
And it return me error:
Traceback (most recent call last):
File "setup.py", line 19, in <module>
exec(init_file.read(), command_ns)
File "<string>", line 8, in <module>
File "c:\docume~1\jakov\locals~1\temp\tmpymerwg\setuptools-3.5.1\setuptools\_
init__.py", line 12, in <module>
from setuptools.extension import Extension
File "c:\docume~1\jakov\locals~1\temp\tmpymerwg\setuptools-3.5.1\setuptools\e
tension.py", line 7, in <module>
from setuptools.dist import _get_unpatched
File "c:\docume~1\jakov\locals~1\temp\tmpymerwg\setuptools-3.5.1\setuptools\d
st.py", line 16, in <module>
from setuptools.compat import numeric_types, basestring
File "c:\docume~1\jakov\locals~1\temp\tmpymerwg\setuptools-3.5.1\setuptools\c
mpat.py", line 19, in <module>
from SimpleHTTPServer import SimpleHTTPRequestHandler
File "C:\Python27\lib\SimpleHTTPServer.py", line 27, in <module>
class SimpleHTTPRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler):
File "C:\Python27\lib\SimpleHTTPServer.py", line 208, in SimpleHTTPRequestHan
ler
mimetypes.init() # try to read system mime.types
File "C:\Python27\lib\mimetypes.py", line 358, in init
db.read_windows_registry()
File "C:\Python27\lib\mimetypes.py", line 258, in read_windows_registry
for subkeyname in enum_types(hkcr):
File "C:\Python27\lib\mimetypes.py", line 249, in enum_types
ctype = ctype.encode(default_encoding) # omit in 3.x!
UnicodeDecodeError: 'ascii' codec can't decode byte 0x9e in position 6: ordinal
not in range(128)
Something went wrong during the installation.
See the error message above.
I am also using python 2.7, but I want to install setuptools for python 3.3.
I open my file with IDE and run it(because if you run code from cmd and you have both python2 and python3 it will run with python2 and iif you run it from IDE for python3 it will run in python3).
I really don't know if my explanation is true(because I don't have python2 on path), but I know that some files only work when you run it with IDE, and some only with cmd(or graphical).