{"id":1000,"date":"2021-10-11T14:34:09","date_gmt":"2021-10-11T21:34:09","guid":{"rendered":"https:\/\/gantovnik.com\/bio-tips\/?p=1000"},"modified":"2021-10-11T14:34:09","modified_gmt":"2021-10-11T21:34:09","slug":"179-upgrade-all-packages-in-python-using-powershell","status":"publish","type":"post","link":"https:\/\/gantovnik.com\/bio-tips\/2021\/10\/179-upgrade-all-packages-in-python-using-powershell\/","title":{"rendered":"#179 Upgrade all packages in Python using PowerShell"},"content":{"rendered":"<p>#179 Upgrade all packages in Python using PowerShell<\/p>\n<p>Create update_python.bat file<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\r\npowershell -ExecutionPolicy ByPass -noexit &quot;&amp; &quot;&quot;D:\\scripts\\update_python.ps1&quot;&quot;&quot;\r\n<\/pre>\n<p>Create update_python.ps1 file<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\r\npip freeze | %{$_.split('==')&#x5B;0]} | %{pip install --upgrade $_}\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>#179 Upgrade all packages in Python using PowerShell Create update_python.bat file powershell -ExecutionPolicy ByPass -noexit &quot;&amp; &quot;&quot;D:\\scripts\\update_python.ps1&quot;&quot;&quot; Create update_python.ps1 file pip freeze | %{$_.split(&#8216;==&#8217;)&#x5B;0]} | %{pip install &#8211;upgrade $_}<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"nf_dc_page":"","_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","_lmt_disableupdate":"yes","_lmt_disable":"","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[36,2],"tags":[],"class_list":["post-1000","post","type-post","status-publish","format-standard","hentry","category-powershell","category-python"],"modified_by":"gantovnik","jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8bH0k-g8","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":499,"url":"https:\/\/gantovnik.com\/bio-tips\/2020\/05\/how-to-update-all-python-packages-in-windows\/","url_meta":{"origin":1000,"position":0},"title":"#73 How to update all python packages in Windows?","author":"gantovnik","date":"2020-05-03","format":false,"excerpt":"How to update all python packages in Windows? 1) Open a command shell by typing powershell in the Search Box of the Task bar 2) Enter pip freeze | %{$_.split('==')[0]} | %{pip install --upgrade $_}","rel":"","context":"In &quot;python&quot;","block_context":{"text":"python","link":"https:\/\/gantovnik.com\/bio-tips\/category\/python\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2219,"url":"https:\/\/gantovnik.com\/bio-tips\/2024\/06\/431-hypermesh-python-script-to-create-nodes-using-coordinates-from-csv-file\/","url_meta":{"origin":1000,"position":1},"title":"#431 HyperMesh python script to create nodes using coordinates from csv file","author":"gantovnik","date":"2024-06-24","format":false,"excerpt":"Finally, I read how to write a script for HyperMesh in python. In this example, the script reads the coordinates of points from a cvs file. [code language=\"python\"] import os import hm import hm.entities as e from hwx import gui import csv model=hm.Model() os.chdir(r\"D:\\projects\\wordpress\\ex431\") with open('ex431_coordinates.csv', mode ='r') as file:\u2026","rel":"","context":"In &quot;HyperMesh&quot;","block_context":{"text":"HyperMesh","link":"https:\/\/gantovnik.com\/bio-tips\/category\/hypermesh\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/gantovnik.com\/bio-tips\/wp-content\/uploads\/2024\/06\/ex431.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":10707,"url":"https:\/\/gantovnik.com\/bio-tips\/2026\/01\/466-interesting-python-links\/","url_meta":{"origin":1000,"position":2},"title":"#466 Interesting Python Links","author":"gantovnik","date":"2026-01-02","format":false,"excerpt":"GitHub - kirang89\/pycrumbs: Bits and bytes of Python from the Internet GitHub - vinta\/awesome-python: An opinionated list of awesome Python frameworks, libraries, software and resources. GitHub - svaksha\/pythonidae: Curated decibans of scientific programming resources in Python. \u00a0 python\u0417.9 -m venv vg1 . vg1\/bin\/activate which python deactivate which python pip install\u2026","rel":"","context":"In &quot;python&quot;","block_context":{"text":"python","link":"https:\/\/gantovnik.com\/bio-tips\/category\/python\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2857,"url":"https:\/\/gantovnik.com\/bio-tips\/2024\/07\/438-large-language-model-llm-library-transformers-for-natural-language-processing-nlp-in-python\/","url_meta":{"origin":1000,"position":3},"title":"#438 Large language model (LLM) library Transformers for natural language processing (NLP) in python","author":"gantovnik","date":"2024-07-20","format":false,"excerpt":"Transformers One of the most prominent libraries for modern natural language processing (NLP) model frameworks, Transformers comes from the NLP powerhouse Hugging Face. The variety of pre-trained models available in Transformers is vast, with both foundational and fine-tuned models designed for tasks such as text classification, translation, question answering, and\u2026","rel":"","context":"In &quot;machine learning&quot;","block_context":{"text":"machine learning","link":"https:\/\/gantovnik.com\/bio-tips\/category\/machine-learning\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1880,"url":"https:\/\/gantovnik.com\/bio-tips\/2023\/07\/356-animation-of-plot-legend-using-python\/","url_meta":{"origin":1000,"position":4},"title":"#356 Animation of plot legend using python","author":"gantovnik","date":"2023-07-01","format":false,"excerpt":"[code language=\"python\"] # pip install celluloid #%matplotlib qt from matplotlib import pyplot as plt from celluloid import Camera import numpy as np fig = plt.figure() camera = Camera(fig) t = np.linspace(0, 2 * np.pi, 128, endpoint=False) for i in range(0,41) : p=plt.plot(t, i*np.sin(t)) plt.legend(p, [f'line {i}']) camera.snap() animation = camera.animate()\u2026","rel":"","context":"In &quot;animation&quot;","block_context":{"text":"animation","link":"https:\/\/gantovnik.com\/bio-tips\/category\/animation\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/gantovnik.com\/bio-tips\/wp-content\/uploads\/2023\/07\/ex356.gif?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/gantovnik.com\/bio-tips\/wp-content\/uploads\/2023\/07\/ex356.gif?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/gantovnik.com\/bio-tips\/wp-content\/uploads\/2023\/07\/ex356.gif?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":1863,"url":"https:\/\/gantovnik.com\/bio-tips\/2023\/06\/350-optimization-with-gekko-in-python\/","url_meta":{"origin":1000,"position":5},"title":"#350 Optimization with GEKKO in Python","author":"gantovnik","date":"2023-06-27","format":false,"excerpt":"$latex max \\; 2x + 5y$ $latex s.t.$ $latex 5x + 3y \\le 10$ $latex 2x + 7y \\le 9$ [code language=\"python\"] # Modeling language for large-scale linear, quadratic, nonlinear, # and mixed-integer programming. # Supported solvers: APOPT, BPOPT, IPOPT, SNOPT, and MINOS #pip install gekko in conda window from\u2026","rel":"","context":"In &quot;optimization&quot;","block_context":{"text":"optimization","link":"https:\/\/gantovnik.com\/bio-tips\/category\/optimization\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/posts\/1000","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/comments?post=1000"}],"version-history":[{"count":0,"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/posts\/1000\/revisions"}],"wp:attachment":[{"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/media?parent=1000"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/categories?post=1000"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/tags?post=1000"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}