2

The question is really simple: I have a python package installed using pip3 and I'd like to tweak it a little to perform some computations. I've read (and it seems logical) that is very discouraged to not to edit the installed modules. Thus, how can I do this once I downloaded the whole project folder to my computer? Is there any way to, once edited this source code install it with another name? How can I avoid mixing things up? Thanks!

1
  • I agree it's discouraged. That being said, this question will show you where to find the package. You can make your edits there, save the file and make sure to delete any corresponding (or all) *.pyc files in that directory (they're cached module bytecode and if they exist will be used instead of the source you just edited). Commented Aug 15, 2019 at 3:31

1 Answer 1

2

You can install the package from its source code, instead of PyPi.

  1. Download the source code - do a git clone <package-git-url> of the package
  2. Instead of pip install <package>, install with pip install -e <package-directory-path>
  3. Change code in the source code, and it will be picked up automatically.
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.