擅长:python、mysql、java
<p>或者用这样的东西</p>
<pre><code>import pip
# you can make this install from a local path if needed, and upload the binaries
def install(package):
if hasattr(pip, 'main'):
pip.main(['install', package])
else:
pip._internal.main(['install', package])
if __name__ == '__main__':
try:
import mymodule
except:
install('mymodule')
</code></pre>
<p><a href="https://stackoverflow.com/questions/12332975/installing-python-module-within-code">Installing python module within code</a></p>