Unable to build container locally.
FreshImmuc opened this issue · comments
Hey, I already tried building the container locally several times. I also already tried installing the dependencies from "#1093"
But i still get this error everytime i try to execute make container
:
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
find . -name '*~' -exec rm -f {} +
rm -f .coverage
rm -rf htmlcov
rm -rf dist
rm -rf build
rm -rf proxy.py.egg-info
rm -rf .pytest_cache
rm -rf .hypothesis
# Doc RST files are cached and can cause issues
# See https://github.com/abhinavsingh/proxy.py/issues/642#issuecomment-1003444578
rm -f docs/pkg/*.rst
python check.py
Traceback (most recent call last):
File "/home/proxy.py/proxy/common/_version.py", line 18, in <module>
from ._scm_version import version as __version__ # noqa: WPS433, WPS436
ModuleNotFoundError: No module named 'proxy.common._scm_version'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "check.py", line 15, in <module>
from proxy.common.version import __version__ as lib_version
File "/home/proxy.py/proxy/__init__.py", line 11, in <module>
from .proxy import Proxy, main, sleep_loop, entry_point
File "/home/proxy.py/proxy/proxy.py", line 20, in <module>
from .core.ssh import SshTunnelListener, SshHttpProtocolHandler
File "/home/proxy.py/proxy/core/ssh/__init__.py", line 16, in <module>
from .listener import SshTunnelListener
File "/home/proxy.py/proxy/core/ssh/listener.py", line 26, in <module>
from ...common.flag import flags
File "/home/proxy.py/proxy/common/flag.py", line 23, in <module>
from .utils import bytes_, is_py2, is_threadless, set_open_file_limit
File "/home/proxy.py/proxy/common/utils.py", line 27, in <module>
from .constants import (
File "/home/proxy.py/proxy/common/constants.py", line 21, in <module>
from .version import __version__
File "/home/proxy.py/proxy/common/version.py", line 11, in <module>
from ._version import VERSION, __version__ # noqa: WPS436
File "/home/proxy.py/proxy/common/_version.py", line 22, in <module>
__version__ = _get_dist('proxy.py').version # noqa: WPS440
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 482, in get_distribution
dist = get_provider(dist)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 358, in get_provider
return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 901, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 787, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'proxy.py' distribution was not found and is required by the application
make: *** [Makefile:84: lib-check] Error 1```
Did you try pip install -e .
which will automatically generate proxy.common._scm_version
file for you.
I tried, it gives me this Error:
root@XXXXXXX:/home/proxy.py# pip install -e .
ERROR: File "setup.py" not found. Directory cannot be installed in editable mode: /home/proxy.py
(A "pyproject.toml" file was found, but editable mode currently requires a setup.py based build.)
pip install -U pip
should solve this. Also make sure /home/proxy.py
contains repo clone.
Okay hm so i did this:
root@XXXX:/home/proxy.py# pip install -e .
ERROR: File "setup.py" not found. Directory cannot be installed in editable mode: /home/proxy.py
(A "pyproject.toml" file was found, but editable mode currently requires a setup.py based build.)
root@XXXX:/home/proxy.py# ls
benchmark codecov.yml dashboard docs git-pre-push Makefile ProxyPy.png README.md requirements-tunnel.txt shortlink.gif tox.ini
CHANGELOG.md CODE_OF_CONDUCT.md Dashboard.png examples helper MANIFEST.in pyproject.toml requirements-release.txt SECURITY.md skeleton tutorial
check.py CONTRIBUTING.md Dockerfile git-pre-commit LICENSE proxy pytest.ini requirements-testing.txt setup.cfg tests write-scm-version.sh
root@XXXX:/home/proxy.py# pip install -e .
ERROR: File "setup.py" not found. Directory cannot be installed in editable mode: /home/proxy.py
(A "pyproject.toml" file was found, but editable mode currently requires a setup.py based build.)
root@XXXX:/home/proxy.py# pip install -U pip
Collecting pip
Using cached pip-22.3.1-py3-none-any.whl (2.1 MB)
Installing collected packages: pip
Attempting uninstall: pip
Found existing installation: pip 20.0.2
Not uninstalling pip at /usr/lib/python3/dist-packages, outside environment /usr
Can't uninstall 'pip'. No files were found to uninstall.
Successfully installed pip-22.3.1
root@XXXX:/home/proxy.py# pip install -e .
ERROR: File "setup.py" not found. Directory cannot be installed in editable mode: /home/proxy.py
(A "pyproject.toml" file was found, but editable mode currently requires a setup.py based build.)
And it still gives me the same Error
Alright by simply putting sudo infront of the command fixed it...
Sorry but thanks anyways! :)