-
-
Notifications
You must be signed in to change notification settings - Fork 156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Won't install on Windows #67
Comments
I have the same issue here, but since I was using MarkupSafe without problem on Windows when I worked with Python 3.5, I assume the error comes from Python 3.6. Maybe the title of this issue should be updated ? |
Actually, the problem seems to come from missing wheel for MarkupSafe on Pypi. Creating it manually solved the issue for me. Here is the workaround (I use git-bash on Windows):
The result is a valid wheel:
And you're done |
Traceback (most recent call last):
File "c:\users\ray\appdata\local\programs\python\python36\lib\site-packages\pip\compat\__init__.py", line 76, in console_to_str
return s.decode(sys.__stdout__.encoding)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 33: invalid start byte
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\users\ray\appdata\local\programs\python\python36\lib\site-packages\pip\basecommand.py", line 215, in main
status = self.run(options, args)
File "c:\users\ray\appdata\local\programs\python\python36\lib\site-packages\pip\commands\install.py", line 342, in run
prefix=options.prefix_path,
File "c:\users\ray\appdata\local\programs\python\python36\lib\site-packages\pip\req\req_set.py", line 784, in install
**kwargs
File "c:\users\ray\appdata\local\programs\python\python36\lib\site-packages\pip\req\req_install.py", line 878, in install
spinner=spinner,
File "c:\users\ray\appdata\local\programs\python\python36\lib\site-packages\pip\utils\__init__.py", line 676, in call_subprocess
line = console_to_str(proc.stdout.readline())
File "c:\users\ray\appdata\local\programs\python\python36\lib\site-packages\pip\compat\__init__.py", line 78, in console_to_str
return s.decode('utf_8')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 33: invalid start byte I had the same error with Python 3.6 on Windows 10 and @alorence's solution fixed it. |
I also meet this question, I found this is just a decode error. In my environment, the console's coding is 'gbk', and this return s.decode('utf-8'). so it make error. when I modify the source code to s.decode('gbk'). It works. |
I investigated using the git bisect command. |
In case someone do have my issue: Traceback (most recent call last):
File "run.py", line 2, in <module>
from app import app
File "G:\Tommy\Programming\Websites\Python_Websites\flaskHW\app\__init__.py", line 1, in <module>
from flask import Flask
File "C:\Program Files\Python36\lib\site-packages\flask\__init__.py", line 19, in <module>
from jinja2 import Markup, escape
File "C:\Program Files\Python36\lib\site-packages\jinja2\__init__.py", line 33, in <module>
from jinja2.environment import Environment, Template
File "C:\Program Files\Python36\lib\site-packages\jinja2\environment.py", line 15, in <module>
from jinja2 import nodes
File "C:\Program Files\Python36\lib\site-packages\jinja2\nodes.py", line 19, in <module>
from jinja2.utils import Markup
File "C:\Program Files\Python36\lib\site-packages\jinja2\utils.py", line 647, in <module>
from markupsafe import Markup, escape, soft_unicode
File "C:\Program Files\Python36\lib\site-packages\markupsafe\__init__.py", line 14, in <module>
from markupsafe._compat import text_type, string_types, int_types, \
ModuleNotFoundError: No module named 'markupsafe._compat' @alorence's solution fixed it all. Kudos to him for fixing an hours long issue. |
Here is a simple solution. Since it is a decode error, it can be solved by changing the console's coding to utf-8. Just run
and it works. |
no. it's didn't help.
did I do something wrong? |
before this I had tried install flask:
and code of programm:
|
@OlegBrony It seems that Markupsafe is failed to build and install, but pip thinks it is already installed after the unsuccessful install. Maybe this issue only appears in Virtualenv environment. Please try to uninstall, 'chcp 65001', and install it again. |
@gKevinK Yep, reinstall worked. Thank you a lot. |
storing raw wheels in repo to workaround pallets/markupsafe#67
I used "git bash" for reinstalation markupsafe and it helped me. No one UnicodeDecodeError |
Hi , Today I have the same problem on win10 , please dont't try to solved it . thanks for this amazing project |
I also saw this error. But I upgraded my pip to 10.0.1 and resolved problem. |
@maxtortime solution solved it for me |
Closing, it looks like upgraded pip solved it, but it will also be solved by #45. |
PyPI has wheels for MarkupSafe 1.1.0. |
Python 3.6 (x86-64)
pip == 9.0.1
setuptools == 34.3.2
The text was updated successfully, but these errors were encountered: