èµ°ã£ãŠãããšã
pip install ipython
ç§ã¯åŸã
Collecting ipython
Using cached ipython-5.3.0-py2-none-any.whl
Collecting pickleshare (from ipython)
Using cached pickleshare-0.7.4-py2.py3-none-any.whl
Collecting simplegeneric>0.8 (from ipython)
Collecting traitlets>=4.2 (from ipython)
Using cached traitlets-4.3.2-py2.py3-none-any.whl
Collecting backports.shutil-get-terminal-size; python_version == "2.7" (from ipython)
Using cached backports.shutil_get_terminal_size-1.0.0-py2.py3-none-any.whl
Collecting decorator (from ipython)
Using cached decorator-4.0.11-py2.py3-none-any.whl
Collecting pygments (from ipython)
Using cached Pygments-2.2.0-py2.py3-none-any.whl
Requirement already satisfied: pexpect; sys_platform != "win32" in /usr/lib/python2.7/dist-packages (from ipython)
Collecting pathlib2; python_version == "2.7" or python_version == "3.3" (from ipython)
Using cached pathlib2-2.2.1-py2.py3-none-any.whl
Requirement already satisfied: setuptools>=18.5 in /usr/local/lib/python2.7/dist-packages (from ipython)
Collecting prompt-toolkit<2.0.0,>=1.0.4 (from ipython)
Using cached prompt_toolkit-1.0.14-py2-none-any.whl
Requirement already satisfied: enum34; python_version == "2.7" in /usr/lib/python2.7/dist-packages (from traitlets>=4.2->ipython)
Requirement already satisfied: six in /usr/lib/python2.7/dist-packages (from traitlets>=4.2->ipython)
Collecting ipython-genutils (from traitlets>=4.2->ipython)
Using cached ipython_genutils-0.2.0-py2.py3-none-any.whl
Collecting scandir; python_version < "3.5" (from pathlib2; python_version == "2.7" or python_version == "3.3"->ipython)
Using cached scandir-1.5.tar.gz
Requirement already satisfied: appdirs>=1.4.0 in /usr/local/lib/python2.7/dist-packages (from setuptools>=18.5->ipython)
Requirement already satisfied: packaging>=16.8 in /usr/local/lib/python2.7/dist-packages (from setuptools>=18.5->ipython)
Collecting wcwidth (from prompt-toolkit<2.0.0,>=1.0.4->ipython)
Using cached wcwidth-0.1.7-py2.py3-none-any.whl
Requirement already satisfied: pyparsing in /usr/local/lib/python2.7/dist-packages (from packaging>=16.8->setuptools>=18.5->ipython)
Building wheels for collected packages: scandir
Running setup.py bdist_wheel for scandir ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-mGtqyq/scandir/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmpzPzH0bpip-wheel- --python-tag cp27:
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
copying scandir.py -> build/lib.linux-x86_64-2.7
running build_ext
building '_scandir' extension
creating build/temp.linux-x86_64-2.7
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c _scandir.c -o build/temp.linux-x86_64-2.7/_scandir.o
_scandir.c:14:20: fatal error: Python.h: No such file or directory
#include <Python.h>
^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Failed building wheel for scandir
Running setup.py clean for scandir
Failed to build scandir
Installing collected packages: scandir, pathlib2, pickleshare, simplegeneric, decorator, ipython-genutils, traitlets, backports.shutil-get-terminal-size, pygments, wcwidth, prompt-toolkit, ipython
Running setup.py install for scandir ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-mGtqyq/scandir/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-kVFdnD-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
copying scandir.py -> build/lib.linux-x86_64-2.7
running build_ext
building '_scandir' extension
creating build/temp.linux-x86_64-2.7
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c _scandir.c -o build/temp.linux-x86_64-2.7/_scandir.o
_scandir.c:14:20: fatal error: Python.h: No such file or directory
#include <Python.h>
^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-mGtqyq/scandir/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-kVFdnD-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-mGtqyq/scandir/
ããã¯IPythonãšã¯é¢ä¿ãããŸãããåé¡ã¯ã scandirã®ã€ã³ã¹ããŒã«ã«èµ·å ããŸããããã¯ãscandirã¡ã³ãããŒã§ç¢ºèªããå¿ èŠããããŸãã
ã³ã³ãã€ã«äžã«Python.hãæ¬ èœããŠããå Žåã¯ãPythonããããŒãæ¬ èœããŠããå¯èœæ§ããããŸãã c-extensionsãã³ã³ãã€ã«ããå ŽåïŒscandirã«ã€ã³ã¹ããŒã«ããããšã§æé»çã«è¡ããŸãïŒãPythonããããŒïŒ apt-get install python-dev
ãããããŸãããïŒïŒãã€ã³ã¹ããŒã«ããããšããå§ãããŸãã
ãšããã§ãããã¯IPythonã®åé¡ã§ã¯ãªããããçµäºããŸããã質åãã³ã¡ã³ããç¶ããŠãã ããã
urãœãªã¥ãŒã·ã§ã³ã¯thnxã§æ©èœããŸãã
2017幎4æ14æ¥éææ¥ååŸ1æ11åãMatthias Bussonnier <
[email protected]>ã¯æ¬¡ã®ããã«æžããŠããŸãïŒ
ãšããã§ãããã¯IPythonã®åé¡ã§ã¯ãªããããçµäºããŸããããæ°è»œã«
質åãããã³ã¡ã³ããããããŸããâ
ã¹ã¬ãããäœæããããããããåãåã£ãŠããŸãã
ãã®ã¡ãŒã«ã«çŽæ¥è¿ä¿¡ããGitHubã§è¡šç€ºããŠãã ãã
https://github.com/ipython/ipython/issues/10454#issuecomment-294193464 ã
ãŸãã¯ã¹ã¬ããããã¥ãŒãããŸã
https://github.com/notifications/unsubscribe-auth/AP0A5HJjJ3e9DRWaJEPUe_8PakiWUET9ks5rv6imgaJpZM4M96VS
ã
apt install python-dev
2017幎4æ14æ¥éææ¥ååŸ1æ25åãããã³ããžã§ããµã³<
[email protected]>ã¯æ¬¡ã®ããã«æžããŠããŸãã
urãœãªã¥ãŒã·ã§ã³ã¯thnxã§æ©èœããŸãã
- ãã®ã¡ãŒã«ã¯ã100ïŒ ãªãµã€ã¯ã«ãããé»åã䜿çšããŠéä¿¡ãããŸããã 人éãåç©ã¯ããªã
ãã®ã¡ãã»ãŒãžã®äœæäžã«è² å·ãŸãã¯ãã©ãŠããè² ã£ãã ã§ããªã
åä¿¡è ã«ãåãããšãä¿èšŒããŸãã*2017幎4æ14æ¥éææ¥ååŸ1æ11åãMatthias Bussonnier <
[email protected]>ã¯æ¬¡ã®ããã«æžããŠããŸãïŒãšããã§ãããã¯IPythonã®åé¡ã§ã¯ãªããããçµäºããŸããããæ°è»œã«
質åãããã³ã¡ã³ããããããŸããâ
ã¹ã¬ãããäœæããããããããåãåã£ãŠããŸãã
ãã®ã¡ãŒã«ã«çŽæ¥è¿ä¿¡ããGitHubã§è¡šç€ºããŠãã ãã
https://github.com/ipython/ipython/issues/10454#issuecomment-294193464 ã
ãŸãã¯ã¹ã¬ããããã¥ãŒãããŸã
https://github.com/notifications/unsubscribe-auth/AP0A5HJjJ3e9DRWaJEPUe_8PakiWUET9ks5rv6imgaJpZM4M96VS
ã
CentOSãŠãŒã¶ãŒã®å Žåããyum groupinstallãéçºããŒã«ãå®è¡ããipythonãã€ã³ã¹ããŒã«ã§ããŸããïŒpython-develãã€ã³ã¹ããŒã«ããã ãã§ãæ©èœããŸããã§ããïŒããCarreauãææããããã«c-extensionsãèæ ®ããå¿ èŠããããšæããŸãã
Windowsã§ã¯ããpipinstalljupyterãã¯scandirãã€ã³ã¹ããŒã«ã§ããŸããã§ããã ãããããpipinstallscandirãã¯æåããŸããã ãããŠãpipinstalljupyterãã¯ãã®åŸæåããŸããã
Windowsã§ã¯ããpipinstalljupyterãã¯scandirãã€ã³ã¹ããŒã«ã§ããŸããã§ããã ãããããpipinstallscandirãã¯æåããŸããã ãããŠãpipinstalljupyterãã¯ãã®åŸæåããŸããã
ããã¯å¥åŠã§ããpipãšsetuptoolsã®ããŒãžã§ã³ã確èªã§ããŸããïŒ
確å®ãªããšïŒ é
ããŠããŸãç³ãèš³ãããŸããã
pip v9.0.1
setuptools v28.8.0
jupyterã®ã€ã³ã¹ããŒã«ãæ£åžžã«å®è¡ããåã«ãscandirã«å ããŠä»ã®ãã¹ãŠã®äŸåé¢ä¿ãpipã§çŽæ¥ã€ã³ã¹ããŒã«ããããšãæ確ã«ããå¿ èŠããããŸãã
ãŸããå®å šãæãããã«ã
python v2.7.13ïŒa06454b1afa1ã2016幎12æ17æ¥ã20ïŒ53ïŒ40ãMSC v.1500 64ãããïŒAMD64ïŒ
Windows 10ãããŒãžã§ã³1703ïŒOSãã«ã15063.540ïŒ
Python2.7ãæèŒããRedHat Enterprise Linux ServerãªãªãŒã¹7.4ïŒMaipoïŒã§åãåé¡ãçºçããŠããŸãã
ipythonãã€ã³ã¹ããŒã«ããããšããŠããŸãããscandirãåå ã§ã€ã³ã¹ããŒã«ã§ããŸããã
解決çãèŠã€ãããŸããã§ããããscandirããæ€çŽ¢ãããšããã®åé¡ãçµæãªã¹ãã®äžäœã«è¡šç€ºãããŸãã
誰ããRHELã«scandirãã€ã³ã¹ããŒã«ããæ¹æ³ã«ã€ããŠã®æ瀺ãæäŸã§ããŸããïŒ
sudo pip install scandir
ãå®è¡ããŠãåããšã©ãŒãçºçãç¶ããŸã
_scandir.c:14:20: fatal error: Python.h: No such file or directory
#include <Python.h>
^
compilation terminated.
error: command 'gcc' failed with exit status 1
PATHå€æ°ã®åé¡ã®ããã§ãã ãããããããããªã
ãPython.hã¯ã©ãã§ããã
1ã€ä»¥äžã®ãã¹ã衚瀺ãããå Žåã¯ããã£ã¬ã¯ããªïŒãã¡ã€ã«åãªãïŒãPATHå€æ°ã«è¿œå ããŸãã ããããªããšããã倧ããªåé¡ãçºçãããã·ã³ã§ããããŒãã¡ã€ã«ãååŸããæ¹æ³ãç解ããå¿
èŠããããŸãã
è¿
éãªå¯Ÿå¿ã«æè¬ããŸãã åé·ã§ããããªããã
ãããã£ãŠã whereis Python.h
ãšwhereis 'Python.h'
ã¯äœã衚瀺ãããŸããã
ããã¯ãç§ãæåã«ã¢ã¯ã»ã¹ãããšãã«Python2.7ã®ã¿ã§ã»ããã¢ããããããªã¢ãŒããã·ã³ã§ãã
ç§ã¯gccããæã£ãŠããªãã£ãã®ã§ã sudo yum groupinstall 'development tool'
_ afterwards._ãå®è¡ããŸããã
ãããåé¡ã§ããããïŒ ãããããªããPythonãã¢ã³ã€ã³ã¹ããŒã«ããŠåã€ã³ã¹ããŒã«ããå¿
èŠããããŸããïŒ
äžèšãåé¡ã§ã¯ãªãå ŽåïŒ
ç§ã¯sudoãŠãŒã¶ãŒã§ãããrootã§ã¯ãªãã®ã§ãã»ãšãã©ã®å Žæã«å¿
èŠãªãã¡ã€ã«ãscp
ã§ããŸãã
äœãã³ããŒãããïŒCããããŒãã¡ã€ã«Python.hïŒïŒãã©ãã«ã³ããŒããããäœããããïŒgccã®ã€ã³ã¯ã«ãŒããã¹ã«äœããè¿œå ããŸããïŒïŒãããããŸãããããã®gccã³ãã³ãã¯ã©ãããå®è¡ãããŠããŸããïŒ ïŒ ããããªãã
yum
ïŒyuckïŒãšrpm
ã䜿çšããŠããã®ã§ãæ®å¿µãªããapt-get
ã§ã¯åé¡ã解決ã§ããŸããã
ããã¥ã¡ã³ãã«ãããšã Python2.7ã§ã¯ipythonããŒãžã§ã³5ãšscandirããŒãžã§ã³<1.6ã䜿çšããå¿
èŠããããŸãã ãµãŒãããŒãã£ã®APIã®å¶çŽã«ãããPython3.xã䜿çšã§ããŸããã
ç§ã¯ïŒRHELãé€ããã¹ãŠã®ïŒçµéšè±å¯ãªéçºè ãªã®ã§ãæåã€ã³ã¹ããŒã«ã¯ç§ãæããããŸãã....ç§ã¯ãããè¡ãæ¹æ³ã«ã€ããŠäœãèŠã€ããããšãã§ããŸããã
ç§ã®PATHã«ã€ããŠã¯ããã®ãã·ã³ãã»ããã¢ãããããã°ãããªã®ã§ãçŸåšã¯ããªãçãã§ãã
ïŒç§ãèŠæ±ããããã«Python 2.7ãã€ã³ã¹ããŒã«ãããŠããŸããããä»ã«ã¯äœããããŸããã§ãããgccããããŸãããïŒ
~$ echo $PATH
/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin
Pythonã¯ããã«äœãã§ããŸãïŒ
$ whereis python
python: /usr/bin/python /usr/bin/python2.7 /usr/lib/python2.7 /usr/lib64/python2.7 /etc/python /usr/include/python2.7 /usr/share/man/man1/python.1.gz
倧äžå€«ã ç§ã¯ããªãã®ããã®è§£æ±ºçãæã£ãŠãããšæããŸã-ãŸãã¯å°ãªããšãè©Šãã¹ãäœãã åé·æ§ã«ã€ããŠè¬çœªããå¿ èŠã¯ãããŸããã å®å šãªå ±åã¯ããã®ãããªç¶æ³ã§ã®çŸåŸ³ã§ãã
sudo yum install python-devel
pip install scandir==1.5
ããã§ãPythonããããŒãã¡ã€ã«ãã/usr/include/python2.7/ãã«ã€ã³ã¹ããŒã«ãããå¿ èŠãªé©åãªscandirããŒãžã§ã³ãååŸãããŸãã ããã«ãšã©ãŒãçºçããå Žåã¯ãé æ ®ãªãããäžåºŠæçš¿ããŠãã ããã
ãŸãã以åããã®å°ããªä¿®æ£ã ããããŒã®ååšã確èªããã«ã¯ã以äžã䜿çšããããšããå§ãããŸãã
sudo updatedb
locate Python.h
åœæãç§ã¯whereis
ãå®è¡å¯èœãã¡ã€ã«ããããã®ããã¥ã¢ã«ããŒãžãããã³ãããã®ãœãŒã¹ãã¡ã€ã«ã«å¶éãããŠããããšã«æ°ã¥ããŠããŸããã§ããã
PSæåã®æçš¿ã§ã誀ã£ãŠã³ãŒãã®äžéšãé衚瀺ã«ããŸããããä»ã¯è¡šç€ºã§ããã¯ãã§ãã
å©ããŠãããŠããããšã@ jmchambers90 ïŒ
scandir Issue Trackerãã芧ã«ãªããšæããŸãïŒ https ïŒ//github.com/benhoyt/scandir/issues/85 RHELã«ã€ããŠã®èšåãããã sudo+pip
ã®äœ¿çšã¯é¿ããã¹ãã ãšæããŸãã yumãšpipããã¡ã€ã«ãããã£ãŠäºããããåé¡ãçºçããŸãã
pip 9以éã䜿çšããŠããéãã以åã®ããŒãžã§ã³ã®pipã䜿çšããŠããŠã¢ããã°ã¬ãŒãã§ããªãå Žåãpipã¯Python2ã«IPython6以éãã€ã³ã¹ããŒã«ããªãããã«ããå¿
èŠããããŸãã ããªãã¯pip install ipython<6
ããããããããŸããã
Python.h
ã«é¢ãããšã©ãŒã¯ãéåžžãPythonéçºããããŒãã€ã³ã¹ããŒã«ãããŠããªãããšãæå³ããŸãã Red Hatã®å Žåãå¿
èŠãªããã±ãŒãžã¯python-devel
ãŸãã¯python2-devel
ã®ãããªãã®ã§ããå¿
èŠããããŸãïŒDebianã§ã¯python-dev
ã§ãïŒã Python 3ã§åããšã©ãŒãçºçããŠããå Žåãããã±ãŒãžã¯ããããpython3-devel
ãŸãã¯python3-dev
ã®ããã«ãªããŸãã
@Carreau
ç§ã¯ãã§ã«ãããèŠãŠãããã«è³ªåãæçš¿ããŸããã ããã¯ç§ã«ã¯ããŸããããŸããã§ããã
@ jmchambers90
ã¢ã€ãã¢ãããããšãã ç§ã¯ãã§ã«ããããšããŸããŸãªããªãšãŒã·ã§ã³ãè©ŠããŸããã
åºåã¯æ¬¡ã®ãšããã§ãã
~$ sudo yum install python-devel
Loaded plugins: product-id, search-disabled-repos, subscription-manager
rhel-7-server-optional-rpms | 3.5 kB 00:00:00
No package python-devel available.
Error: Nothing to do
~$ pip install scandir==1.5
Collecting scandir==1.5
Using cached scandir-1.5.tar.gz
Building wheels for collected packages: scandir
Running setup.py bdist_wheel for scandir ... error
Complete output from command /usr/bin/python2 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-VI4qqT/scandir/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmpdgntdppip-wheel- --python-tag cp27:
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
copying scandir.py -> build/lib.linux-x86_64-2.7
running build_ext
building '_scandir' extension
creating build/temp.linux-x86_64-2.7
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python2.7 -c _scandir.c -o build/temp.linux-x86_64-2.7/_scandir.o
_scandir.c:14:20: fatal error: Python.h: No such file or directory
#include <Python.h>
^
compilation terminated.
error: command 'gcc' failed with exit status 1
----------------------------------------
Failed building wheel for scandir
Running setup.py clean for scandir
Failed to build scandir
Installing collected packages: scandir
Running setup.py install for scandir ... error
Complete output from command /usr/bin/python2 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-VI4qqT/scandir/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-W_j9CZ-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
copying scandir.py -> build/lib.linux-x86_64-2.7
running build_ext
building '_scandir' extension
creating build/temp.linux-x86_64-2.7
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python2.7 -c _scandir.c -o build/temp.linux-x86_64-2.7/_scandir.o
_scandir.c:14:20: fatal error: Python.h: No such file or directory
#include <Python.h>
^
compilation terminated.
error: command 'gcc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python2 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-VI4qqT/scandir/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-W_j9CZ-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-VI4qqT/scandir/
md5-411faa47d16581696ff1f461eadf5851
~$ sudo updatedb
sudo: updatedb: command not found
md5-411faa47d16581696ff1f461eadf5851
~$ locate Python.h
-bash: locate: command not found
ç§ã®Fedoraã·ã¹ãã ã§ã¯ãããã±ãŒãžã¯python2-devel
ãšåŒã°ããããã«ãªããŸããã RHELãè©Šãããšã¯ã§ããŸãããã Python.h
ãå«ãããã±ãŒãžãã©ããã«ãããšç¢ºä¿¡ããŠããŸãã ããªãã¯ãããäœã§ããããç解ãããããã€ã³ã¹ããŒã«ããå¿
èŠããããŸãã
@takluyverçããŠãããŠããããšãã
ãã®æ©æ¢°ã¯ãã蟌ãŸããŠããã ãã§ããããã«æãå¿
èŠããããšæããŸãã
ããããäŒæ¥ã®ãã¡ã€ã¢ãŠã©ãŒã«ãšãããã·ãåå ã§ãpipãšyumã¯ã»ãšãã©èªèããŠããªãããã§ãã
$ pip install python2-devel
Collecting python2-devel
Could not find a version that satisfies the requirement python2-devel (from versions: )
No matching distribution found for python2-devel
@takluyverã¯æ£ããã§ãã yumã«ã¯ã»ãŒç¢ºå®ã«éçºããã±ãŒãžããããŸãã
è©Šãã¹ãããšããã£ãšãããŸãã ããã±ãŒãžãæ€çŽ¢ããŸãã
sudo yum search python | grep -i devel
ä»ã®äººã¯ã以äžãæåããŠããããšãçºèŠããŸããïŒ
sudo yum install python-devel.x86_64
ä»ã®ãã¹ãŠã倱æããå Žåã¯ãPythonãœãŒã¹ããã€ã³ã¯ã«ãŒãããã«ã§ããŸãã 2.7ã®ææ°ããŒãžã§ã³ã¯
https://www.python.org/ftp/python/2.7.14/Python-2.7.14.tgz
ãããŠãPython.hã¯è§£åããããã¡ã€ã«ã®ãã€ã³ã¯ã«ãŒãããã£ã¬ã¯ããªã«ãããŸãã
ãŸãã @ takluyverã¯ãpipã§ã¯ãªãyumã«ããã±ãŒãžãã€ã³ã¹ããŒã«ããããšãææ¡ããŠãããšæããŸãã
sudo yum install python2-devel
æšæž¬ãç¶ããã®ã§ã¯ãªãã衚瀺ãããå 容ã確èªããããã«RHEL Server7.4ãã€ã³ã¹ããŒã«ããŠããŸãã
yumã«äœãåé¡ãããã¯ãã§ãã
ã«ããŒã®ãããªæåãªãã®ãã€ã³ã¹ããŒã«ããããšããã§ããŸãã
ãã®ãã·ã³ã¯æ£ããæ§æãããŠãããããã¯ãã«ã«ãµããŒãã ããä¿®æ£ã§ãããšæããŸãã
ãšã«ããã¿ããªããããšãã ããªãã¯ãšãŠã圹ã«ç«ã¡ãŸããã
~$ sudo yum install python2-devel
Loaded plugins: product-id, search-disabled-repos, subscription-manager
No package python2-devel available.
Error: Nothing to do
~$ sudo yum install python-devel.x86_64
Loaded plugins: product-id, search-disabled-repos, subscription-manager
No package python-devel.x86_64 available.
Error: Nothing to do
~$ sudo yum search python | grep -i devel
dbus-python-devel.i686 : Libraries and headers for dbus-python
dbus-python-devel.x86_64 : Libraries and headers for dbus-python
gstreamer-python-devel.i686 : Headers for developing programs that will use
gstreamer-python-devel.x86_64 : Headers for developing programs that will use
nautilus-python-devel.x86_64 : Python bindings for Nautilus
nemo-python-devel.x86_64 : Python bindings for Nemo
ovirt-engine-sdk-python.noarch : oVirt Engine Software Development Kit (Python)
python-caja-devel.x86_64 : Python bindings for Caja
python-cherrypy2.noarch : Pythonic, object-oriented web development framework
python-nbxmpp-doc.noarch : Developer documentation for python-nbxmpp
python-pillow-devel.i686 : Development files for python-pillow
python-pillow-devel.x86_64 : Development files for python-pillow
python-pyside-devel.x86_64 : Development files for python-pyside
python-tools.x86_64 : A collection of development tools included with Python
python2-behave.noarch : Tools for the behavior-driven development, Python style
: developed at OSRF
python34-cairo-devel.x86_64 : Libraries and headers for python34-cairo
python34-devel.x86_64 : Libraries and header files needed for Python 3
: development
python34-gobject-devel.x86_64 : Development files for embedding Python 3.4
python34-greenlet-devel.x86_64 : C development headers for python34-greenlet
wxPython-devel.x86_64 : Development files for wxPython add-on modules
xapian-bindings-python.x86_64 : Files needed for developing Python scripts which
TurboGears.noarch : Back-to-front web development in Python
edk2-tools-python.noarch : EFI Development Kit II Tools
gnome-python2-devel.x86_64 : Development files for building add-on libraries
hawkey-devel.i686 : A Library providing simplified C and Python API to libsolv
hawkey-devel.x86_64 : A Library providing simplified C and Python API to libsolv
kobo.noarch : Python modules for tools development
pygtksourceview-devel.x86_64 : Development files for using pygtksourceview in
pyldb-devel.i686 : Development files for the Python bindings for the LDB library
pyldb-devel.x86_64 : Development files for the Python bindings for the LDB
python-igraph-devel.x86_64 : Development files for igraph
python-pycxx-devel.noarch : PyCXX header and source files
python-strainer.noarch : Tools to allow developers to cleanup web serialization
python-zc-buildout.noarch : System for managing development buildouts
python2-clint.noarch : A set of awesome tools for developing commandline
qscintilla-python-devel.noarch : Development files for QScintilla PyQt4 bindings
redhat-support-lib-python.noarch : Red Hat Support Software Development Library
spyder.noarch : Scientific Python Development Environment
ç¹°ãè¿ããŸãããä»ã®ãã¹ãŠã倱æããå Žåã¯ãyumãçç¥ããŠãPythonãœãŒã¹ïŒ https://www.python.org/ftp/python/2.7.14/Python-2.7.14.tgz ïŒããçŽæ¥ã€ã³ã¯ã«ãŒãããã«ããããšãã§ããŸãã 解åãããšã解åãããã¡ã€ã«ã®ãã€ã³ã¯ã«ãŒãããã£ã¬ã¯ããªã«Python.hãèŠã€ãããŸãã æšæºçãªæ¹æ³ã¯ãã€ã³ã¯ã«ãŒãã/usr/include/python2.7/
ã«æ¥ç¶ããããšã®ããã§ãã ãããã£ãŠãããããé
眮ãããã pip install scandir==1.5
ãåè©Šè¡ã§ããŸãã ããã§ãgccãã€ã³ã¯ã«ãŒããèŠã€ããããªãå Žåã¯ãã·ã¹ãã ãã¹ã«/usr/include/python2.7/
ãè¿œå ããããscandirãœãŒã¹ãããŠã³ããŒãããŠãscandirã®ã»ããã¢ãããã¡ã€ã«ã§gccã®åŒã³åºããå€æŽããå¿
èŠããããŸãã
yumãpython34-devel.x86_64
ãæã£ãŠããŠãPython 2.7ãšåçã§ã¯ãªãã®ã¯ãæ¬åœã«å¥åŠãªããšã§ãã
å·®ãè¿«ã£ãåé¡ã解決ããã«ã¯ãCentOSãªããžããªïŒ http://mirror.centos.org/centos/7/os/x86_64/Packages/python-devel-2.7.5- ïŒããPython2.7éçºããã±ãŒãžãçŽæ¥ããŠã³ããŒãããŠã€ã³ã¹ããŒã«ããŸãã scp
ãäžæžãããŠã次ã®ããã«ã€ã³ã¹ããŒã«ã§ããŸãã
sudo rpm -ivh python-devel-2.7.5-58.el7.x86_64.rpm
é·æçã«ã¯ãCentOSãªããžããªãyumã«è¿œå ããŠãé¢å¿ã®ããä»ã®yumããã±ãŒãžãååŸã§ããããã«ããããšããå§ãããŸããhttpsïŒ//techglimpse.com/configure-yum-rhel-centos-repository/ãåç §ããŠãã ããã
æåŸã«ãRHELã®ç°¡çŽ åãããæ§è³ªã«ã€ããŠããªããäœãæå³ããŠããã®ããããããŸãã ç§ã¯æå°éã®ã€ã³ã¹ããŒã«ã§éãã§ããŸãããããŠãããã©ãã»ã©å°ãªããã¯æ³šç®ã«å€ããŸãã wget
ã mlocate
ã python-devel
ããŸãã¯ruby
ãããŸããã ãã ãããããã®ããã±ãŒãžã®_ãã¹ãŠ_ã¯ãPackagesãã£ã¬ã¯ããªã®å
ã®ã€ã³ã¹ããŒã«ã¡ãã£ã¢ã§å©çšã§ããŸãã ITããæäŒãã§ããå Žåã¯ãyumã倱æããå Žåã§ãããã±ãŒãžã調éããããã®ç°¡åã§ä¿¡é Œã§ããå Žæã確ä¿ã§ããããã«ãPackagesãã£ã¬ã¯ããªå
šäœãã€ã³ã¹ããŒã«ã¡ãã£ã¢ãããã·ã³ã«ã³ããŒããããšã_匷ã_ãå§ãããŸãã ãŸãã¯ããããã®ããã±ãŒãžã®ãã¹ãŠã§ã¯ãªãã«ããŠãã»ãšãã©ã®CentOSããŒãžã§ã³ãhttp://mirror.centos.org/centos/7/os/x86_64/PackagesããçŽæ¥ããŠã³ããŒããã rpm
ã³ãã³ãã䜿çšããŠã€ã³ã¹ããŒã«ããããšãã§ããŸãã 確ãã«ã yum
ã¯äŸåé¢ä¿ãåŠçãããããæ©èœãããããšãã§ããã°åªããŠããŸãã ãã ãããã®ããã«ã¯ãäžèšã§åŒçšããã¬ã€ãã䜿çšããŠCentOSãªããžããªãè¿œå ããå¿
èŠããããŸãã
@ jmchambers90ããã¯ãããããŸããïŒ åããïŒ
å°ãªããšã10æéã11æéããã«åãçµãã§ããŠæ¬åœã«ããããšãã
Redhat 7ã§ãåãåé¡ãçºçãããã®åŸã«åäœããŸããïŒ
yum install python-devel.x86_64
@CarreauããããšãããããŸãã!! ããªãã®ãœãªã¥ãŒã·ã§ã³ã¯Droidbotã®ã€ã³ã¹ããŒã«ã«åœ¹ç«ã¡ãŸãã:)
æãåèã«ãªãã³ã¡ã³ã
ããã¯IPythonãšã¯é¢ä¿ãããŸãããåé¡ã¯ã scandirã®ã€ã³ã¹ããŒã«ã«èµ·å ããŸããããã¯ãscandirã¡ã³ãããŒã§ç¢ºèªããå¿ èŠããããŸãã
ã³ã³ãã€ã«äžã«Python.hãæ¬ èœããŠããå Žåã¯ãPythonããããŒãæ¬ èœããŠããå¯èœæ§ããããŸãã c-extensionsãã³ã³ãã€ã«ããå ŽåïŒscandirã«ã€ã³ã¹ããŒã«ããããšã§æé»çã«è¡ããŸãïŒãPythonããããŒïŒ
apt-get install python-dev
ãããããŸãããïŒïŒãã€ã³ã¹ããŒã«ããããšããå§ãããŸãã