apt-clone | Create a "state" file for Debian/Ubuntu systems with the installed packages (and the aility to rest
kandi X-RAY | apt-clone Summary
kandi X-RAY | apt-clone Summary
Create a "state" file for Debian/Ubuntu systems with the installed packages (and the aility to restore)
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Show the diff between the given statefile
- Extract information from a given statefile
- Compute the diff between the given system and target directory
- Try to guess distro from statefile
- Get host information
- Detect Tarp prefix
- Return info about the given statefile
apt-clone Key Features
apt-clone Examples and Code Snippets
Community Discussions
Trending Discussions on apt-clone
QUESTION
I am using docker tutorial (https://docs.docker.com/language/python/build-images/) to build a simple python app. Using freeze
command I made requirements.txt
file which consists a lot of packages.
When I want to build the docker image, I am getting this error:
Step 4/6 : RUN pip3 install -r requirements.txt ---> Running in f92acd21d271
ERROR: Could not find a version that satisfies the requirement apt-clone==0.2.1 (from versions: none)
ERROR: No matching distribution found for apt-clone==0.2.1
The command '/bin/sh -c pip3 install -r requirements.txt' returned a non-zero code: 1
This is my dockerfile contents (same as what is mentioned in the tutorial):
...ANSWER
Answered 2021-Jun-02 at 07:25There is no package named apt-clone
in the public PyPI repository, so pip3
obviously cannot find it.
If you actually have a Python package named like this, where did it come from?
If you created a package with this name locally, you need to install it too in your Docker image somehow.
If you are inside an organization, maybe you have a local PyPI with different packages than the public one, and then you need to configure
pip3
to use it (trypip3 -i http://your.local.pypi/simple -r requirements.txt
where obviously the URL needs to be something else, but we can't guess what).
If pip3 freeze
says you have this package, it must have come from somewhere, but we don't know where. You have to figure that out, or supply more details to help us help you.
There is a Debian package named apt-clone
but that obviously isn't something pip
can install. Did you actually mean apt-get install -y apt-clone==0.2.1
? (I can only find version 0.4.1 in Debian Buster, though.)
... @atline's answer explains what happened (you should probably accept that) but the simple fix is to manually populate requirements.txt
with your actual requirements. pip3 freeze
is a nice shorthand for that if you are in a virtual environment, but it's not a proper replacement for a manually curated requirements.txt
or setup.py
(or its modern replacements, currently moving from setup.cfg
to pyproject.toml
). If flask
is the only package your app needs, simply put pip3 install flask
and don't create a requirements.txt
.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install apt-clone
You can use apt-clone like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page