Skip to content
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

Cannot Install MarkupSafe in virtualenv 15.1.0 on Amazon Linux #1117

Closed
inf3cti0n95 opened this issue Jan 3, 2018 · 4 comments
Closed

Cannot Install MarkupSafe in virtualenv 15.1.0 on Amazon Linux #1117

inf3cti0n95 opened this issue Jan 3, 2018 · 4 comments

Comments

@inf3cti0n95
Copy link

#836 As mentioned in this Issue, I am having the same issue with my Amazon Linux 2017.09, pip 9.0.1, Python 3.5.1, virtualenv 15.1.0

It is working fine on My Ubuntu Machine but not working on my Remote AWS machine.

Tried reinstalling everything. But still not working.

pip freeze output before -

astroid==1.6.0
certifi==2017.7.27.1
chardet==3.0.4
coreapi==2.3.3
coreschema==0.0.4
Django==1.11.6
django-cors-headers==2.1.0
django-filter==1.1.0
django-post-office==3.0.3
django-rest-swagger==2.1.2
django-sendmail-backend==0.1.2
djangorestframework==3.7.1
google-api-python-client==1.6.4
httplib2==0.10.3
idna==2.6
isort==4.2.15
itypes==1.1.0
Jinja2==2.9.6
jsonfield==2.0.2
jsonpickle==0.9.5
jsonschema==2.6.0
mccabe==0.6.1
oauth2client==4.1.2
openapi-codec==1.3.2
pyasn1==0.3.7
pyasn1-modules==0.1.5
PyDrive==1.3.1
pylint==1.8.1
pytz==2017.2
requests==2.18.4
rsa==3.4.2
six==1.11.0
uritemplate==3.0.0
urllib3==1.22
$ pip install markupsafe -vvv --no-cache-dir

Output


Collecting markupsafe
  1 location(s) to search for versions of markupsafe:
  * https://pypi.python.org/simple/markupsafe/
  Getting page https://pypi.python.org/simple/markupsafe/
  Starting new HTTPS connection (1): pypi.python.org
  "GET /simple/markupsafe/ HTTP/1.1" 200 1415
  Analyzing links from page https://pypi.python.org/simple/markupsafe/
    Found link https://pypi.python.org/packages/00/00/d268f88c561a92e35e1df96e68dbec2210926366c79fd426b1d9ee99b020/MarkupSafe-0.12.tar.gz#md5=edd4b6950f6d4ddc6e23fa322f8f0f53 (from https://pypi.python.org/simple/markupsafe/), version: 0.12
    Found link https://pypi.python.org/packages/00/52/33fd9769edf01ffab9e3fd321333fe4d9f7ac9cb0b17ce9524abcb64e089/MarkupSafe-0.15.tar.gz#md5=4e7c4d965fe5e033fa2d7bb7746bb186 (from https://pypi.python.org/simple/markupsafe/), version: 0.15
    Found link https://pypi.python.org/packages/04/d0/21c43bb0a9c9b31c8bfeb3676e12ec0aae2b71632497b6bd6505c980a38a/MarkupSafe-0.17.tar.gz#md5=61d5edc130e3242cfaff9fd9fdefde8f (from https://pypi.python.org/simple/markupsafe/), version: 0.17
    Found link https://pypi.python.org/packages/36/83/400b5f58bfa88f96bc68ccd963990c80549a2825d0777bd838f03d8f0b42/MarkupSafe-0.9.2.tar.gz#md5=69b72d1afdd9e808f9c1ef65f819c7a6 (from https://pypi.python.org/simple/markupsafe/), version: 0.9.2
    Found link https://pypi.python.org/packages/3b/45/dfad433343922655477760d506b058f96a783e8c0ada7b8d0602ff2beace/MarkupSafe-0.9.1.tar.gz#md5=7f469f664b565b440f099997255e6d3c (from https://pypi.python.org/simple/markupsafe/), version: 0.9.1
    Found link https://pypi.python.org/packages/44/ee/37bd0844418acd5fb9c588aae835f38b9b7c4cd0c9b95c78c8ebb74bb65a/MarkupSafe-0.16.tar.gz#md5=fe88012f7fe75252efd26cd25a100851 (from https://pypi.python.org/simple/markupsafe/), version: 0.16
    Found link https://pypi.python.org/packages/4d/de/32d741db316d8fdb7680822dd37001ef7a448255de9699ab4bfcbdf4172b/MarkupSafe-1.0.tar.gz#md5=2fcedc9284d50e577b5192e8e3578355 (from https://pypi.python.org/simple/markupsafe/), version: 1.0
    Found link https://pypi.python.org/packages/58/18/646cbd99909a0c86eb7b9c0277b88cb54f3e2619f6115f48199a4accde97/MarkupSafe-0.22.tar.gz#md5=cb3ec29fd5361add24cfd0c6e2953b3e (from https://pypi.python.org/simple/markupsafe/), version: 0.22
    Found link https://pypi.python.org/packages/61/9d/195c0e2e9efcba7b5f2cad9d01ea7311e20358a7d1c8a928fb481eecad09/MarkupSafe-0.13.tar.gz#md5=f44b8f4bba98b3e66884158f97585829 (from https://pypi.python.org/simple/markupsafe/), version: 0.13
    Found link https://pypi.python.org/packages/6f/c3/7adab2342dc7f14d32943505c9bd163d93a16fa117b8fee82e48f3529fb5/MarkupSafe-0.20.tar.gz#md5=7da066d9cb191a70aa85d0a3d43565d1 (from https://pypi.python.org/simple/markupsafe/), version: 0.20
    Found link https://pypi.python.org/packages/8e/90/da092a12fb96e0c4cacc279d1f92819ae82bfa291e0a03afe8059518e91a/MarkupSafe-0.19.tar.gz#md5=ccb3f746c807c5500850987006854a6d (from https://pypi.python.org/simple/markupsafe/), version: 0.19
    Found link https://pypi.python.org/packages/98/cf/197c3b0f73224b84eb419a967f87565bcc0b0c1147012397e6bd2d45e253/MarkupSafe-0.18.tar.gz#md5=f8d252fd05371e51dec2fe9a36890687 (from https://pypi.python.org/simple/markupsafe/), version: 0.18
    Found link https://pypi.python.org/packages/be/30/7dfaf5f61e9648a9bb97ecd0099da2546ea78fe93cb9c777030c6d056c0d/MarkupSafe-0.9.tar.gz#md5=10a7c6bf81f91f280ba9e76e32e01c94 (from https://pypi.python.org/simple/markupsafe/), version: 0.9
    Found link https://pypi.python.org/packages/c0/41/bae1254e0396c0cc8cf1751cb7d9afc90a602353695af5952530482c963f/MarkupSafe-0.23.tar.gz#md5=f5ab3deee4c37cd6a922fb81e730da6e (from https://pypi.python.org/simple/markupsafe/), version: 0.23
    Found link https://pypi.python.org/packages/c6/33/963f57460372f8401e1f9aa32c8ed8f07a5cae0f11024f5ff1d4cb3576c8/MarkupSafe-0.21.tar.gz#md5=fde838d9337fa51744283f46a1db2e74 (from https://pypi.python.org/simple/markupsafe/), version: 0.21
    Found link https://pypi.python.org/packages/cf/72/6ad21b64f007dba3d211a973f37e3bf0bffae88c4efb868999fd2c94497a/MarkupSafe-0.14.tar.gz#md5=68c6ea6df002649218d24cf490a8ca82 (from https://pypi.python.org/simple/markupsafe/), version: 0.14
    Found link https://pypi.python.org/packages/ee/51/df4a007a19f3de1b733adac77da11fa45f1ec5089549a7cc2d67195bb2c1/MarkupSafe-0.11.tar.gz#md5=48d445941c16d6aa55caf8e148fc0911 (from https://pypi.python.org/simple/markupsafe/), version: 0.11
    Found link https://pypi.python.org/packages/f1/a7/39b74c3c7b46531842d2a9a55b7d6bf5b44851786d131d0fa76dbb4abf44/MarkupSafe-0.9.3.tar.gz#md5=99dccbeb83302f6b593d382098b3b43a (from https://pypi.python.org/simple/markupsafe/), version: 0.9.3
  Using version 1.0 (newest of versions: 0.9, 0.9.1, 0.9.2, 0.9.3, 0.11, 0.12, 0.13, 0.14, 0.15, 0.16, 0.17, 0.18, 0.19, 0.20, 0.21, 0.22, 0.23, 1.0)
  "GET /packages/4d/de/32d741db316d8fdb7680822dd37001ef7a448255de9699ab4bfcbdf4172b/MarkupSafe-1.0.tar.gz HTTP/1.1" 200 14356
  Downloading MarkupSafe-1.0.tar.gz
  Downloading from URL https://pypi.python.org/packages/4d/de/32d741db316d8fdb7680822dd37001ef7a448255de9699ab4bfcbdf4172b/MarkupSafe-1.0.tar.gz#md5=2fcedc9284d50e577b5192e8e3578355 (from https://pypi.python.org/simple/markupsafe/)
  Running setup.py (path:/tmp/pip-build-bb4lpqnv/markupsafe/setup.py) egg_info for package markupsafe
    Running command python setup.py egg_info
    running egg_info
    creating pip-egg-info/MarkupSafe.egg-info
    writing pip-egg-info/MarkupSafe.egg-info/PKG-INFO
    writing dependency_links to pip-egg-info/MarkupSafe.egg-info/dependency_links.txt
    writing top-level names to pip-egg-info/MarkupSafe.egg-info/top_level.txt
    writing manifest file 'pip-egg-info/MarkupSafe.egg-info/SOURCES.txt'
    reading manifest file 'pip-egg-info/MarkupSafe.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    writing manifest file 'pip-egg-info/MarkupSafe.egg-info/SOURCES.txt'
  Source in /tmp/pip-build-bb4lpqnv/markupsafe has version 1.0, which satisfies requirement markupsafe from https://pypi.python.org/packages/4d/de/32d741db316d8fdb7680822dd37001ef7a448255de9699ab4bfcbdf4172b/MarkupSafe-1.0.tar.gz#md5=2fcedc9284d50e577b5192e8e3578355
Installing collected packages: markupsafe
  Running setup.py install for markupsafe ...     Running command /home/ec2-user/falcon-api/venv/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-bb4lpqnv/markupsafe/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-er2_ez27-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/ec2-user/falcon-api/venv/include/site/python3.5/markupsafe
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.5
    creating build/lib.linux-x86_64-3.5/markupsafe
    copying markupsafe/_compat.py -> build/lib.linux-x86_64-3.5/markupsafe
    copying markupsafe/_native.py -> build/lib.linux-x86_64-3.5/markupsafe
    copying markupsafe/_constants.py -> build/lib.linux-x86_64-3.5/markupsafe
    copying markupsafe/__init__.py -> build/lib.linux-x86_64-3.5/markupsafe
    running egg_info
    writing dependency_links to MarkupSafe.egg-info/dependency_links.txt
    writing top-level names to MarkupSafe.egg-info/top_level.txt
    writing MarkupSafe.egg-info/PKG-INFO
    reading manifest file 'MarkupSafe.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    writing manifest file 'MarkupSafe.egg-info/SOURCES.txt'
    copying markupsafe/_speedups.c -> build/lib.linux-x86_64-3.5/markupsafe
    running build_ext
    building 'markupsafe._speedups' extension
    creating build/temp.linux-x86_64-3.5
    creating build/temp.linux-x86_64-3.5/markupsafe
    gcc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python3.5m -c markupsafe/_speedups.c -o build/temp.linux-x86_64-3.5/markupsafe/_speedups.o
    gcc -pthread -shared build/temp.linux-x86_64-3.5/markupsafe/_speedups.o -L/usr/lib64 -lpython3.5m -o build/lib.linux-x86_64-3.5/markupsafe/_speedups.cpython-35m-x86_64-linux-gnu.so
    running install_lib
    copying build/lib.linux-x86_64-3.5/markupsafe/_speedups.cpython-35m-x86_64-linux-gnu.so -> /home/ec2-user/falcon-api/venv/lib64/python3.5/dist-packages/markupsafe
    running install_egg_info
    Copying MarkupSafe.egg-info to /home/ec2-user/falcon-api/venv/lib64/python3.5/dist-packages/MarkupSafe-1.0-py3.5.egg-info
    running install_scripts
    writing list of installed files to '/tmp/pip-er2_ez27-record/install-record.txt'
done
  Removing source in /tmp/pip-build-bb4lpqnv/markupsafe
Successfully installed markupsafe-1.0
Cleaning up...

pip freeze

output later Stays Same

astroid==1.6.0
certifi==2017.7.27.1
chardet==3.0.4
coreapi==2.3.3
coreschema==0.0.4
Django==1.11.6
django-cors-headers==2.1.0
django-filter==1.1.0
django-post-office==3.0.3
django-rest-swagger==2.1.2
django-sendmail-backend==0.1.2
djangorestframework==3.7.1
google-api-python-client==1.6.4
httplib2==0.10.3
idna==2.6
isort==4.2.15
itypes==1.1.0
Jinja2==2.9.6
jsonfield==2.0.2
jsonpickle==0.9.5
jsonschema==2.6.0
mccabe==0.6.1
oauth2client==4.1.2
openapi-codec==1.3.2
pyasn1==0.3.7
pyasn1-modules==0.1.5
PyDrive==1.3.1
pylint==1.8.1
pytz==2017.2
requests==2.18.4
rsa==3.4.2
six==1.11.0
uritemplate==3.0.0
urllib3==1.22
@alextmeyer
Copy link

alextmeyer commented Jan 11, 2018

Hey @inf3cti0n95 we recently ran into this issue when using Jinja2 (and hitting the same underlying issue as you with markupsafe). It appears to be an issue with the default installed virtualenv on the Amazon Linux AMI. We resolved the issue by running
sudo pip install -U virtualenv --force-reinstall

Then we could install Jinja2 and import it in Python with no issues

@alextmeyer
Copy link

It appears like Amazon may have fixed this in the AMIs. Just tested it again and we had no problems with the default virtualenv installed on the instance.

@wiredfool
Copy link

Broken again, fixed with the forced upgrade of virtualenv

@xavfernandez
Copy link
Member

It looks like a duplicate of pypa/pip#4464

@pypa pypa locked and limited conversation to collaborators Jan 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants