<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Techy Things &#187; python</title>
	<atom:link href="https://tech.yipp.ca/category/python/feed/" rel="self" type="application/rss+xml" />
	<link>https://tech.yipp.ca</link>
	<description>Just another Yipp.ca Blogs site</description>
	<lastBuildDate>Thu, 01 May 2025 18:06:28 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.2.38</generator>
	<item>
		<title>ValueError: invalid mode: &#039;rU&#039; while trying to load binding.gyp</title>
		<link>https://tech.yipp.ca/python/valueerror-invalid-mode-ru-while-trying-to-load-binding-gyp/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=valueerror-invalid-mode-ru-while-trying-to-load-binding-gyp</link>
		<comments>https://tech.yipp.ca/python/valueerror-invalid-mode-ru-while-trying-to-load-binding-gyp/#comments</comments>
		<pubDate>Fri, 29 Mar 2024 02:49:30 +0000</pubDate>
		<dc:creator><![CDATA[frank]]></dc:creator>
				<category><![CDATA[node.js]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://tech.yipp.ca/?p=4417</guid>
		<description><![CDATA[<p>Traceback (most recent call last): File "C:\dev\react-scss-jest-typescript\node_modules\node-gyp\gyp\gyp_main.py", line 51, in &#60;module&#62; sys.exit(gyp.script_main()) ^^^^^^^^^^^^^^^^^ File "C:\dev\react-scss-jest-typescript\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 670, in script_main return main(sys.argv[1:]) ^^^^^^^^^^^^^^^^^^ File "C:\dev\react-scss-jest-typescript\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 662, in main return gyp_main(args) ^^^^^^^^^^^^^^ File "C:\dev\react-scss-jest-typescript\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line&#46;&#46;&#46;</p>
<p>The post <a rel="nofollow" href="https://tech.yipp.ca/python/valueerror-invalid-mode-ru-while-trying-to-load-binding-gyp/">ValueError: invalid mode: 'rU' while trying to load binding.gyp</a> appeared first on <a rel="nofollow" href="https://tech.yipp.ca">Techy Things</a>.</p>
]]></description>
				<content:encoded><![CDATA[<pre>Traceback (most recent call last):
 File "C:\dev\react-scss-jest-typescript\node_modules\node-gyp\gyp\gyp_main.py", line 51, in &lt;module&gt;
 sys.exit(gyp.script_main())
 ^^^^^^^^^^^^^^^^^
 File "C:\dev\react-scss-jest-typescript\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 670, in script_main
 return main(sys.argv[1:])
 ^^^^^^^^^^^^^^^^^^
 File "C:\dev\react-scss-jest-typescript\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 662, in main
 return gyp_main(args)
 ^^^^^^^^^^^^^^
 File "C:\dev\react-scss-jest-typescript\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 629, in gyp_main
 [generator, flat_list, targets, data] = Load(
 ^^^^^
 File "C:\dev\react-scss-jest-typescript\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 150, in Load
 result = gyp.input.Load(
 ^^^^^^^^^^^^^^^
 File "C:\dev\react-scss-jest-typescript\node_modules\node-gyp\gyp\pylib\gyp\input.py", line 3021, in Load
 LoadTargetBuildFile(
 File "C:\dev\react-scss-jest-typescript\node_modules\node-gyp\gyp\pylib\gyp\input.py", line 411, in LoadTargetBuildFile
 build_file_data = LoadOneBuildFile(
 ^^^^^^^^^^^^^^^^^
 File "C:\dev\react-scss-jest-typescript\node_modules\node-gyp\gyp\pylib\gyp\input.py", line 239, in LoadOneBuildFile
 build_file_contents = open(build_file_path, "rU").read()
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: invalid mode: 'rU' while trying to load binding.gyp
</pre>
<h3>Solution</h3>
<p>Uninstall Python 3.12.X and install an older version like<a href="https://www.python.org/downloads/release/python-31011/" target="_blank"> 3.10.X</a></p>
<p>The U file mode was removed in Python 3.11 because it had no effect so the U can merely be removed.</p>
<p><strong>Python 3.10.11 was tested as working.</strong></p>
<p>The post <a rel="nofollow" href="https://tech.yipp.ca/python/valueerror-invalid-mode-ru-while-trying-to-load-binding-gyp/">ValueError: invalid mode: 'rU' while trying to load binding.gyp</a> appeared first on <a rel="nofollow" href="https://tech.yipp.ca">Techy Things</a>.</p>
]]></content:encoded>
			<wfw:commentRss>https://tech.yipp.ca/python/valueerror-invalid-mode-ru-while-trying-to-load-binding-gyp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Could not import runpy module Traceback (most recent call last) &quot;Python-3.9.5/Lib/typing.py&quot;, line 21, in  import collections SystemError:  returned NULL without setting an error generate-posix-vars failed</title>
		<link>https://tech.yipp.ca/python/import-runpy-module-traceback-recent-call-last-python-3-9-5libtyping-py-line-21-import-collections-systemerror-returned-null-without-setting-error-generate-posix-vars-f/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=import-runpy-module-traceback-recent-call-last-python-3-9-5libtyping-py-line-21-import-collections-systemerror-returned-null-without-setting-error-generate-posix-vars-f</link>
		<comments>https://tech.yipp.ca/python/import-runpy-module-traceback-recent-call-last-python-3-9-5libtyping-py-line-21-import-collections-systemerror-returned-null-without-setting-error-generate-posix-vars-f/#comments</comments>
		<pubDate>Thu, 06 May 2021 21:19:32 +0000</pubDate>
		<dc:creator><![CDATA[frank]]></dc:creator>
				<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://tech.yipp.ca/?p=3979</guid>
		<description><![CDATA[<p>Could not import runpy module Traceback (most recent call last): File "Python-3.9.5/Lib/runpy.py", line 15, in &#60;module&#62; import importlib.util File "Python-3.9.5/Lib/importlib/util.py", line 2, in &#60;module&#62; from . import abc File "Python-3.9.5/Lib/importlib/abc.py", line 17, in &#60;module&#62;&#46;&#46;&#46;</p>
<p>The post <a rel="nofollow" href="https://tech.yipp.ca/python/import-runpy-module-traceback-recent-call-last-python-3-9-5libtyping-py-line-21-import-collections-systemerror-returned-null-without-setting-error-generate-posix-vars-f/">Could not import runpy module Traceback (most recent call last) "Python-3.9.5/Lib/typing.py", line 21, in <module> import collections SystemError: <built-in function compile> returned NULL without setting an error generate-posix-vars failed</a> appeared first on <a rel="nofollow" href="https://tech.yipp.ca">Techy Things</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>Could not import runpy module Traceback (most recent call last): File "Python-3.9.5/Lib/runpy.py", line 15, in &lt;module&gt; import importlib.util File "Python-3.9.5/Lib/importlib/util.py", line 2, in &lt;module&gt; from . import abc File "Python-3.9.5/Lib/importlib/abc.py", line 17, in &lt;module&gt; from typing import Protocol, runtime_checkable File "Python-3.9.5/Lib/typing.py", line 21, in &lt;module&gt; import collections SystemError: &lt;built-in function compile&gt; returned NULL without setting an error generate-posix-vars failed</p>
<h3>Workaround</h3>
<p>Compile without  --enable-optimizations in the configure step</p>
<h3>Solution</h3>
<p>Update to gcc 8.1.0</p>
<p>&nbsp;</p>
<p>The post <a rel="nofollow" href="https://tech.yipp.ca/python/import-runpy-module-traceback-recent-call-last-python-3-9-5libtyping-py-line-21-import-collections-systemerror-returned-null-without-setting-error-generate-posix-vars-f/">Could not import runpy module Traceback (most recent call last) "Python-3.9.5/Lib/typing.py", line 21, in <module> import collections SystemError: <built-in function compile> returned NULL without setting an error generate-posix-vars failed</a> appeared first on <a rel="nofollow" href="https://tech.yipp.ca">Techy Things</a>.</p>
]]></content:encoded>
			<wfw:commentRss>https://tech.yipp.ca/python/import-runpy-module-traceback-recent-call-last-python-3-9-5libtyping-py-line-21-import-collections-systemerror-returned-null-without-setting-error-generate-posix-vars-f/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>libfontconfig.so.1: cannot open shared object file: No such file or directory</title>
		<link>https://tech.yipp.ca/python/libfontconfig-1-open-shared-object-file-file-directory/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=libfontconfig-1-open-shared-object-file-file-directory</link>
		<comments>https://tech.yipp.ca/python/libfontconfig-1-open-shared-object-file-file-directory/#comments</comments>
		<pubDate>Fri, 11 Mar 2016 14:27:07 +0000</pubDate>
		<dc:creator><![CDATA[frank]]></dc:creator>
				<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://tech.yipp.ca/?p=2288</guid>
		<description><![CDATA[<p>/usr/lib/node_modules/phantomjs/lib/phantom/bin/phantomjs: error while loading shared libraries: libfontconfig.so.1: cannot open shared object file: No such file or directory Solution sudo apt-get install libfontconfig1</p>
<p>The post <a rel="nofollow" href="https://tech.yipp.ca/python/libfontconfig-1-open-shared-object-file-file-directory/">libfontconfig.so.1: cannot open shared object file: No such file or directory</a> appeared first on <a rel="nofollow" href="https://tech.yipp.ca">Techy Things</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>/usr/lib/node_modules/phantomjs/lib/phantom/bin/phantomjs: error while loading shared libraries: libfontconfig.so.1: cannot open shared object file: No such file or directory</p>
<h2>Solution</h2>
<pre><code>sudo apt-get install libfontconfig1</code></pre>
<p>The post <a rel="nofollow" href="https://tech.yipp.ca/python/libfontconfig-1-open-shared-object-file-file-directory/">libfontconfig.so.1: cannot open shared object file: No such file or directory</a> appeared first on <a rel="nofollow" href="https://tech.yipp.ca">Techy Things</a>.</p>
]]></content:encoded>
			<wfw:commentRss>https://tech.yipp.ca/python/libfontconfig-1-open-shared-object-file-file-directory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>fatal error: libxml/xpath.h: No such file or directory</title>
		<link>https://tech.yipp.ca/python/tmpxmlxpathinit1dz_m6-c126-fatal-error-libxmlxpath-h-file-directory/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=tmpxmlxpathinit1dz_m6-c126-fatal-error-libxmlxpath-h-file-directory</link>
		<comments>https://tech.yipp.ca/python/tmpxmlxpathinit1dz_m6-c126-fatal-error-libxmlxpath-h-file-directory/#comments</comments>
		<pubDate>Thu, 10 Mar 2016 18:51:14 +0000</pubDate>
		<dc:creator><![CDATA[frank]]></dc:creator>
				<category><![CDATA[debian]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://tech.yipp.ca/?p=2284</guid>
		<description><![CDATA[<p>Running setup.py install for lxml ... error Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file /setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', ' all --record /tmp/pip-PDRsRl-record/install-record.txt --single-version-externally-managed Building lxml version 3.5.0. Building without Cython. ERROR: /bin/sh:&#46;&#46;&#46;</p>
<p>The post <a rel="nofollow" href="https://tech.yipp.ca/python/tmpxmlxpathinit1dz_m6-c126-fatal-error-libxmlxpath-h-file-directory/">fatal error: libxml/xpath.h: No such file or directory</a> appeared first on <a rel="nofollow" href="https://tech.yipp.ca">Techy Things</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>Running setup.py install for lxml ... error<br />
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file<br />
/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '<br />
all --record /tmp/pip-PDRsRl-record/install-record.txt --single-version-externally-managed<br />
Building lxml version 3.5.0.<br />
Building without Cython.<br />
ERROR: /bin/sh: 1: xslt-config: not found</p>
<p>** make sure the development packages of libxml2 and libxslt are installed **</p>
<p>(...)</p>
<p>/tmp/xmlXPathInit1Dz_M6.c:1:26: <strong>fatal error: libxml/xpath.h: No such file or directory</strong></p>
<h2>Solution</h2>
<p>$&gt; sudo apt-get install libxml2-dev libxslt-dev</p>
<p>The post <a rel="nofollow" href="https://tech.yipp.ca/python/tmpxmlxpathinit1dz_m6-c126-fatal-error-libxmlxpath-h-file-directory/">fatal error: libxml/xpath.h: No such file or directory</a> appeared first on <a rel="nofollow" href="https://tech.yipp.ca">Techy Things</a>.</p>
]]></content:encoded>
			<wfw:commentRss>https://tech.yipp.ca/python/tmpxmlxpathinit1dz_m6-c126-fatal-error-libxmlxpath-h-file-directory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>fatal error: Python.h: No such file or directory</title>
		<link>https://tech.yipp.ca/python/fatal-error-python-h-file-directory/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=fatal-error-python-h-file-directory</link>
		<comments>https://tech.yipp.ca/python/fatal-error-python-h-file-directory/#comments</comments>
		<pubDate>Wed, 09 Mar 2016 23:05:47 +0000</pubDate>
		<dc:creator><![CDATA[frank]]></dc:creator>
				<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://tech.yipp.ca/?p=2272</guid>
		<description><![CDATA[<p>gcc -pthread -fno-strict-aliasing -fwrapv -Wall -Wstrict-prototypes -fPIC -std=c99 -O3 -fomit-frame-pointer -Isrc/ - r/include/python2.7 -c src/MD2.c -o build/temp.linux-x86_64-2.7/src/MD2.o src/MD2.c:31:20: fatal error: Python.h: No such file or directory compilation terminated. error: command 'gcc' failed with exit&#46;&#46;&#46;</p>
<p>The post <a rel="nofollow" href="https://tech.yipp.ca/python/fatal-error-python-h-file-directory/">fatal error: Python.h: No such file or directory</a> appeared first on <a rel="nofollow" href="https://tech.yipp.ca">Techy Things</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>gcc -pthread -fno-strict-aliasing -fwrapv -Wall -Wstrict-prototypes -fPIC -std=c99 -O3 -fomit-frame-pointer -Isrc/ -<br />
r/include/python2.7 -c src/MD2.c -o build/temp.linux-x86_64-2.7/src/MD2.o<br />
src/MD2.c:31:20: <strong>fatal error: Python.h: No such file or directory</strong><br />
compilation terminated.<br />
error: command 'gcc' failed with exit status 1</p>
<h2>Solution</h2>
<pre class="default prettyprint prettyprinted"><code><span class="pln">Debian:
sudo apt</span><span class="pun">-</span><span class="kwd">get</span><span class="pln"> install python</span><span class="pun">-</span><span class="pln">dev</span></code>

CentOS:
yum install python-devel

</pre>
<p>The post <a rel="nofollow" href="https://tech.yipp.ca/python/fatal-error-python-h-file-directory/">fatal error: Python.h: No such file or directory</a> appeared first on <a rel="nofollow" href="https://tech.yipp.ca">Techy Things</a>.</p>
]]></content:encoded>
			<wfw:commentRss>https://tech.yipp.ca/python/fatal-error-python-h-file-directory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Solved Python error : from django.core.management import execute_manager</title>
		<link>https://tech.yipp.ca/python/browsershots-shotserver-error-import-execute_manager/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=browsershots-shotserver-error-import-execute_manager</link>
		<comments>https://tech.yipp.ca/python/browsershots-shotserver-error-import-execute_manager/#comments</comments>
		<pubDate>Sat, 06 Sep 2014 20:59:17 +0000</pubDate>
		<dc:creator><![CDATA[frank]]></dc:creator>
				<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://tech.yipp.ca/?p=975</guid>
		<description><![CDATA[<p>Problem C:\dev\browsershots-psycopg2.git\shotserver\shotserver04&#62;python manage.py syncdb Traceback (most recent call last): File "manage.py", line 26, in &#60;module&#62; from django.core.management import execute_manager ImportError: cannot import name execute_manager Explanations execute_manager was deprecated in Django 1.4 as part of the&#46;&#46;&#46;</p>
<p>The post <a rel="nofollow" href="https://tech.yipp.ca/python/browsershots-shotserver-error-import-execute_manager/">Solved Python error : from django.core.management import execute_manager</a> appeared first on <a rel="nofollow" href="https://tech.yipp.ca">Techy Things</a>.</p>
]]></description>
				<content:encoded><![CDATA[<h2>Problem</h2>
<p>C:\dev\browsershots-psycopg2.git\shotserver\shotserver04&gt;python manage.py syncdb Traceback (most recent call last): File "manage.py", line 26, in &lt;module&gt; from django.core.management import execute_manager ImportError: cannot import name execute_manager</p>
<h2>Explanations</h2>
<p><code>execute_manager</code> was deprecated in Django 1.4 as part of the project layout refactor and was removed in 1.6 per the deprecation timeline: <a href="https://docs.djangoproject.com/en/1.4/internals/deprecation/#id3">https://docs.djangoproject.com/en/1.4/internals/deprecation/#id3</a></p>
<p>&nbsp;</p>
<h2>Solution</h2>
<pre>Use the following layout

if __name__ == "__main__":
    os.environ.setdefault("DJANGO_SETTINGS_MODULE", "{{ project_name }}.settings")

    from django.core.management import execute_from_command_line

    execute_from_command_line(sys.argv)</pre>
<p>Note: After you do your fix, you might need to re-install the module with $> sudo python setup.py install</p>
<p>The post <a rel="nofollow" href="https://tech.yipp.ca/python/browsershots-shotserver-error-import-execute_manager/">Solved Python error : from django.core.management import execute_manager</a> appeared first on <a rel="nofollow" href="https://tech.yipp.ca">Techy Things</a>.</p>
]]></content:encoded>
			<wfw:commentRss>https://tech.yipp.ca/python/browsershots-shotserver-error-import-execute_manager/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
