import without install #123195
-
BodyWhen writing a Python pck, how can you import it in some other location? Putting it on pypi? The code is not yet functional. Guidelines
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hey there @GHuserE Pip doesn't just use repository names, it can also work with local folders. So if you are developing, then you may want to use
Where from setuptools import setup, find_packages
setup(
name="packagename",
version="1.0",
description='Package description',
author='YourGithubName',
license='MIT license',
packages=find_packages(),
) Again, as with your last question, use this in combination with virtual environments. Much easier to manage packages and development of such that way. |
Beta Was this translation helpful? Give feedback.
Hey there @GHuserE
Pip doesn't just use repository names, it can also work with local folders. So if you are developing, then you may want to use
Where
-e
allows you to keep editing it. If you omit it you need to reinstall whenever you make changes. Note that this does not work out of the box, you need to add some setup information. The easy way to do this is by adding asetup.py
file with the code. Here is a basic template:Again, as wi…