Django-compressor: rcssmin und rjsmin werden nicht installiert

Erstellt am 2. Nov. 2016  ·  20Kommentare  ·  Quelle: django-compressor/django-compressor

I am installing django-compressor on Windows 10 x64 with Python 3.4 x64. Ich installiere django-compressor unter Windows 10 x64 mit Python 3.4 x64. I get the following error when I install it with pip. Ich erhalte die folgende Fehlermeldung, wenn ich es mit Pip installiere. Interestingly enough, I did not get such an error with Python 3.5 x64. Interessanterweise bekam ich einen solchen Fehler mit Python 3.5 x64 nicht.

>  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

Hilfreichster Kommentar

Ich konnte es installieren, indem ich zuerst Folgendes tat:

pip install rcssmin --install-option="--without-c-extensions"
pip install rjsmin --install-option="--without-c-extensions"
pip install django-compressor --upgrade
en

Alle 20 Kommentare

Ich konnte es installieren, indem ich zuerst Folgendes tat:

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. das klingt ungefähr richtig. they have some c code they try to compile, but there was no compiler installed on your system. Sie haben C-Code, den sie zu kompilieren versuchen, aber auf Ihrem System war kein Compiler installiert. they could provide a better error message, see here: https://github.com/ndparker/rcssmin/issues/4 sie könnten eine bessere Fehlermeldung liefern, siehe hier: 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. Wir könnten rcssmin und rjsmin theoretisch nicht obligatorisch machen (auch hier diskutiert #803), aber ich denke, es ist schön, einige standardmäßig installiert zu haben. if you think otherwise, you can open a ticket for that if you want. Wenn Sie anderer Meinung sind, können Sie dafür ein Ticket eröffnen, wenn Sie möchten.

en

War sehr nützlich.

en

Same issue trying to install in linux mint 18. Gleiches Problem beim Versuch, in Linux Mint 18 zu installieren.

_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 Wie wirkt sich die Installation ohne die c-Erweiterungen auf die Funktionalität aus?

en

@jodom rcssmins Readme sagt rcssmin.c is a reimplementation of rcssmin.py in C and improves runtime up to factor 100 or so , also denke ich, dass die Funktionen die gleichen sind, aber es funktioniert viel langsamer ohne die c-Erweiterungen.

en

oh great, I've managed to install it following your tip above. oh toll, ich habe es geschafft, es nach Ihrem Tipp oben zu installieren. Should I have any issues then ill try to reinstall it with the c extensions. Sollte ich irgendwelche Probleme haben, dann versuche es mit den c-Erweiterungen neu zu installieren. This is considering that previously I had it installing just fine in a different mint 18 VM Dies bedenkt, dass ich es zuvor in einer anderen Mint 18-VM problemlos installiert hatte

en

Installing python3.6-dev fixed it for me. Die Installation python3.6-dev hat es für mich behoben. I'm using Python 3.6, so substitute the version number with whatever version of Python you're using. Ich verwende Python 3.6, also ersetzen Sie die Versionsnummer durch die Version von Python, die Sie verwenden.

en

The real solution is installing python3-dev package. Die eigentliche Lösung ist die Installation des Pakets python3-dev . After sudo apt-get install python3-dev i was able to get it. Nach sudo apt-get install python3-dev konnte ich es bekommen. Cheers Beifall

en

Thanks, MacOS High Sierra excl. Danke, MacOS High Sierra exkl. Xcode spam and with miniconda & python3.6 showed the same error. Xcode-Spam und mit miniconda & python3.6 zeigten den gleichen Fehler.

en

Folgendes habe ich probiert und es funktioniert:

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). Für mich fehlten mir die xcode-Befehlszeilentools auf 10.13 (dachte, es wäre installiert, aber schätze nicht). I was able to fix the OP's issue that I also had by running xcode-select --install Ich konnte das Problem des OP beheben, das ich auch hatte, indem ich xcode-select --install

en

I was able to get it to install by doing this first: Ich konnte es installieren, indem ich zuerst Folgendes tat:

pip install rcssmin --install-option="--without-c-extensions"
pip install rjsmin --install-option="--without-c-extensions"
pip install django-compressor --upgrade

I was able to get it to install by doing this first: Ich konnte es installieren, indem ich zuerst Folgendes tat:

pip install rcssmin --install-option="--without-c-extensions"
pip install rjsmin --install-option="--without-c-extensions"
pip install django-compressor --upgrade
en

Superbob...

en

Hurra es hat geklappt....danke

en

rjsmin the install-option="--without-c-extensions" is no longer required. rjsmin das install-option="--without-c-extensions" wird nicht mehr benötigt.

It looks like the install option for rjsmin may have been removed in the new 1.1.0 release released March 6th 2019. Es sieht so aus, als ob die Installationsoption für rjsmin in der neuen Version 1.1.0, die am 6. März 2019 veröffentlicht wurde, entfernt wurde.

Closed issue on rjsmin repo: https://github.com/ndparker/rjsmin/issues/15 Geschlossenes Problem bei rjsmin Repo: https://github.com/ndparker/rjsmin/issues/15

en

siehe #930

en

I have tried the following and it works: Folgendes habe ich probiert und es funktioniert:

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 New rjsmin funktioniert derzeit nicht mit dieser Option
error: Error:
error: option --without-c-extensions not recognized
If you have that problem you can set the version: Wenn Sie dieses Problem haben, können Sie die Version einstellen:
pip install rjsmin==1.0.12 --install-option="--without-c-extensions"

en

@brmley Wie oben erwähnt, sollten Sie diese Option jetzt einfach weglassen können, ohne dass Sie eine ältere Version installieren müssen.

en

Letzte Befehle, die für mich funktionieren:

pip install rcssmin --install-option="--without-c-extensions"
pip install rjsmin 
pip install django-compressor --upgrade
en

apt-get install python3.7-dev - scheint eine Abhängigkeit von dieser Bibliothek zu sein und hat mein Problem gelöst

en
War diese Seite hilfreich?
0 / 5 - 0 Bewertungen