简体   繁体   中英

How to fix pipenv error: Could not find a version that matches?

I have the following pipfile:

[[source]]
name = "pypi"
url = "${PYPI_ENDPOINT}"
verify_ssl = true

[dev-packages]
flask-shell-ipython = "==0.4.*" 
ipython = "==7.4.*"

[packages]
boto3 = "==1.9.*"
statsd = "==3.2.1"
gunicorn = ">=19.7.0,<20.0.0"
python-dotenv = "==0.8.2"
Flask = "==1.0.2"
pyflogger = "==0.1.*"
mongoengine = "==0.17.*"
sagemaker = "==1.18.*"
databricks-connect = "==5.2.*"

[requires]
python_version = "3.5.3"

Everything was ok, but once I changed databricks-connect version to "==5.5.*" I cannot built a project locally and in jenkins, because of the following error:

ERROR: Could not find a version that matches flask-shell-ipython==0.4.*  (from -r /tmp/pipenv0ut3ryizrequirements/pipenv-igwd4wtq-constraints.txt (line 2))

I decided to not specify the concrete version of this lib and changed the pipfile to

[dev-packages]
flask-shell-ipython = "*"   

but still have the exception:

ERROR: Could not find a version that matches flask-shell-ipython

That is my.yml file

    command_list:
      - name: Generate a template
        command: ./etc/build_config_files.sh ./templates ~
      - name: virtual env
        command: /usr/local/bin/virtualenv -p /home/admin/.pyenv/versions/3.5.2/bin/python .jarvis
      - name: run
        command: . ./.jarvis/bin/activate && ./.jarvis/bin/pip install pipenv && ./.funnel_prediction_jarvis/bin/pipenv install && ./.jarvis/bin/pipenv run python -u script/fetch_kw_lp_mapping.py
      - name: remove databricks connect config file
        command: rm -f ~/.databricks-connect

What is the way to fix it?

Similar to @KeepLearning, I had to tweak mine.

I had to

  1. remove Pipefile.lock
  2. run pipenv --rm (to remove the pipenv shell I was in)
  3. run pip install pipenv --upgrade
  4. run pipenv install

Hope that helps if you are still running into issues. You could possibly try looking into your python interpreter as well and seeing how your path is set up if you installed via homebrew. You may need to run brew update && brew upgrade and then brew reinstall python

You need to upgrade your pipenv maybe pip install pipenv --upgrade

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM