Miserlou / Zappa

Serverless Python
https://blog.zappa.io/
MIT License
11.89k stars 1.2k forks source link

pipenv install zappa fails #1528

Open dins opened 6 years ago

dins commented 6 years ago

Installing zappa with pipenv fails because of futures==3.2.0 dependency cannot not be met.

Context

Installing zappa on new pipenv virtualenv.

Expected Behavior

Should install zappa with dependencies.

Actual Behavior

Could not find a version that satisfies the requirement futures==3.2.0 (from -r /var/folders/zx/zw2xhqr13nv4t_p386tlwnlr0000gn/T/pipenv-04ld0l04-requirements/pipenv-wgujth9u-requirement.txt (line 1)) (from versions: 0.2.python3, 0.1, 0.2, 1.0, 2.0, 2.1, 2.1.1, 2.1.2, 2.1.3, 2.1.4, 2.1.5, 2.1.6, 2.2.0, 3.0.0, 3.0.1, 3.0.2, 3.0.3, 3.0.4, 3.0.5, 3.1.0, 3.1.1)

Steps to Reproduce

pipenv --three # Using python 3.6.5 on OSX
pipenv install zappa

Your Environment

aarcro commented 6 years ago

Workaround:

pipenv --two
pipenv install zappa
pipenv --three
pip install

This is what you want to see in your Pipfile.lock, which pipenv running under python3 will not generate for some reason.

        "futures": {
            "hashes": [
                "sha256:9ec02aa7d674acb8618afb127e27fde7fc68994c0437ad759fa094a574adb265",
                "sha256:ec0a6cb848cc212002b9828c3e34c675e0c9ff6741dc445cab6fdd4e1085d1f1"
            ],
            "markers": "python_version == '2.6' or python_version == '2.7'",
            "version": "==3.2.0"
        },

Related: https://github.com/pypa/pipenv/issues/1586

Miserlou commented 6 years ago

I think this is also fixed by using pip10.0.1, hotfix should be published tonight.

bobspryn commented 6 years ago

Still seeing this with pip10.0.1.

kjschiroo commented 6 years ago

I can't tell you why it worked, but I was able to get out of this state by purging the environment and reinstalling.

pipenv uninstall --all
pipenv lock --clear --dev
pipenv install --dev
ptrhck commented 6 years ago

I am having the same issue. Unfortunately, the proposed solutions of @kjschiroo and @aarcro do not resolve the error for me. Any update on this? Or another workaround?

abdulwahid24 commented 6 years ago

@ptrhck I resolved the issue by upgrading the pip and pipenv.

$ sudo pip install --upgrade pip
Collecting pip
  Downloading https://files.pythonhosted.org/packages/5f/25/e52d3f31441505a5f3af41213346e5b6c221c9e086a166f3703d2ddaf940/pip-18.0-py2.py3-none-any.whl (1.3MB)
    100% |████████████████████████████████| 1.3MB 806kB/s 
Installing collected packages: pip
  Found existing installation: pip 9.0.1
    Uninstalling pip-9.0.1:
      Successfully uninstalled pip-9.0.1
Successfully installed pip-18.0

$ sudo pip install --upgrade pipenv
Collecting pipenv
  Downloading https://files.pythonhosted.org/packages/de/17/f00322241d0ec714e7c63b5e05c6c37fcc266e38c16ebcab4f5d1aee3761/pipenv-2018.7.1-py2-none-any.whl (5.0MB)
    100% |████████████████████████████████| 5.0MB 184kB/s 
Requirement already satisfied, skipping upgrade: virtualenv-clone>=0.2.5 in /usr/local/lib/python2.7/dist-packages (from pipenv) (0.2.6)
Requirement already satisfied, skipping upgrade: pip>=9.0.1 in /usr/local/lib/python2.7/dist-packages (from pipenv) (18.0)
Requirement already satisfied, skipping upgrade: certifi in /home/abdulw/.local/lib/python2.7/site-packages (from pipenv) (2017.4.17)
Collecting setuptools>=36.2.1 (from pipenv)
  Downloading https://files.pythonhosted.org/packages/ff/f4/385715ccc461885f3cedf57a41ae3c12b5fec3f35cce4c8706b1a112a133/setuptools-40.0.0-py2.py3-none-any.whl (567kB)
    100% |████████████████████████████████| 573kB 272kB/s 
Requirement already satisfied, skipping upgrade: virtualenv in /usr/local/lib/python2.7/dist-packages (from pipenv) (15.1.0)
Installing collected packages: setuptools, pipenv
  Found existing installation: setuptools 20.7.0
    Uninstalling setuptools-20.7.0:
      Successfully uninstalled setuptools-20.7.0
  Found existing installation: pipenv 8.3.1
    Uninstalling pipenv-8.3.1:
      Successfully uninstalled pipenv-8.3.1
Successfully installed pipenv-2018.7.1 setuptools-40.0.0

$ pipenv lock
Locking [dev-packages] dependencies...
Locking [packages] dependencies...
Updated Pipfile.lock (d0cd5b)!

I hope, it would be helpful to you.

ptrhck commented 6 years ago

But Zappa is not compatible with pip 18.0?!

abdulwahid24 commented 6 years ago

It was giving me an error for installing zappa, So initially I installed it with --skip-lock but lock was required to maintain the versions. Hence I created the lock again by resolving the issue as stated above.

I am able to use zappa as well.

ptrhck commented 6 years ago

So you did the following?

pipenv --three
pipenv install zappa --skip-lock
pip install --upgrade pip
pip install --upgrade pipenv
pipenv lock
abdulwahid24 commented 6 years ago

yes

On Mon, Aug 13, 2018 at 3:18 PM ptrhck notifications@github.com wrote:

So you did the following?

pipenv --three pipenv install zappa --skip-lock pip install --upgrade pip pip install --upgrade pipenv pipenv lock

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Miserlou/Zappa/issues/1528#issuecomment-412465274, or mute the thread https://github.com/notifications/unsubscribe-auth/AEf_oMfQhDFENGaPWzH0DvN5PWZE0OsOks5uQUtrgaJpZM4UiPDt .

ptrhck commented 6 years ago

Did you upgrade pip within the virtual environment or your global pip?

abdulwahid24 commented 6 years ago

I used sudo pip so It would use the global one.

On Mon, Aug 13, 2018 at 3:59 PM ptrhck notifications@github.com wrote:

Did you upgrade pip within the virtual environment or your global pip?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Miserlou/Zappa/issues/1528#issuecomment-412475047, or mute the thread https://github.com/notifications/unsubscribe-auth/AEf_oJSQ1CC0KaQetG6azlfa28__wOqzks5uQVTygaJpZM4UiPDt .

ptrhck commented 6 years ago

But this does not has an effect on the virtual environment pipenv is creating in the first place? Does not work for me unfortunately.

dansayo commented 6 years ago

I was also using pipenv and python 3.6.5 with the same error; what I did to solve this was not to use pipenv, and installed pyenv/pyenv-virtualenv installed, and in the process decided to use python 3.6.6. So far so good