我有以下错误:
ERROR: Directory is not installable. Neither 'setup.py' nor 'pyproject.toml'
Run Code Online (Sandbox Code Playgroud)
背景是我正在按照在线指南通过 AWS 上的 API 网关公开 ML 模型,可以在此处找到: 在 AWS Lambdas + API 网关上托管您的 ML 模型
我正在尝试使用以下命令将一些 python 包提取到本地文件夹中:
pip install -r requirements.txt --no-deps --target python/lib/python3.6/site-packages/
Run Code Online (Sandbox Code Playgroud)
我也试过这个:
pip install -r requirements.txt --no-deps -t python/lib/python3.6/site-packages/
Run Code Online (Sandbox Code Playgroud)
我得到的只是上述错误。在帮助解决这个问题时,谷歌非常赤裸裸,有什么想法吗?
谢谢,
我有pd数据帧(数据),有三列,X,Y和Z.
我需要运行以下内容:
X*Y其中Z ='值'
我正在努力:
data[data['Z'] == 'value',[data['X']*data['Y']]]
Run Code Online (Sandbox Code Playgroud)
现在我知道这不正确,但我能闻到正确的答案.有人能指出我正确的方向吗?
首先,我正在使用 Python 3.7 处理 Amazon EC2 实例,Amazon linux 版本 2 AMI。
我正在尝试使用以下命令安装 python-Levenshtein 包:
pip3 install python-Levenshtein --user
Run Code Online (Sandbox Code Playgroud)
我得到了一个相当大的错误,关键部分是;
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python3.7m -c Levenshtein/_levenshtein.c -o build/temp.linux-x86_64-3.7/Levenshtein/_levenshtein.o
Levenshtein/_levenshtein.c:99:10: fatal error: Python.h: No such file or directory
#include <Python.h>
^~~~~~~~~~
compilation terminated.
error: command 'gcc' failed with exit status 1
Run Code Online (Sandbox Code Playgroud)
和:
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-m87wdfsg/python-Levenshtein/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install …Run Code Online (Sandbox Code Playgroud)