I am installing django-compressor on Windows 10 x64 with Python 3.4 x64. J'installe django-compressor sur Windows 10 x64 avec Python 3.4 x64. I get the following error when I install it with pip. J'obtiens l'erreur suivante lorsque je l'installe avec pip. Interestingly enough, I did not get such an error with Python 3.5 x64. Chose intéressante, je n'ai pas eu une telle erreur avec Python 3.5 x64.
> pip install django-compressor --upgrade
Collecting django-compressor
Using cached django_compressor-2.1-py2.py3-none-any.whl
Collecting rjsmin==1.0.12 (from django-compressor)
Using cached rjsmin-1.0.12.tar.gz
Collecting rcssmin==1.0.6 (from django-compressor)
Using cached rcssmin-1.0.6.tar.gz
Requirement already up-to-date: django-appconf>=1.0 in d:\env3\lib\site-packages (from django-compressor)
Building wheels for collected packages: rjsmin, rcssmin
Running setup.py bdist_wheel for rjsmin ... error
Complete output from command d:\env\scripts\python.exe -u -c "import setuptools, tokenize;__file__='\\Temp\\pip-build-um3ph8qp\\rjsmin\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d \Temp\tmp6dj8tx90pip-wheel- --python-tag cp34:
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.4
copying .\rjsmin.py -> build\lib.win-amd64-3.4
running build_ext
building '_rjsmin' extension
error: Microsoft Visual C++ 10.0 is required. Get it with "Microsoft Windows SDK 7.1": www.microsoft.com/download/details.aspx?id=8279
----------------------------------------
Failed building wheel for rjsmin
Running setup.py clean for rjsmin
Running setup.py bdist_wheel for rcssmin ... error
Complete output from command d:\env3\scriptspython.exe -u -c "import setuptools, tokenize;__file__='\\Temp\\pip-build-um3ph8qp\\rcssmin\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d \Temp\tmp_cfj9vrjpip-wheel- --python-tag cp34:
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.4
copying .\rcssmin.py -> build\lib.win-amd64-3.4
running build_ext
building '_rcssmin' extension
error: Microsoft Visual C++ 10.0 is required. Get it with "Microsoft Windows SDK 7.1": www.microsoft.com/download/details.aspx?id=8279
----------------------------------------
Failed building wheel for rcssmin
Running setup.py clean for rcssmin
Failed to build rjsmin rcssmin
Installing collected packages: rjsmin, rcssmin, django-compressor
Running setup.py install for rjsmin ... error
Complete output from command d:\env3\scripts\python.exe -u -c "import setuptools, tokenize;__file__='\\Temp\\pip-build-um3ph8qp\\rjsmin\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record \Temp\pip-_z23ysr6-record\install-record.txt --single-version-externally-managed --compile --install-headers d:\env3\include\site\python3.4\rjsmin:
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.4
copying .\rjsmin.py -> build\lib.win-amd64-3.4
running build_ext
building '_rjsmin' extension
error: Microsoft Visual C++ 10.0 is required. Get it with "Microsoft Windows SDK 7.1": www.microsoft.com/download/details.aspx?id=8279
----------------------------------------
Command "d:\env3\scripts\python.exe -u -c "import setuptools, tokenize;__file__='\\Temp\\pip-build-um3ph8qp\\rjsmin\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record \Temp\pip-_z23ysr6-record\install-record.txt --single-version-externally-managed --compile --install-headers d:\env3\include\site\python3.4\rjsmin" failed with error code 1 in \Temp\pip-build-um3ph8qp\rjsmin\
en
J'ai pu l'installer en faisant d'abord ceci:
pip install rcssmin --install-option="--without-c-extensions"
pip install rjsmin --install-option="--without-c-extensions"
pip install django-compressor --upgrade
en
that sounds about right. ça sonne juste. they have some c code they try to compile, but there was no compiler installed on your system. ils ont du code c qu'ils essaient de compiler, mais aucun compilateur n'est installé sur votre système. they could provide a better error message, see here: https://github.com/ndparker/rcssmin/issues/4 ils pourraient fournir un meilleur message d'erreur, voir ici : https://github.com/ndparker/rcssmin/issues/4
we could theoretically make rcssmin and rjsmin non-mandatory (also discussed here #803), but i think it's nice to have some installed by default. nous pourrions théoriquement rendre rcssmin et rjsmin non obligatoires (également discuté ici # 803), mais je pense que c'est bien d'en avoir installé par défaut. if you think otherwise, you can open a ticket for that if you want. si vous pensez le contraire, vous pouvez ouvrir un ticket pour cela si vous le souhaitez.
enÉtait très utile.
enSame issue trying to install in linux mint 18. Même problème lors de l'installation sous Linux Mint 18.
_setup/include/cext.h:34:20: fatal error: Python.h: No such file or directory
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
@karyon how does installing without the c extensions affect the functionality? @karyon comment l'installation sans les extensions c affecte-t-elle la fonctionnalité ?
enLe fichier readme de @jodom rcssmin indique rcssmin.c is a reimplementation of rcssmin.py in C and improves runtime up to factor 100 or so
, donc je suppose que les fonctionnalités sont les mêmes, mais cela fonctionne beaucoup plus lentement sans les extensions c.
oh great, I've managed to install it following your tip above. oh génial, j'ai réussi à l'installer en suivant votre conseil ci-dessus. Should I have any issues then ill try to reinstall it with the c extensions. Si j'ai des problèmes, j'essaierai de le réinstaller avec les extensions c. This is considering that previously I had it installing just fine in a different mint 18 VM Cela tient compte du fait qu'auparavant, je l'avais installé très bien dans une autre machine virtuelle Mint 18
enInstalling python3.6-dev
fixed it for me. L'installation python3.6-dev
l'a corrigé pour moi. I'm using Python 3.6, so substitute the version number with whatever version of Python you're using. J'utilise Python 3.6, alors remplacez le numéro de version par la version de Python que vous utilisez.
The real solution is installing python3-dev
package. La vraie solution consiste à installer le package python3-dev
. After sudo apt-get install python3-dev
i was able to get it. Après sudo apt-get install python3-dev
j'ai pu l'obtenir. Cheers Acclamations
Thanks, MacOS High Sierra excl. Merci, MacOS High Sierra exclu. Xcode spam and with miniconda & python3.6 showed the same error. Le spam Xcode et avec miniconda & python3.6 ont montré la même erreur.
enJ'ai essayé ce qui suit et cela fonctionne:
pip install rcssmin --install-option="--without-c-extensions"
pip install rjsmin --install-option="--without-c-extensions"
en
For me, I was missing xcode command line tools on 10.13 (thought it was installed, but guess not). Pour moi, il me manquait des outils de ligne de commande xcode sur 10.13 (je pensais qu'il était installé, mais je suppose que non). I was able to fix the OP's issue that I also had by running xcode-select --install
J'ai pu résoudre le problème de l'OP que j'avais également en exécutant xcode-select --install
I was able to get it to install by doing this first: J'ai pu l'installer en faisant d'abord ceci:
pip install rcssmin --install-option="--without-c-extensions" pip install rjsmin --install-option="--without-c-extensions" pip install django-compressor --upgrade
enI was able to get it to install by doing this first: J'ai pu l'installer en faisant d'abord ceci:
pip install rcssmin --install-option="--without-c-extensions" pip install rjsmin --install-option="--without-c-extensions" pip install django-compressor --upgrade
Super Bob...
enHourra ça a fonctionné .... merci
enrjsmin
the install-option="--without-c-extensions"
is no longer required. rjsmin
le install-option="--without-c-extensions"
n'est plus nécessaire.
It looks like the install option for rjsmin
may have been removed in the new 1.1.0 release released March 6th 2019. Il semble que l'option d'installation pour rjsmin
ait été supprimée dans la nouvelle version 1.1.0 publiée le 6 mars 2019.
Closed issue on rjsmin
repo: https://github.com/ndparker/rjsmin/issues/15 Problème clos sur rjsmin
: https://github.com/ndparker/rjsmin/issues/15
voir #930
enenI have tried the following and it works: J'ai essayé ce qui suit et cela fonctionne:
pip install rcssmin --install-option="--without-c-extensions" pip install rjsmin --install-option="--without-c-extensions"
New rjsmin doesn't work with that option at the moment Le nouveau rjsmin ne fonctionne pas avec cette option pour le moment
error: Erreur:
error: option --without-c-extensions not recognized
If you have that problem you can set the version: Si vous rencontrez ce problème, vous pouvez définir la version :
pip install rjsmin==1.0.12 --install-option="--without-c-extensions"
@brmley comme indiqué ci-dessus, vous devriez pouvoir simplement omettre cette option maintenant, pas besoin d'installer une version plus ancienne.
enDernières commandes qui fonctionnent pour moi:
pip install rcssmin --install-option="--without-c-extensions"
pip install rjsmin
pip install django-compressor --upgrade
en
apt-get install python3.7-dev - semble être une dépendance de cette bibliothèque et a résolu mon problème
en
Commentaire le plus utile
J'ai pu l'installer en faisant d'abord ceci:
en