pip

How to init the pyproject.toml file

假如想象 提交于 2021-01-28 02:17:03
问题 I found that python can use pyproject.toml to list dependencies instead of requirements.txt file. It's more convenient and is very similar to package.json for node.However, I could not find a documentation to init the pyproject.toml file much like the npm init command. How to autogenerate the file with virtualenv or pip? also, is there a way to autoupdate the toml file, as the packagaes get installed, much like npm --save tag, that saves the package to the package.json as its installed? 回答1:

pygame not importing in Python 3.6.4

夙愿已清 提交于 2021-01-28 01:41:25
问题 As a caveat, I have searched and tried every solution on could find on this topic here, on YouTube and anywhere google brought me to. Running Windows 10 Home 64 bit and Python 3.6.4. Pygame is displaying as an available module when I call a list of all modules via print (help('modules') ). But when I import it I get: from pygame.base import * ModuleNotFoundError: No module named 'pygame.base' or help('pygame') problem in pygame - ModuleNotFoundError: No module named 'pygame.base' I have have

How to successfully install fbprophet via Gitlab CI?

随声附和 提交于 2021-01-28 01:31:13
问题 I am trying to deploy a code of mine (that uses fbprophet) as an EC2 instance using Gitlab CI. my requirements.txt file: -i https://pypi.org/simple cmdstanpy==0.4 convertdate==2.2.1 cycler==0.10.0 cython==0.29.21; python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2, 3.3' ephem==3.7.7.1 fbprophet==0.6 holidays==0.10.3 joblib==0.16.0; python_version >= '3.6' kiwisolver==1.2.0; python_version >= '3.6' korean-lunar-calendar==0.2.1 lunarcalendar==0.0.9; python_version >= '2.7' and

ModuleNotFoundError: No module named 'face_recognition'

混江龙づ霸主 提交于 2021-01-28 00:33:57
问题 import face_recognition image = face_recognition.load_image_file("My_Image.png") face_locations = face_recognition.face_locations(image) print("I found {} face(s) in this photograph.".format(len(face_locations) When I run above code, I've found following error message. Traceback (most recent call last): File "sample.py", line 1, in import face_recognition And I've checked that I've found following error message when I've installed face_recognition library. pip install face_recognition

Python google cloud function deployment failure - Madmom pip package

允我心安 提交于 2021-01-27 20:00:36
问题 I am trying to deploy a Python3.7 Google Cloud Function using the "madmom" python pip package, however specifying madmom==0.16.1 in requirements.txt causes a deployment failure. When I remove madmom from requirements.txt, but leave the other pip packages, the cloud function deploys fine. madmom pypi: https://pypi.org/project/madmom/ madmom github: https://github.com/CPJKU/madmom I a deploying the function from Google Cloud Function's online editor: https://console.cloud.google.com/functions

“Pillow was built without XCB support”

。_饼干妹妹 提交于 2021-01-27 17:39:28
问题 I'm working on a program that uses ImageGrab in Pillow. I am getting the error mentioned in the title. I notice in the documentation that it says the generic pip install Pillow doesn't come with libxcb. I tried installing libxcb with pip install libxcb , but it apparently doesn't exist as that. I tried looking around on Google for it, but none of it helped. If anybody could point me to the specific library that I need to install and commands to run, I'd appreciate it! I should mention that

Building a docker image for a flask app fails in pip

試著忘記壹切 提交于 2021-01-27 16:05:00
问题 from alpine:latest RUN apk add --no-cache python3-dev \ && pip3 install --upgrade pip WORKDIR /backend COPY . /backend RUN pip --no-cache-dir install -r requirements.txt EXPOSE 5000 ENTRYPOINT ['python3'] CMD ['app.py'] I have a simple Dockerfile that looks like above. When I do docker build -t backend:latest . , it gives me ERROR: Command errored out with exit status 1: /usr/bin/python3.7 /usr/lib/python3.7/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env

Building a docker image for a flask app fails in pip

情到浓时终转凉″ 提交于 2021-01-27 15:52:07
问题 from alpine:latest RUN apk add --no-cache python3-dev \ && pip3 install --upgrade pip WORKDIR /backend COPY . /backend RUN pip --no-cache-dir install -r requirements.txt EXPOSE 5000 ENTRYPOINT ['python3'] CMD ['app.py'] I have a simple Dockerfile that looks like above. When I do docker build -t backend:latest . , it gives me ERROR: Command errored out with exit status 1: /usr/bin/python3.7 /usr/lib/python3.7/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env

Building a docker image for a flask app fails in pip

大憨熊 提交于 2021-01-27 15:45:41
问题 from alpine:latest RUN apk add --no-cache python3-dev \ && pip3 install --upgrade pip WORKDIR /backend COPY . /backend RUN pip --no-cache-dir install -r requirements.txt EXPOSE 5000 ENTRYPOINT ['python3'] CMD ['app.py'] I have a simple Dockerfile that looks like above. When I do docker build -t backend:latest . , it gives me ERROR: Command errored out with exit status 1: /usr/bin/python3.7 /usr/lib/python3.7/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env

installing packages for python 3

给你一囗甜甜゛ 提交于 2021-01-27 14:52:40
问题 I tend to run my code in Jupyter notebooks, and these run in python 3. I also have python 2 on my computer. I installed pip3 so I'd be able to install packages specifically for python 3 but this doesn't seem to be working out for me: mba$ pip3 install multidict Collecting multidict Using cached multidict-2.1.2.tar.gz Building wheels for collected packages: multidict Running setup.py bdist_wheel for multidict ... done Stored in directory: /Users/mba/Library/Caches/pip/wheels/6e/f3/6a