pip - Sharing a python script with module requirements? -
pip - Sharing a python script with module requirements? -
i'm new python , curious if python had npm install
pip install required packages script have. i've looked setup.py
readme , looks geared creating tarball send pip, isn't want.
i'd able check out source code , run it. stands when inquire coworkers utilize script run import failures , have manually pip install things poor experience.
my setup.py file is
#!/usr/bin/env python distutils.core import setup setup(name='add-webhook', version='1.0', description='adds webhooks git repos', author='devshorts', packages=['requests'], )
and when run it
$ python setup.py install running install running build running build_py error: bundle directory 'requests' not exist
i have little script sits next setup.py uses requests
bundle , i'd installed on 'install'
$ ls total 40 -rw-r--r-- 1 akropp jomax\domain users 1039 feb 24 09:51 readme.md -rwxr-xr-x 1 akropp jomax\domain users 4489 feb 27 17:01 add-webhook.py -rw-r--r-- 1 akropp jomax\domain users 391 feb 23 14:24 github.iml -rw-r--r-- 1 akropp jomax\domain users 213 apr 8 15:06 setup.py
create requirements.txt
file in project's root directory, , add together necessary python packages versions need.
then run $pip install -r requirements.txt
install have specified in requirements.txt
file.
not sure if need, improve running $pip install <package name>
several times.
python pip
Comments
Post a Comment