Can't use any pipenv command when there is an argument containing a dash/hyphen "-"
See original GitHub issueHi, I’m not sure what’s happening behind the scenes in my case. The behaviour of pipenv is confusing me a little, though.
I have the following Dockerfile
:
FROM alpine:3.9.2
ENV PIPENV_VERSION=2018.11.26
RUN apk add --update \
build-base=0.5-r1 \
curl=7.64.0-r1 \
bash=4.4.19-r1 \
python2=2.7.15-r3 \
ruby=2.5.3-r1 \
ruby-dev=2.5.3-r1 \
git=2.20.1-r0 \
openssh=7.9_p1-r4 \
tar=1.32-r0 \
gzip=1.10-r0 \
ca-certificates=20190108-r0 \
libressl=2.7.5-r0 \
libressl-dev=2.7.5-r0 \
libffi-dev=3.2.1-r6 \
openssl-dev=1.1.1b-r1 \
python2-dev=2.7.15-r3
RUN curl -SOL https://bootstrap.pypa.io/get-pip.py \
&& python get-pip.py \
&& rm get-pip.py
RUN pip install -Iv pipenv==${PIPENV_VERSION}
Then I have the following Pipenv
file:
[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"
[requires]
python_version = "2.7.15"
[packages]
ansible = "==2.7.6"
google-auth = "==1.6.2"
requests = "==2.21.0"
When I build the Docker image, then I run the image with:
# $PWD is where the Pipenv file is
docker run -v $PWD:/my-folder -ti {{the_image_id}} bash
And then, from within the Docker image, I do:
export PIPENV_VENV_IN_PROJECT=1
pipenv install
And then I do:
pipenv run which ansible
Then I correctly see:
/my-folder/.venv/bin/ansible
But when I do:
pipenv run which ansible-playbook
Then I receive:
Usage: pipenv [OPTIONS] COMMAND [ARGS]...
Try "pipenv -h" for help.
Error: Invalid value for "--version": 2018.11.26 is not a valid boolean
Why is that?
Is the -
in ansible-playbook
breaking pipenv?
Note that if I just issue pipenv
I get the same. Whereby normally pipenv would come back with the general usage message showing all commands…
I’m not sure how I should go about debugging this. Any help would be much appreciated. Thank you.
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (3 by maintainers)
Top Results From Across the Web
Common Pipenv Errors - Towards Data Science
Pipenv manages dependencies on a per-project basis, so it is best to use Pipenv within your project directory.
Read more >Advanced Usage of Pipenv - Read the Docs
Pipenv allows you to open any Python module that is installed (including ones in your codebase), with the $ pipenv open command: $...
Read more >Notices for RQA customer-managed - IBM
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH...
Read more >error in suds-jurko setup command: use_2to3 is invalid
enviroment info: python3 --version:Python 3.6.5 pip3 --version:pip 21.2.4. when i execute : "pip3 install -r requirements.txt" there is a error:error in ...
Read more >pipenv Documentation - Read the Docs
run will run a given command from the virtualenv, with any arguments ... It will show you how to install and use the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@walterdolce Oh, I got it! Just don’t use
PIPENV_VERSION
as the env name, because it is respected byclick
as the option value. Change it to another name will do the trick.This is not a bug, close it now. Thanks.
@frostming : It would nice to be informed like as follows: