I am installing django-compressor on Windows 10 x64 with Python 3.4 x64. Python 3.4 x64κ° μ€μΉλ Windows 10 x64μ django-compressorλ₯Ό μ€μΉ μ€μ λλ€. I get the following error when I install it with pip. pipλ‘ μ€μΉν λ λ€μ μ€λ₯κ° λ°μν©λλ€. Interestingly enough, I did not get such an error with Python 3.5 x64. ν₯λ―Έλ‘κ²λ 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
λ¨Όμ λ€μμ μννμ¬ μ€μΉν μ μμμ΅λλ€.
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. κ·Έκ²μ λ§λ μ리μ λλ€. they have some c code they try to compile, but there was no compiler installed on your system. κ·Έλ€μ μ»΄νμΌμ μλνλ μΌλΆ C μ½λλ₯Ό κ°μ§κ³ μμ§λ§ μμ€ν μ μ»΄νμΌλ¬κ° μ€μΉλμ΄ μμ§ μμ΅λλ€. they could provide a better error message, see here: https://github.com/ndparker/rcssmin/issues/4 λ λμ μ€λ₯ λ©μμ§λ₯Ό μ 곡ν μ μμ΅λλ€. 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. μ°λ¦¬λ μ΄λ‘ μ μΌλ‘ rcssminκ³Ό rjsminμ νμκ° μλ κ²μΌλ‘ λ§λ€ μ μμ§λ§(μ¬κΈ°μμλ #803μ λν΄ λ Όμν¨) κΈ°λ³Έμ μΌλ‘ μΌλΆλ₯Ό μ€μΉνλ κ²μ΄ μ’λ€κ³ μκ°ν©λλ€. if you think otherwise, you can open a ticket for that if you want. κ·Έλ μ§ μλ€κ³ μκ°νλ€λ©΄ μνλ κ²½μ° ν°μΌμ μ΄ μ μμ΅λλ€.
enλ§€μ° μ μ©νμ΅λλ€.
enSame issue trying to install in linux mint 18. 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 c νμ₯ μμ΄ μ€μΉνλ©΄ κΈ°λ₯μ μ΄λ€ μν₯μ μ€λκΉ?
en@jodom rcssminμ μΆκ° μ 보μ rcssmin.c is a reimplementation of rcssmin.py in C and improves runtime up to factor 100 or so
λΌκ³ λμ μμΌλ―λ‘ κΈ°λ₯μ λμΌνμ§λ§ c νμ₯μ΄ μμΌλ©΄ ν¨μ¬ λλ¦¬κ² μλν©λλ€.
oh great, I've managed to install it following your tip above. μ€ μ’μ, μμ νμ λ°λΌ μ€μΉνμ΅λλ€. Should I have any issues then ill try to reinstall it with the c extensions. λ¬Έμ κ° μλ κ²½μ° c νμ₯μΌλ‘ λ€μ μ€μΉν΄ 보μμμ€. This is considering that previously I had it installing just fine in a different mint 18 VM μ΄κ²μ μ΄μ μ λ€λ₯Έ λ―ΌνΈ 18 VMμ μ μ€μΉλμμμ κ³ λ €νκ³ μμ΅λλ€.
enInstalling python3.6-dev
fixed it for me. python3.6-dev
λ₯Ό μ€μΉνλ©΄ ν΄κ²°λμμ΅λλ€. I'm using Python 3.6, so substitute the version number with whatever version of Python you're using. μ λ Python 3.6μ μ¬μ©νκ³ μμΌλ―λ‘ λ²μ λ²νΈλ₯Ό μ¬μ© μ€μΈ Python λ²μ μΌλ‘ λ체νμμμ€.
The real solution is installing python3-dev
package. μ€μ μ루μ
μ python3-dev
ν¨ν€μ§λ₯Ό μ€μΉνλ κ²μ
λλ€. After sudo apt-get install python3-dev
i was able to get it. sudo apt-get install python3-dev
νμ λλ κ·Έκ²μ μ»μ μ μμλ€. Cheers 건배
Thanks, MacOS High Sierra excl. κ°μ¬ν©λλ€. MacOS High Sierra μ μΈ Xcode spam and with miniconda & python3.6 showed the same error. Xcode μ€νΈκ³Ό miniconda λ° python3.6μμ λμΌν μ€λ₯κ° νμλμμ΅λλ€.
enλλ λ€μμ μλνκ³ μλν©λλ€.
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). μ μκ²λ 10.13μμ xcode λͺ
λ Ήμ€ λκ΅¬κ° μμμ΅λλ€(μ€μΉλμλ€κ³ μκ°νμ§λ§ μλ κ² κ°μ΅λλ€). I was able to fix the OP's issue that I also had by running xcode-select --install
xcode-select --install
λ₯Ό μ€ννμ¬ OPμ λ¬Έμ λ ν΄κ²°ν μ μμμ΅λλ€.
I was able to get it to install by doing this first: λ¨Όμ λ€μμ μννμ¬ μ€μΉν μ μμμ΅λλ€.
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: λ¨Όμ λ€μμ μννμ¬ μ€μΉν μ μμμ΅λλ€.
pip install rcssmin --install-option="--without-c-extensions" pip install rjsmin --install-option="--without-c-extensions" pip install django-compressor --upgrade
μνΌλ°₯...
enλ§μΈ....κ°μ¬ν©λλ€.
enrjsmin
the install-option="--without-c-extensions"
is no longer required. rjsmin
install-option="--without-c-extensions"
λ λ μ΄μ νμνμ§ μμ΅λλ€.
It looks like the install option for rjsmin
may have been removed in the new 1.1.0 release released March 6th 2019. rjsmin
μ λν μ€μΉ μ΅μ
μ΄ 2019λ
3μ 6μΌμ 릴리μ€λ μλ‘μ΄ 1.1.0 릴리μ€μμ μ κ±°λ κ² κ°μ΅λλ€.
Closed issue on rjsmin
repo: https://github.com/ndparker/rjsmin/issues/15 rjsmin
리ν¬μ§ν 리μμ μ’
λ£λ λ¬Έμ : https://github.com/ndparker/rjsmin/issues/15
#930 μ°Έμ‘°
enenI have tried the following and it works: λλ λ€μμ μλνκ³ μλν©λλ€.
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 μλ‘μ΄ rjsminμ νμ¬ ν΄λΉ μ΅μ μμ μλνμ§ μμ΅λλ€.
error: μ€λ₯:
error: option --without-c-extensions not recognized
If you have that problem you can set the version: ν΄λΉ λ¬Έμ κ° μλ κ²½μ° λ²μ μ μ€μ ν μ μμ΅λλ€.
pip install rjsmin==1.0.12 --install-option="--without-c-extensions"
@brmley μμμ μΈκΈνλ―μ΄ μ§κΈμ ν΄λΉ μ΅μ μ μλ΅ν μ μμ΄μΌ νλ©° μ΄μ λ²μ μ μ€μΉν νμκ° μμ΅λλ€.
enλλ₯Ό μν΄ μΌνλ λ§μ§λ§ λͺ λ Ή :
pip install rcssmin --install-option="--without-c-extensions"
pip install rjsmin
pip install django-compressor --upgrade
en
apt-get install python3.7-dev - μ΄ λΌμ΄λΈλ¬λ¦¬μ λν μ’ μμ±μΈ κ²μΌλ‘ 보μ΄λ©° λ΄ λ¬Έμ λ₯Ό ν΄κ²°νμ΅λλ€.
en
κ°μ₯ μ μ©ν λκΈ
λ¨Όμ λ€μμ μννμ¬ μ€μΉν μ μμμ΅λλ€.
en