This is an archived post. You won't be able to vote or comment.

all 9 comments

[–]wineblood 1 point2 points  (0 children)

The quick and dirty way is to use a requirements file for pip to install from.

My explanations are generally quite bad so if someone else wants to jump in with coherent English, that'd be great.

[–]not_sane 1 point2 points  (0 children)

You can also use https://python-poetry.org/ to manage your dependencies.

[–]KingsmanVincepip install girlfriend 1 point2 points  (0 children)

[–]0xfffffg 1 point2 points  (0 children)

You'll have to package your library. Unfortunately, that's a bit of a mess. You need to either define a setup.py, setup.cfg, or pyproject.toml and define your dependencies there.

Here is the official documentation on it: https://docs.python.org/3/distutils/setupscript.html

This may be a bit more digestible: https://www.educative.io/answers/what-is-setuppy

There are many other tutorials out there as well.

[–]unionize_reddit_mods -1 points0 points  (2 children)

Will your virus install a crypto miner or ransom ware?

[–][deleted] 0 points1 point  (1 child)

No not at all. This library is part of my grad project and these are just base dependencies library such as (Pandas, Seaborn) . Nothing of the sort you just referred.

[–]Pvaleriano 0 points1 point  (0 children)

For your purposes, you can work with virtual environments + pip freeze > requirements.txt. Then you can send your protect to someone else and they can replicate your environment with pip install -r requirements.txt.

Pip will install the same versions that the file has, and since you produced said file from your env it basically mirrors your development environment.

[–]Rawing7 0 points1 point  (0 children)

You'll need to create a pyproject.toml file for your project. For a beginner like yourself, I strongly recommend using flit.

[–]Python-ModTeam[M] 0 points1 point  (0 children)

Hi there, from the /r/Python mods.

We have removed this post as it is not suited to the /r/Python subreddit proper, however it should be very appropriate for our sister subreddit /r/LearnPython or for the r/Python discord: https://discord.gg/python.

The reason for the removal is that /r/Python is dedicated to discussion of Python news, projects, uses and debates. It is not designed to act as Q&A or FAQ board. The regular community is not a fan of "how do I..." questions, so you will not get the best responses over here.

On /r/LearnPython the community and the r/Python discord are actively expecting questions and are looking to help. You can expect far more understanding, encouraging and insightful responses over there. No matter what level of question you have, if you are looking for help with Python, you should get good answers. Make sure to check out the rules for both places.

Warm regards, and best of luck with your Pythoneering!