cloudformation-cli icon indicating copy to clipboard operation
cloudformation-cli copied to clipboard

Error setting up venv as per documentation

Open danieljarrett74 opened this issue 4 years ago • 2 comments

I'm following the instructions in the readme file to set up a virtual environment. As below and I am getting errors.

python3 -m venv env
source env/bin/activate
pip install -e . -r requirements.txt
pre-commit install

The following error occurs when I try to install the requirements.txt by running the following inside my project directory

python3 -m venv env
source env/bin/activate
pip install -e . -r requirements.txt
ERROR: File "setup.py" or "setup.cfg" not found. Directory cannot be installed in editable mode: /Users/daniel/Documents/Git/cfn-provider

danieljarrett74 avatar Sep 20 '21 11:09 danieljarrett74

the requirements file is in the root directory of the cli repo. are you sure you are installing from the correct path?

ammokhov avatar Sep 20 '21 20:09 ammokhov

Yes I am running those commands from the same directory where the requirements.txt lives.

If I change it to the following it will install the module. pip install -r requirements.txt

danieljarrett74 avatar Sep 20 '21 21:09 danieljarrett74

the "-e ." for pip is instructing pip to install in editable mode

  -e, --editable <path/url>   Install a project in editable mode (i.e. setuptools "develop mode") from a local project path or a VCS url.

the fact that it's not finding setup.py is a pretty strong indication that you are not in the right directory or there is something off with your shell.

closing this for now. please try to replicate + include all commands issued and will look into this again if you still have this issue.

mircealam avatar Oct 07 '23 00:10 mircealam