Django-compressor: rcssmin 및 rjsmin이 μ„€μΉ˜λ˜μ§€ μ•ŠμŒ

에 λ§Œλ“  2016λ…„ 11μ›” 02일  Β·  20μ½”λ©˜νŠΈ  Β·  좜처: django-compressor/django-compressor

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

λͺ¨λ“  20 λŒ“κΈ€

λ¨Όμ € λ‹€μŒμ„ μˆ˜ν–‰ν•˜μ—¬ μ„€μΉ˜ν•  수 μžˆμ—ˆμŠ΅λ‹ˆλ‹€.

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

맀우 μœ μš©ν–ˆμŠ΅λ‹ˆλ‹€.

en

Same 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 ν™•μž₯이 μ—†μœΌλ©΄ 훨씬 느리게 μž‘λ™ν•©λ‹ˆλ‹€.

en

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에 잘 μ„€μΉ˜λ˜μ—ˆμŒμ„ κ³ λ €ν•˜κ³  μžˆμŠ΅λ‹ˆλ‹€.

en

Installing 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 λ²„μ „μœΌλ‘œ λŒ€μ²΄ν•˜μ‹­μ‹œμ˜€.

en

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 건배

en

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의 λ¬Έμ œλ„ ν•΄κ²°ν•  수 μžˆμ—ˆμŠ΅λ‹ˆλ‹€.

en

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

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
en

슈퍼λ°₯...

en

λ§Œμ„Έ....κ°μ‚¬ν•©λ‹ˆλ‹€.

en

rjsmin 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

en

#930 μ°Έμ‘°

en

I 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"

en

@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
이 νŽ˜μ΄μ§€κ°€ 도움이 λ˜μ—ˆλ‚˜μš”?
0 / 5 - 0 λ“±κΈ‰