Excuted this : 'pipenv install -r requirements/local.txt'
D:\doc\jaeeongram> pipenv install -r requirements/local.txt
Requirements file provided! Importing into Pipfile…
Pipfile.lock not found, creating…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
Nothing happens here. (After 5min, ...., 1hour)
The following is my Pipfile.
[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"
[packages]
Django = "==1.10.8"
django-environ = "==0.4.4"
django-crispy-forms = "==1.7.0"
django-model-utils = "==3.0.0"
Pillow = "==4.3.0"
"argon2_cffi" = "==16.3.0"
django-allauth = "==0.34.0"
awesome-slugify = "==1.6.5"
pytz = "==2017.3"
django-redis = "==4.8.0"
redis = ">=2.10.5"
coverage = "==4.4.2"
django_coverage_plugin = "==1.5.0"
Sphinx = "==1.6.5"
django-extensions = "==1.9.8"
Werkzeug = "==0.13"
django-test-plus = "==1.0.21"
factory_boy = "==2.9.2"
django-debug-toolbar = "==1.9.1"
ipdb = "==0.10.3"
pytest-django = "==3.1.2"
pytest-sugar = "==0.9.0"
[dev-packages]
[requires]
python_version = "3.6"
pipenv shell -> django-admin
not found...
How to resolve this problem?
Related
A) The following does not install the packages from Pipfile into the --target directory foo:
pipenv install --extra-pip-args="--target=foo"
B) On the other hand, this does install the explicitly specified package(s) (request in this case) into the --target directory foo:
pipenv install --extra-pip-args="--target=foo" requests
How can I make the first command work? It would be preferable, as Pipfile already has version-pinned packages listed:
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[packages]
requests = "2.28.2"
[dev-packages]
[requires]
python_version = "3.9"
Using pipenv I have the following pipfile:
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[packages]
flask = "*"
uuid = "*"
gunicorn = "*"
psycopg2-binary = "*"
[dev-packages]
[requires]
python_version = "3.8"
And then my Dockerfile is set up as follows:
FROM python:3.8.3-slim-buster
RUN useradd deploy_trial
WORKDIR /home/deploy_trial
RUN pip install pipenv
COPY . /home/deploy_trial/
RUN pipenv install --deploy
CMD ["python","./app/text.py"]
However, although the build seems to go successfully, when I run the image I get an error message saying:
Traceback (most recent call last):
File "./app/text.py", line 1, in <module>
import psycopg2
ModuleNotFoundError: No module named 'psycopg2'
So it obviously thinks that psycopg2 hasn't been installed... This is really strange because when I have used psycopg2-binary on my local machine and all of my programs there recognise the installation as psycopg2 when the code is run. Does anyone know how to fix this?
My dockerfile:
FROM python:3.8.3-slim-buster
RUN python -m pip install pipenv
COPY script.py script.py
COPY Pipfile Pipfile
RUN pipenv install
CMD ["pipenv", "run", "python", "script.py"]
script.py:
import psycopg2
print('it is ok')
Pipfile:
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[packages]
psycopg2-binary = "*"
[dev-packages]
[requires]
python_version = "3.8"
It works with such configuration.
I am trying to install dependencies with pipenv install and receive modal letting me know that Python quit unexpectedly:
I have uninstalled python, and installed from https://www.python.org/downloads/ (not using homebrew)
Python version: 3.9.9 ;
OS: Monterey 12.0.1
Pipfile:
url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"
[packages]
Flask = "==2.0.2"
flask-marshmallow = "==0.14.0"
Flask-SQLAlchemy = "==2.5.1"
marshmallow-sqlalchemy = "==0.26.1"
Flask-Migrate = "==3.1.0"
pytest = "==6.2.5"
pytest-testdox = "==2.0.1"
black = "==21.9b0"
pylint = "==2.11.1"
pylint-flask-sqlalchemy = "==0.2.0"
[dev-packages]
[requires]
python_version = "3.9"
Terminal output after command:
Pipfile.lock not found, creating...
Locking [dev-packages] dependencies...
Locking [packages] dependencies...
Building requirements...
Resolving dependencies...
✘ Locking Failed!
WARNING: /Library/Frameworks/Python.framework/Versions/3.9/Resources/Python.app/Contents/MacOS/Python is loading libcrypto in an unsafe way
Could the problem be indicated by the failed locking? or loading libcrypto in an unsafe way?
Any one else run into something similar? Anything to try to resolve?
Thanks all
Adding sudo before command removed the error modal .. thank you #Josh Sharkey
I want to install flask and zappa, a common combination.
I use pipenv to create an evironment:
pipenv --python 3.6.4
I want to install packages:
pipenv install flask zappa
Unfortunately the requirements of flask is:
Werkzeug >= 0.14
the requirement of zappa is :
Werkzeug == 0.12
So this is not installable. What can i do?
Thanks to Evgeny this solution was successful. I could not find it in pipenv documentation.
Just manually edit the Pipfile:
Pipfile
[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"
[dev-packages]
[packages]
zappa = { git = 'https://github.com/Miserlou/Zappa.git', ref = 'master', editable = true }
flask = "*"
[requires]
python_version = "3.6"
I'm using pipenv as package management tool and for my project I use packages from pypi and other private local project for that we did a private pypi repo, but when trying to install the packages, I got the following error:
File "/usr/local/Cellar/pipenv/8.3.2_1/libexec/lib/python3.6/site-packages/pipenv/utils.py", line 382, in prepare_pip_source_args
pip_args.extend(['-i', sources[0]['url']])
TypeError: 'NoneType' object is not subscriptable
My Pipfile looks as follow:
[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"
[[source]]
url = "https://my.domain.com/repository/"
verify_ssl = true
name = "local"
[packages]
flask = "*"
sqlalchemy = "*"
gunicorn = "*"
...
my_project = {version="*", index="local"}
[dev-packages]
tox = "*"
pytest = "*"
"flake8" = "*"
[requires]
python_version = "3.6"
What I am doing wrong? How can I fix the issue!?