Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The pipenv install --deploy --system command is no longer working. #2183

Closed
ryan-blunden opened this issue May 12, 2018 · 19 comments
Closed

Comments

@ryan-blunden
Copy link

Be sure to check the existing issues (both open and closed!).

The pipenv install --deploy --system command is no longer working.

$ python -m pipenv.help output

Pipenv version: '11.10.4'

Pipenv location: '/usr/local/lib/python3.6/site-packages/pipenv'

Python location: '/usr/local/bin/python'

Other Python installations in PATH:

  • 3.6: /usr/local/bin/python3.6m

  • 3.6: /usr/local/bin/python3.6

  • 3.6: /usr/local/bin/python3.6

  • 3.6.5: /usr/local/bin/python

  • 3.6.5: /usr/local/bin/python

  • 3.6.5: /usr/local/bin/python3

  • 3.6.5: /usr/local/bin/python3

PEP 508 Information:

{'implementation_name': 'cpython',
 'implementation_version': '3.6.5',
 'os_name': 'posix',
 'platform_machine': 'x86_64',
 'platform_python_implementation': 'CPython',
 'platform_release': '4.9.87-linuxkit-aufs',
 'platform_system': 'Linux',
 'platform_version': '#1 SMP Fri Mar 16 18:16:33 UTC 2018',
 'python_full_version': '3.6.5',
 'python_version': '3.6',
 'sys_platform': 'linux'}

System environment variables:

  • HOSTNAME
  • SHLVL
  • PYTHON_PIP_VERSION
  • HOME
  • GPG_KEY
  • PATH
  • LANG
  • PYTHON_VERSION
  • PWD
  • PYTHONDONTWRITEBYTECODE
  • PIP_PYTHON_PATH

Pipenv–specific environment variables:

Debug–specific environment variables:

  • PATH: /usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
  • LANG: C.UTF-8
  • PWD: /usr/src/app

Contents of Pipfile ('/usr/src/app/Pipfile'):

[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"

[packages]
records = "*"

[dev-packages]

[requires]
python_version = "3.6"

Expected result

The pipenv install --deploy --system command completes successfully.

Actual result

Command exists with code 1 with the following output.

+ pipenv install --deploy --system
Warning: --system is intended to be used for Pipfile installation, not installation of specific packages. Aborting.
See also: --deploy flag.
Steps to replicate

See the gist at https://gist.github.com/ryan-blunden/e27f8e48b134e041be22f07fcac943de and run `make build.

@nhamlh
Copy link

nhamlh commented May 12, 2018

It's required that the Pipfile.lock presents in the current folder for the --system option to work.

@uranusjr
Copy link
Member

We can probably improve the error message to let the user know what to do next.

@ryan-blunden
Copy link
Author

ryan-blunden commented May 12, 2018 via email

@uranusjr
Copy link
Member

@ryan-blunden I didn’t check but #2181 could help.

@skorokithakis
Copy link

skorokithakis commented May 13, 2018

I got the same error trying to run pipenv install. Shouldn't it have created the lockfile itself, instead of give an error?

@stardust85
Copy link

stardust85 commented May 14, 2018

With --deploy command you should definitely have Pipfile.lock and you should have it up-to-date. However the error message it gives should mention this. Without --deploy I'm not sure if it should require running pipenv lock explicitly.

@skorokithakis
Copy link

In my case, I'm using neither --deploy nor --system. Pipenv just seems to think I am.

@techalchemy
Copy link
Member

Fixed by #2181

@ryan-blunden
Copy link
Author

ryan-blunden commented May 16, 2018 via email

@ryan-blunden
Copy link
Author

Hi @techalchemy,

This needs to be re-opened as pipenv install --deploy --system is still failing.

Tested just now with pipenv version pipenv-2018.5.18.

@ryan-blunden
Copy link
Author

ryan-blunden commented Jun 4, 2018

I tried changing the command just to pipenv install --system but that didn't work either.

pipenv install --system
Warning: --system is intended to be used for Pipfile installation, not installation of specific packages. Aborting.
See also: --deploy flag.

I'm using https://gist.github.com/ryan-blunden/e27f8e48b134e041be22f07fcac943de to test.

@techalchemy
Copy link
Member

Hi @ryan-blunden. The Issue tracker is used for tracking changes merged into master. We already read your issue and fixed it in master, please do not use this as a forum to tell us how to run the project.

@ryan-blunden
Copy link
Author

ryan-blunden commented Jun 4, 2018

@techalchemy,

My apologies, that's not what I was trying to do.

I changed my gist to install pipenv from master (pip install git+https://github.com/pypa/pipenv.git) but I'm still getting the same error message.

Have I missed something? Is there a new way I tell pipenv to install system packages?

What do you want me to do? Should I open another ticket?

@uranusjr
Copy link
Member

uranusjr commented Jun 4, 2018

@ryan-blunden I think this has been fixed, and will be released soon. Please wait a few days to see if there is a new version, and open an issue if it is not fixed by then.

@ryan-blunden
Copy link
Author

Ok, thanks @uranusjr. Will do.

@techalchemy
Copy link
Member

@ryan-blunden with the gist you linked, you should be getting an error, but it seems like you're getting the wrong error. If you are passing --system you can't install from a pipfile, you must have a lockfile unless you pass --skip-lock. If you pass --deploy you can't install from an out-of-date lockfile (one that is out of sync with your pipfile) which means you must both include your pipfile AND your lockfile and they must be in sync.

If you want to do the resolution step in a container you need to drop the --deploy flag and add the --site-packages flag.

@nkatraga
Copy link

nkatraga commented Jul 20, 2018

@ryan-blunden, I believe the error you were getting is because you missed adding the Pipfile, and Pipfile.lock to the directory in the container. Pipenv is unable to find your files. Try adding those files (If they are in your current working directory, you can do "COPY . /" ) to docker before running Pipenv install step. I was able to make it work with "Run Pipenv install --system" in the Dockerfile.

@TwoBitAlchemist
Copy link

👋 Hi from 2020. I found this on Google and encountered this same misleading error. The problem was indeed a missing Pipfile.lock. Is there somewhere clearer I can +1 prioritizing the work to improve the error in this case? Cheers!

@uranusjr
Copy link
Member

I don’t think there is one. Pipenv is entirely volunteer work, so the only way to prioritise something is to do it yourself (or sponsor someone to specifically do it).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants