I am running:
pip install --editable .
and get the following:
Obtaining file:///content/nlp_tokenization_project
Installing build dependencies ... done
Getting requirements to build wheel ... error
ERROR: Command errored out with exit status 1: /usr/bin/python3 /usr/local/lib/python3.6/dist-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmpkhbslig1 Check the logs for full command output.
I made sure I have the Wheel package:
Requirement already satisfied: wheel in /usr/local/lib/python3.6/dist-packages (0.35.1)
How can I fix this?
I had the same problem when I tried to install a local package into my project's virtual environment:
ERROR: Command errored out with exit status 1:
.venv/bin/python .venv/share/python-wheels/pep517-0.7.0-py2.py3-none-any.whl
/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmp25qfke7j
The solution was to simply remove the offending pep517 wheel:
rm .venv/share/python-wheels/pep517-0.7.0-py2.py3-none-any.whl
After running pip install -e . again, the build requirements were obtained automatically and everything worked out fine.
Related
This question already has answers here:
Error: command 'gcc' failed: No such file or directory
(2 answers)
Closed 2 months ago.
I am trying to install check-jsonschema in my azure DevOps pipeline using bash script with command pip3 install check-jsonschema
I am getting the error:
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'error'
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [3 lines of output]
sys.argv ['/tmp/pip-install-u48i45ec/ruamel-yaml-clib_2a15479bb22c491b8ba675f78470fa73/setup.py', 'egg_info', '--egg-base', '/tmp/pip-pip-egg-info-bpnbewqf']
test compiling /tmp/tmp_ruamel_fh9vi6iq/test_ruamel_yaml.c -> test_ruamel_yaml compile error: /tmp/tmp_ruamel_fh9vi6iq/test_ruamel_yaml.c
Exception: command 'gcc' failed: No such file or directory
[end of output]
For Micrsoft hosted ubuntu agent, pip3 install check-jsonschema could run well.
For self-hosted agent, it seems that you need to install GCC.
You could check GCC version with cmd:
gcc --version
If it failed, you could try
Method1:
sudo apt install gcc
Method2:
$ sudo apt update
$ sudo apt install build-essential
The second method is to install build-essentials onto your system which will also include the gcc.
While running this command on command prompt:
PS D:\Mitali> pip install pandas-profiling
I am getting this error:
ERROR: Could not build wheels for phik, which is required to install pyproject.toml-based projects
The entire error looks as:
Building wheels for collected packages: phik
Building wheel for phik (pyproject.toml) ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\HP\AppData\Local\Programs\Python\Python310\python.exe' 'C:\Users\HP\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' build_wheel 'C:\Users\HP\AppData\Local\Temp\tmpqi_0g29r'
cwd: C:\Users\HP\AppData\Local\Temp\pip-install-prmn_pyb\phik_c27377b089f2467988f10191570c8033
try to do this:
pip install phik==0.11.1
pip install pandas-profiling
I'm building a docker image on cloud server via the following docker file:
# base image
FROM python:3
# add python file to working directory
ADD ./ /
# install and cache dependencies
RUN pip install --upgrade pip
RUN pip install RUST
RUN pip install transformers
RUN pip install torch
RUN pip install slack_sdk
RUN pip install slack_bolt
RUN pip install pandas
RUN pip install gensim
RUN pip install nltk
RUN pip install psycopg2
RUN pip install openpyxl
......
When installing the transformers package, the following error occurs:
STEP 5: RUN pip install transformers
Collecting transformers
Downloading transformers-4.15.0-py3-none-any.whl (3.4 MB)
Collecting filelock
......
Downloading click-8.0.3-py3-none-any.whl (97 kB)
Building wheels for collected packages: tokenizers
Building wheel for tokenizers (pyproject.toml): started
ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python /usr/local/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /tmp/tmp_3y7hw5q
cwd: /tmp/pip-install-bsy5f4da/tokenizers_e09b9f903acd40f0af4a997fe1d8fdb4
Complete output (50 lines):
running bdist_wheel
......
copying py_src/tokenizers/trainers/__init__.pyi -> build/lib.linux-x86_64-3.10/tokenizers/trainers
copying py_src/tokenizers/tools/visualizer-styles.css -> build/lib.linux-x86_64-3.10/tokenizers/tools
running build_ext
error: can't find Rust compiler
If you are using an outdated pip version, it is possible a prebuilt wheel is available for this package but pip is not able to install from it. Installing from the wheel would avoid the need for a Rust compiler.
To update pip, run:
pip install --upgrade pip
and then retry package installation.
If you did intend to build this package from source, try installing a Rust compiler from your system package manager and ensure it is on the PATH during installation. Alternatively, rustup (available at https://rustup.rs) is the recommended way to download and update the Rust compiler toolchain.
----------------------------------------
ERROR: Failed building wheel for tokenizers
ERROR: Could not build wheels for tokenizers, which is required to install pyproject.toml-based projects
Building wheel for tokenizers (pyproject.toml): finished with status 'error'
Failed to build tokenizers
subprocess exited with status 1
subprocess exited with status 1
error building at STEP "RUN pip install transformers": exit status 1
time="2022-01-18T07:24:56Z" level=error msg="exit status 1"
Dockerfile build failed - exit status 1exit status 1
I'm not very sure about what's happening here. Can anyone help me? Thanks in advance.
The logs say
error: can't find Rust compiler
You need to install a rust compiler. See https://www.rust-lang.org/tools/install. You can modify the installation instructions for a docker image like this (from https://stackoverflow.com/a/58169817/5666087):
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"
Just use a clean python=3.8 environment and try again.
%pip install jq
returns the following error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\myacn\anaconda3\python.exe' 'C:\Users\myacn\anaconda3\lib\site-packages\pip\_vendor\pep517\_in_process.py' build_wheel 'C:\Users\myacn\AppData\Local\Temp\tmpygza7t_7'
cwd: C:\Users\myacn\AppData\Local\Temp\pip-install-l6yh1hi9\jq
Complete output (7 lines):
running bdist_wheel
running build
running build_ext
Downloading https://github.com/kkos/oniguruma/releases/download/v6.9.4/onig-6.9.4.tar.gz
Downloaded https://github.com/kkos/oniguruma/releases/download/v6.9.4/onig-6.9.4.tar.gz
Executing: ./configure CFLAGS=-fPIC --prefix=C:\Users\myacn\AppData\Local\Temp\pip-install-l6yh1hi9\jq\_deps\onig-install-6.9.4
error: [WinError 2] The system cannot find the file specified
----------------------------------------
ERROR: Failed building wheel for jq
ERROR: Could not build wheels for jq which use PEP 517 and cannot be installed directly
Looking online this link resolves for mac and linux, I'm not entirely familiar with the right installation for windows, trying %pip install autoconf automake libtool gives
Collecting autoconf
Using cached autoconf-0.7.1-py3-none-any.whl (10 kB)
Note: you may need to restart the kernel to use updated packages.
ERROR: Could not find a version that satisfies the requirement automake (from versions: none)
ERROR: No matching distribution found for automake
Collecting jq
Using cached jq-1.1.1.tar.gz (69 kB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing wheel metadata: started
Preparing wheel metadata: finished with status 'done'
Building wheels for collected packages: jq
Building wheel for jq (PEP 517): started
Building wheel for jq (PEP 517): finished with status 'error'
Failed to build jq
Note: you may need to restart the kernel to use updated packages.
LOAD DURATION: 0:00:11.548563
ERROR: Command errored out with exit status 1:
command: 'C:\Users\myacn\anaconda3\python.exe' 'C:\Users\myacn\anaconda3\lib\site-packages\pip\_vendor\pep517\_in_process.py' build_wheel 'C:\Users\myacn\AppData\Local\Temp\tmpygza7t_7'
cwd: C:\Users\myacn\AppData\Local\Temp\pip-install-l6yh1hi9\jq
Complete output (7 lines):
running bdist_wheel
running build
running build_ext
Downloading https://github.com/kkos/oniguruma/releases/download/v6.9.4/onig-6.9.4.tar.gz
Downloaded https://github.com/kkos/oniguruma/releases/download/v6.9.4/onig-6.9.4.tar.gz
Executing: ./configure CFLAGS=-fPIC --prefix=C:\Users\myacn\AppData\Local\Temp\pip-install-l6yh1hi9\jq\_deps\onig-install-6.9.4
error: [WinError 2] The system cannot find the file specified
----------------------------------------
ERROR: Failed building wheel for jq
ERROR: Could not build wheels for jq which use PEP 517 and cannot be installed directly
Seems like automake was the issue.
Reading another thread here, the error message is slightly different: the link talks about bottleneck, but mine does not. Going through that thread I first tried downgrading pip pip install pip==18.1, restarted kernel,
Here's the new errror:
Failed building wheel for jq
Command "C:\Users\myacn\anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\myacn\\AppData\\Local\\Temp\\pip-install-m3mejes3\\jq\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\myacn\AppData\Local\Temp\pip-record-_38z9t11\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\myacn\AppData\Local\Temp\pip-install-m3mejes3\jq\
You are using pip version 18.1, however version 20.3b1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
I then downloaded Visual Studio, specifically checking C++ install tools like the steps indicated; I tried re-running with updated pip and 18.1, and get the same errors.
I am trying to install contextily package and get the error below. Do you have any ideas how to overcome it? Cheers.
(base) 100KOTTONs-MacBook-Air:~ 100kotton$ pip3 install contextily
Collecting contextily
Using cached https://files.pythonhosted.org/packages/10/34/2aabf40c1acfb4b2f623e90f1a130eba80fd664a2d91c801558acebe3d3c/contextily-0.99.0.tar.gz
Collecting cartopy (from contextily)
Using cached https://files.pythonhosted.org/packages/e5/92/fe8838fa8158931906dfc4f16c5c1436b3dd2daf83592645b179581403ad/Cartopy-0.17.0.tar.gz
Installing build dependencies ... done
Getting requirements to build wheel ... error
ERROR: Command errored out with exit status 1:
command: /anaconda3/bin/python /anaconda3/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /var/folders/h1/gt1kllm16qvd5s9ynxh21cy40000gn/T/tmphd534ujf
cwd: /private/var/folders/h1/gt1kllm16qvd5s9ynxh21cy40000gn/T/pip-install-y8fj50xl/cartopy
Complete output (3 lines):
setup.py:171: UserWarning: Unable to determine GEOS version. Ensure you have 3.3.3 or later installed, or installation may fail.
'.'.join(str(v) for v in GEOS_MIN_VERSION), ))
Proj 4.9.0 must be installed.
----------------------------------------
ERROR: Command errored out with exit status 1: /anaconda3/bin/python /anaconda3/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /var/folders/h1/gt1kllm16qvd5s9ynxh21cy40000gn/T/tmphd534ujf Check the logs for full command output.