carltongibson / rest-framework-tutorial

61 stars 65 forks source link

Installation of requirements fails #13

Open Zombymumf opened 4 years ago

Zombymumf commented 4 years ago

Hi, I am desperately trying to get a non-trivial django project onto Azure and failing miserably. So I decided to follow Carlton's videos from scratch. I downloaded this repos onto my Ubuntu 16.04 machine; created my virtual env (3.6.4) and activated it. Then I tried to pip install the requirements.txt. Bang! .... Installing collected packages: chardet, urllib3, certifi, idna, requests, PyJWT, pycparser, cffi, asn1crypto, six, cryptography, python-dateutil, adal, pycodestyle, autopep8, azure-common, oauthlib, requests-oauthlib, isodate, msrest, azure-nspkg, azure-servicefabric, azure-servicemanagement-legacy, msrestazure, azure-graphrbac, azure-applicationinsights, azure-cosmosdb-nspkg, azure-storage-common, azure-cosmosdb-table, azure-eventgrid, azure-storage-queue, azure-loganalytics, azure-storage-blob, azure-batch, azure-datalake-store, azure-storage-file, azure-servicebus, azure-mgmt-eventhub, azure-mgmt-rdbms, azure-mgmt-nspkg, azure-mgmt-consumption, azure-mgmt-recoveryservices, azure-mgmt-msi, azure-mgmt-recoveryservicesbackup, azure-mgmt-search, azure-mgmt-monitor, azure-mgmt-devspaces, azure-mgmt-containerinstance, azure-mgmt-batchai, azure-mgmt-loganalytics, azure-mgmt-scheduler, azure-mgmt-servicebus, azure-mgmt-datafactory, azure-mgmt-dns, azure-mgmt-batch, azure-mgmt-network, azure-mgmt-web, azure-mgmt-iotcentral, azure-mgmt-logic, azure-mgmt-machinelearningcompute, azure-mgmt-compute, azure-mgmt-hanaonazure, azure-mgmt-managementgroups, azure-mgmt-eventgrid, azure-mgmt-cdn, azure-mgmt-subscription, azure-mgmt-storage, azure-mgmt-datamigration, azure-mgmt-datalake-nspkg, azure-mgmt-datalake-store, azure-mgmt-relay, azure-mgmt-cosmosdb, azure-mgmt-applicationinsights, azure-mgmt-redis, azure-mgmt-reservations, azure-mgmt-notificationhubs, azure-mgmt-iothub, azure-mgmt-media, azure-mgmt-policyinsights, azure-mgmt-sql, azure-mgmt-iothubprovisioningservices, azure-mgmt-billing, azure-mgmt-containerservice, azure-mgmt-powerbiembedded, azure-mgmt-signalr, azure-mgmt-advisor, azure-mgmt-servicefabric, azure-mgmt-keyvault, azure-mgmt-maps, azure-mgmt-trafficmanager, azure-mgmt-authorization, azure-mgmt-cognitiveservices, azure-mgmt-datalake-analytics, azure-mgmt-devtestlabs, azure-mgmt-commerce, azure-mgmt-managementpartner, azure-mgmt-marketplaceordering, azure-mgmt-containerregistry, azure-mgmt-resource, azure-mgmt, azure-keyvault, azure, azure-functions, grpcio, setuptools, protobuf, grpcio-tools, azure-functions-worker, azure-functions-wsgi-adapter, Click, itypes, uritemplate, MarkupSafe, Jinja2, coreschema, coreapi, dj-database-url, pytz, Django, django-storages, djangorestframework, pyflakes, mccabe, flake8, gunicorn, Markdown, psycopg2, Pygments, python-dotenv, whitenoise Running setup.py install for autopep8 ... done Found existing installation: setuptools 28.8.0 Uninstalling setuptools-28.8.0: Successfully uninstalled setuptools-28.8.0 Running setup.py install for itypes ... done Running setup.py install for MarkupSafe ... error Complete output from command /home/gary/trialenvs/cleanenv/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-build-j8qxgve0/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-ih3uryoo-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/gary/trialenvs/cleanenv/include/site/python3.6/MarkupSafe: Traceback (most recent call last): File "", line 1, in File "/tmp/pip-build-j8qxgve0/MarkupSafe/setup.py", line 6, in from setuptools import setup, Extension, Feature ImportError: cannot import name 'Feature'

----------------------------------------

Command "/home/gary/trialenvs/cleanenv/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-build-j8qxgve0/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-ih3uryoo-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/gary/trialenvs/cleanenv/include/site/python3.6/MarkupSafe" failed with error code 1 in /tmp/pip-build-j8qxgve0/MarkupSafe/

I am sure someone must have done this correctly - so what am I doing wrong please?

Zombymumf commented 4 years ago

Sorry to anyone who already knows this ...I am a newbie! The answer to my problem was to pin MarkupSafe to v.1.1.1 in requirements.txt

carltongibson commented 4 years ago

Glad you solved it @Zombymumf!