{"id":517,"date":"2019-07-29T16:41:49","date_gmt":"2019-07-29T14:41:49","guid":{"rendered":"http:\/\/members.loria.fr\/EColin\/?p=517"},"modified":"2019-11-04T14:40:28","modified_gmt":"2019-11-04T12:40:28","slug":"installer-cython-pour-pycharm-snap","status":"publish","type":"post","link":"https:\/\/members.loria.fr\/EColin\/installer-cython-pour-pycharm-snap\/","title":{"rendered":"Installer cython pour Pycharm (snap)"},"content":{"rendered":"<p># On va d&rsquo;abord r\u00e9cup\u00e9rer le r\u00e9pertoire, y a plus simple, mais zoup, cela ne pousse pas le cerveau loin :). On lance pycharm.<br \/>\nApr\u00e8s le lancement de pycharm :<\/p>\n<p><code><br \/>\nLINE=$(ps -x | grep snap |grep helpers)<br \/>\narr=($LINE)<br \/>\nrep=\/$(echo ${arr[5]} | cut -d \"\/\" -f 2)\/$(echo ${arr[5]} | cut -d \"\/\" -f 3)\/$(echo ${arr[5]} | cut -d \"\/\" -f 4)<\/code><\/p>\n<p># affichage pour v\u00e9rification<\/p>\n<p><code>echo $rep<br \/>\ncd ~<\/code><\/p>\n<p># le r\u00e9pertoire le plus r\u00e9cent de Pycharm (\u00e0 vous de faire le m\u00e9nage)<\/p>\n<p><code>alias ls='ls --color -hl'<br \/>\nPYCHARM=$(ls -td .Py* | head -n1 | cut -d \" \" -f 9)<\/code><\/p>\n<p># L&rsquo;installation de cython<\/p>\n<p><code>HOME=\"$(getent passwd $USER | awk -F ':' '{print $6}')\"<br \/>\ncmd=\"sudo -H \/usr\/bin\/python3 ${rep}\/helpers\/pydev\/setup_cython.py build_ext --build-lib ${HOME}${PYCHARM}\/system\/cythonExtensions --build-temp ${HOME}${PYCHARM}\/system\/cythonExtensions\/build\"<\/code><\/p>\n<p># A partir de 19.3:<\/p>\n<p><code>cmd=\"sudo -H \/usr\/bin\/python3 ${rep}\/plugins\/python-ce\/helpers\/pydev\/setup_cython.py build_ext --build-lib ${HOME}\/${PYCHARM}\/system\/cythonExtensions --build-temp ${HOME}\/${PYCHARM}\/system\/cythonExtensions\/build\"<\/code><\/p>\n<p># L\u00e0 au choix, vous affichez la commande pour v\u00e9rifier:<\/p>\n<p><code>echo $cmd<\/code><\/p>\n<p># ex\u00e9cution par copier coller ou<\/p>\n<p><code>var=$($cmd)<br \/>\necho $var<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p># On va d&rsquo;abord r\u00e9cup\u00e9rer le r\u00e9pertoire, y a plus simple, mais zoup, cela ne pousse pas le cerveau loin :). On lance pycharm.<br \/>\nApr\u00e8s le lancement de pycharm :<\/p>\n<p>\nLINE=$(ps -x | grep snap |grep helpers)<br \/>\narr=($LINE)<br \/>\nrep=\/$(echo ${arr[5]} | cut -d \u00ab\u00a0\/\u00a0\u00bb -f 2)\/$(echo ${arr[5]} | cut -d \u00ab\u00a0\/\u00a0\u00bb -f 3)\/$(echo ${arr[5]} | cut -d \u00ab\u00a0\/\u00a0\u00bb -f 4)<\/p>\n<p># affichage pour v\u00e9rification<\/p>\n<p>echo $rep<br \/>\ncd ~<\/p>\n<p># le r\u00e9pertoire le plus r\u00e9cent de Pycharm (\u00e0 vous de faire le m\u00e9nage)<\/p>\n<p>alias ls=&rsquo;ls &#8211;color -hl&rsquo;<br \/>\nPYCHARM=$(ls -td .Py* | head -n1 | cut -d \u00a0\u00bb \u00a0\u00bb -f 9)<\/p>\n<p># L&rsquo;installation de cython<\/p>\n<p>HOME=\u00a0\u00bb$(getent passwd $USER | awk -F &lsquo;:&rsquo; &lsquo;{print $6}&rsquo;)\u00a0\u00bb<br \/>\ncmd=\u00a0\u00bbsudo -H \/usr\/bin\/python3 ${rep}\/helpers\/pydev\/setup_cython.py build_ext &#8211;build-lib ${HOME}${PYCHARM}\/system\/cythonExtensions &#8211;build-temp ${HOME}${PYCHARM}\/system\/cythonExtensions\/build\u00a0\u00bb<\/p>\n<p># A partir de 19.3:<\/p>\n<p>cmd=\u00a0\u00bbsudo -H \/usr\/bin\/python3 ${rep}\/plugins\/python-ce\/helpers\/pydev\/setup_cython.py build_ext &#8211;build-lib ${HOME}\/${PYCHARM}\/system\/cythonExtensions &#8211;build-temp ${HOME}\/${PYCHARM}\/system\/cythonExtensions\/build\u00a0\u00bb<\/p>\n<p># L\u00e0 au choix,<\/p>\n","protected":false},"author":115,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,8,6],"tags":[],"class_list":["post-517","post","type-post","status-publish","format-standard","hentry","category-personnel","category-petits-outils-du-quotidien","category-professionnel"],"_links":{"self":[{"href":"https:\/\/members.loria.fr\/EColin\/wp-json\/wp\/v2\/posts\/517","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/members.loria.fr\/EColin\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/members.loria.fr\/EColin\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/members.loria.fr\/EColin\/wp-json\/wp\/v2\/users\/115"}],"replies":[{"embeddable":true,"href":"https:\/\/members.loria.fr\/EColin\/wp-json\/wp\/v2\/comments?post=517"}],"version-history":[{"count":16,"href":"https:\/\/members.loria.fr\/EColin\/wp-json\/wp\/v2\/posts\/517\/revisions"}],"predecessor-version":[{"id":538,"href":"https:\/\/members.loria.fr\/EColin\/wp-json\/wp\/v2\/posts\/517\/revisions\/538"}],"wp:attachment":[{"href":"https:\/\/members.loria.fr\/EColin\/wp-json\/wp\/v2\/media?parent=517"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/members.loria.fr\/EColin\/wp-json\/wp\/v2\/categories?post=517"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/members.loria.fr\/EColin\/wp-json\/wp\/v2\/tags?post=517"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}