Skip to content

import without install #123195

May 9, 2024 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

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

pip3 install -e path/to/project

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 a setup.py file with the code. Here is a basic template:

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 wi…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@GHuserE
Comment options

Answer selected by GHuserE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Programming Help Programming languages, open source, and software development.
2 participants