question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Copy an installed package to a specified directory

See original GitHub issue

A typical python development workflow involves creating a virtualenv, and then using pip to install dependencies @ the site-packages of the virutalenv.

This proposal should allow users to move any installed package (from virtualenv) to a folder of their choice.

What’s the problem this feature will solve?

Allow users to package their dependencies in a zipfile, or some other format while ensuring that dependencies are the exact ones they were using in development.

This would also ensure that minor modifications made to the dependencies, using the code editor (presumably, using goto definition), are preserved in production. (without the need to create a separate private repository, or submit a pull request to the original author – both of which are quite tedious tasks.)

Alternative Solutions

The current standard way is to use --target for storing dependencies in a folder, and then packaging them into a zipfile for distribution.

While sufficient for most trivial tasks, I personally experienced some problems with this approach, that I think this proposal can solve.

  1. The dependencies may not be the exact ones that were being used in development.
  2. --target doesn’t behave well with --editable
  3. It re-installs dependencies, which consumes unnecessary resources, for files that in theory, already exist on the user’s machine.

I don’t have much to say about the implementation details for this proposal, but it seems doable to me. If this requires too much work or is technically impossible, I’m sorry for wasting your time.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
devxpycommented, Jul 21, 2019

Moved to discuss.python.org#2012. Thanks for the counsel.

0reactions
pradyunsgcommented, Jul 20, 2019

If you want to check for potentially interested folks, they’ll likely be on https://discuss.python.org/c/packaging.

But really you (or someone else) will have to champion this if you want to see this happen. Which means doing the grunt work of figuring out what to do and how to do it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can I transfer installation directory of a particular package to ...
Can I directly copy the installed directory from one computer to another computer? I mean cloning the installation directory. package-management ...
Read more >
Copying installation files to the appropriate servers - IBM
Copy the IBM® Enterprise Records installation package files to the local directory on the specified server. Ensure that the files are not moved...
Read more >
How to Install Package to a Specific Directory Using Yum
This article provides a detailed guide on how to install packages to specific directory using Yum and DNF package manager.
Read more >
"pip install wheelpackagename" copying few files to specified ...
When I do "pip install wheel-package-name" I want few of files inside package go to specified folder location and few other files to...
Read more >
How do I transfer installed packages and settings from one ...
For your own settings, it's simpler: just copy the dot files from your home directory. As a rule, configure things that aren't related...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found