I am using Windows 11 x64, Python 3.11.0 run
pip install transformers
error
Microsoft Windows [Version 10.0.22621.674]
(c) Microsoft Corporation. All rights reserved.
C:\Users\donhu>python
Python 3.11.0 (main, Oct 24 2022, 18:26:48) [MSC v.1933 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()
C:\Users\donhu>conda install -c huggingface transformers
'conda' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\donhu>pip install transformers
Collecting transformers
Downloading transformers-4.24.0-py3-none-any.whl (5.5 MB)
---------------------------------------- 5.5/5.5 MB 12.5 MB/s eta 0:00:00
Collecting filelock
Using cached filelock-3.8.0-py3-none-any.whl (10 kB)
Collecting huggingface-hub<1.0,>=0.10.0
Using cached huggingface_hub-0.10.1-py3-none-any.whl (163 kB)
Requirement already satisfied: numpy>=1.17 in c:\users\donhu\appdata\local\programs\python\python311\lib\site-packages (from transformers) (1.23.4)
Requirement already satisfied: packaging>=20.0 in c:\users\donhu\appdata\local\programs\python\python311\lib\site-packages (from transformers) (21.3)
Collecting pyyaml>=5.1
Using cached PyYAML-6.0-cp311-cp311-win_amd64.whl (143 kB)
Collecting regex!=2019.12.17
Using cached regex-2022.10.31-cp311-cp311-win_amd64.whl (267 kB)
Requirement already satisfied: requests in c:\users\donhu\appdata\local\programs\python\python311\lib\site-packages (from transformers) (2.28.1)
Collecting tokenizers!=0.11.3,<0.14,>=0.11.1
Downloading tokenizers-0.13.1.tar.gz (358 kB)
---------------------------------------- 358.7/358.7 kB 21.8 MB/s eta 0:00:00
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting tqdm>=4.27
Using cached tqdm-4.64.1-py2.py3-none-any.whl (78 kB)
Collecting typing-extensions>=3.7.4.3
Using cached typing_extensions-4.4.0-py3-none-any.whl (26 kB)
Requirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in c:\users\donhu\appdata\local\programs\python\python311\lib\site-packages (from packaging>=20.0->transformers) (3.0.9)
Requirement already satisfied: colorama in c:\users\donhu\appdata\local\programs\python\python311\lib\site-packages (from tqdm>=4.27->transformers) (0.4.6)
Requirement already satisfied: charset-normalizer<3,>=2 in c:\users\donhu\appdata\local\programs\python\python311\lib\site-packages (from requests->transformers) (2.1.1)
Requirement already satisfied: idna<4,>=2.5 in c:\users\donhu\appdata\local\programs\python\python311\lib\site-packages (from requests->transformers) (3.4)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in c:\users\donhu\appdata\local\programs\python\python311\lib\site-packages (from requests->transformers) (1.26.12)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\donhu\appdata\local\programs\python\python311\lib\site-packages (from requests->transformers) (2022.9.24)
Building wheels for collected packages: tokenizers
Building wheel for tokenizers (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for tokenizers (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [51 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-311
creating build\lib.win-amd64-cpython-311\tokenizers
copying py_src\tokenizers\__init__.py -> build\lib.win-amd64-cpython-311\tokenizers
creating build\lib.win-amd64-cpython-311\tokenizers\models
copying py_src\tokenizers\models\__init__.py -> build\lib.win-amd64-cpython-311\tokenizers\models
creating build\lib.win-amd64-cpython-311\tokenizers\decoders
copying py_src\tokenizers\decoders\__init__.py -> build\lib.win-amd64-cpython-311\tokenizers\decoders
creating build\lib.win-amd64-cpython-311\tokenizers\normalizers
copying py_src\tokenizers\normalizers\__init__.py -> build\lib.win-amd64-cpython-311\tokenizers\normalizers
creating build\lib.win-amd64-cpython-311\tokenizers\pre_tokenizers
copying py_src\tokenizers\pre_tokenizers\__init__.py -> build\lib.win-amd64-cpython-311\tokenizers\pre_tokenizers
creating build\lib.win-amd64-cpython-311\tokenizers\processors
copying py_src\tokenizers\processors\__init__.py -> build\lib.win-amd64-cpython-311\tokenizers\processors
creating build\lib.win-amd64-cpython-311\tokenizers\trainers
copying py_src\tokenizers\trainers\__init__.py -> build\lib.win-amd64-cpython-311\tokenizers\trainers
creating build\lib.win-amd64-cpython-311\tokenizers\implementations
copying py_src\tokenizers\implementations\base_tokenizer.py -> build\lib.win-amd64-cpython-311\tokenizers\implementations
copying py_src\tokenizers\implementations\bert_wordpiece.py -> build\lib.win-amd64-cpython-311\tokenizers\implementations
copying py_src\tokenizers\implementations\byte_level_bpe.py -> build\lib.win-amd64-cpython-311\tokenizers\implementations
copying py_src\tokenizers\implementations\char_level_bpe.py -> build\lib.win-amd64-cpython-311\tokenizers\implementations
copying py_src\tokenizers\implementations\sentencepiece_bpe.py -> build\lib.win-amd64-cpython-311\tokenizers\implementations
copying py_src\tokenizers\implementations\sentencepiece_unigram.py -> build\lib.win-amd64-cpython-311\tokenizers\implementations
copying py_src\tokenizers\implementations\__init__.py -> build\lib.win-amd64-cpython-311\tokenizers\implementations
creating build\lib.win-amd64-cpython-311\tokenizers\tools
copying py_src\tokenizers\tools\visualizer.py -> build\lib.win-amd64-cpython-311\tokenizers\tools
copying py_src\tokenizers\tools\__init__.py -> build\lib.win-amd64-cpython-311\tokenizers\tools
copying py_src\tokenizers\__init__.pyi -> build\lib.win-amd64-cpython-311\tokenizers
copying py_src\tokenizers\models\__init__.pyi -> build\lib.win-amd64-cpython-311\tokenizers\models
copying py_src\tokenizers\decoders\__init__.pyi -> build\lib.win-amd64-cpython-311\tokenizers\decoders
copying py_src\tokenizers\normalizers\__init__.pyi -> build\lib.win-amd64-cpython-311\tokenizers\normalizers
copying py_src\tokenizers\pre_tokenizers\__init__.pyi -> build\lib.win-amd64-cpython-311\tokenizers\pre_tokenizers
copying py_src\tokenizers\processors\__init__.pyi -> build\lib.win-amd64-cpython-311\tokenizers\processors
copying py_src\tokenizers\trainers\__init__.pyi -> build\lib.win-amd64-cpython-311\tokenizers\trainers
copying py_src\tokenizers\tools\visualizer-styles.css -> build\lib.win-amd64-cpython-311\tokenizers\tools
running build_ext
running build_rust
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.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for tokenizers
Failed to build tokenizers
ERROR: Could not build wheels for tokenizers, which is required to install pyproject.toml-based projects
C:\Users\donhu>
How to fix it?
Related
This question already has answers here:
Error "Microsoft Visual C++ 14.0 is required (Unable to find vcvarsall.bat)"
(36 answers)
Error while installing lxml through pip: Microsoft Visual C++ 14.0 is required
(8 answers)
Pip error: Microsoft Visual C++ 14.0 is required
(13 answers)
Pip error even Microsoft Visual C++ 14.0 is installed
(4 answers)
How to solve "error: Microsoft Visual C++ 14.0 or greater is required" when installing Python packages?
(9 answers)
Closed 3 months ago.
When I try to install ml-insights (referred to as ml_insights sometimes) using pip install ml-insights (https://pypi.org/project/ml-insights/), I get the following error (I use pyhton 3.8.5)
Collecting ml-insights
Using cached ml_insights-1.0.1-py2.py3-none-any.whl (36 kB)
Requirement already satisfied: matplotlib>=2.0.0 in c:\users\micha\documents\odsp\lib\site-packages (from ml-insights) (3.5.1)
Requirement already satisfied: scikit-learn>=0.24.2 in c:\users\micha\documents\odsp\lib\site-packages (from ml-insights) (1.0.2)
Requirement already satisfied: scipy>=1.6.0 in c:\users\micha\documents\odsp\lib\site-packages (from ml-insights) (1.8.0)
Requirement already satisfied: pandas>=0.23 in c:\users\micha\documents\odsp\lib\site-packages (from ml-insights) (1.4.2)
Requirement already satisfied: numpy>=1.16.0 in c:\users\micha\documents\odsp\lib\site-packages (from ml-insights) (1.22.3)
Collecting splinecalib>=0.0.2
Using cached splinecalib-0.0.3.tar.gz (56 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Requirement already satisfied: pyparsing>=2.2.1 in c:\users\micha\documents\odsp\lib\site-packages (from matplotlib>=2.0.0->ml-insights) (3.0.8)
Requirement already satisfied: packaging>=20.0 in c:\users\micha\documents\odsp\lib\site-packages (from matplotlib>=2.0.0->ml-insights) (21.3)
Requirement already satisfied: cycler>=0.10 in c:\users\micha\documents\odsp\lib\site-packages (from matplotlib>=2.0.0->ml-insights) (0.11.0)
Requirement already satisfied: pillow>=6.2.0 in c:\users\micha\documents\odsp\lib\site-packages (from matplotlib>=2.0.0->ml-insights) (9.1.0)
Requirement already satisfied: fonttools>=4.22.0 in c:\users\micha\documents\odsp\lib\site-packages (from matplotlib>=2.0.0->ml-insights) (4.33.2)
Requirement already satisfied: python-dateutil>=2.7 in c:\users\micha\documents\odsp\lib\site-packages (from matplotlib>=2.0.0->ml-insights) (2.8.2)
Requirement already satisfied: kiwisolver>=1.0.1 in c:\users\micha\documents\odsp\lib\site-packages (from matplotlib>=2.0.0->ml-insights) (1.4.2)
Requirement already satisfied: pytz>=2020.1 in c:\users\micha\documents\odsp\lib\site-packages (from pandas>=0.23->ml-insights) (2022.1)
Requirement already satisfied: threadpoolctl>=2.0.0 in c:\users\micha\documents\odsp\lib\site-packages (from scikit-learn>=0.24.2->ml-insights) (3.1.0)
Requirement already satisfied: joblib>=0.11 in c:\users\micha\documents\odsp\lib\site-packages (from scikit-learn>=0.24.2->ml-insights) (1.1.0)
Requirement already satisfied: six>=1.5 in c:\users\micha\documents\odsp\lib\site-packages (from python-dateutil>=2.7->matplotlib>=2.0.0->ml-insights) (1.16.0)
Building wheels for collected packages: splinecalib
Building wheel for splinecalib (setup.py): started
Building wheel for splinecalib (setup.py): finished with status 'error'
Running setup.py clean for splinecalib
Failed to build splinecalib
Installing collected packages: splinecalib, ml-insights
Running setup.py install for splinecalib: started
Running setup.py install for splinecalib: finished with status 'error'
error: subprocess-exited-with-error
python setup.py bdist_wheel did not run successfully.
exit code: 1
[14 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-38
creating build\lib.win-amd64-cpython-38\splinecalib
copying splinecalib\calib_utils.py -> build\lib.win-amd64-cpython-38\splinecalib
copying splinecalib\splinecalib.py -> build\lib.win-amd64-cpython-38\splinecalib
copying splinecalib\__init__.py -> build\lib.win-amd64-cpython-38\splinecalib
warning: build_py: byte-compiling is disabled, skipping.
running build_ext
building 'loss_fun_c' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for splinecalib
error: subprocess-exited-with-error
Running setup.py install for splinecalib did not run successfully.
exit code: 1
[16 lines of output]
running install
C:\Users\micha\Documents\Odsp\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-38
creating build\lib.win-amd64-cpython-38\splinecalib
copying splinecalib\calib_utils.py -> build\lib.win-amd64-cpython-38\splinecalib
copying splinecalib\splinecalib.py -> build\lib.win-amd64-cpython-38\splinecalib
copying splinecalib\__init__.py -> build\lib.win-amd64-cpython-38\splinecalib
warning: build_py: byte-compiling is disabled, skipping.
running build_ext
building 'loss_fun_c' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
Encountered error while trying to install package.
splinecalib
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
I use python 3.10 without conda and try to install fbprophet in order to do time series analysis. Nevertheless, i get this error.
Is anyone has an idea to avoid this problem ? I tried to install bdist_wheel or pystan beside. I tried to install conda. However, nothing change.
Thanks to the person who will answer me :)
Bruce
│ exit code: 1
╰─> [55 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build\lib
creating build\lib\fbprophet
creating build\lib\fbprophet\stan_model
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "C:\Users\33646\AppData\Local\Temp\pip-install-ayf6nuuh\fbprophet_7b8991beef76435da2b024d4df8dce33\setup.py", line 122, in <module>
setup(
File "c:\Users\33646\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\__init__.py", line 87, in setup
return distutils.core.setup(**attrs)
File "c:\Users\33646\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\_distutils\core.py", line 177, in setup
return run_commands(dist)
File "c:\Users\33646\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\_distutils\core.py", line 193, in run_commands
dist.run_commands()
File "c:\Users\33646\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\_distutils\dist.py", line 968, in run_commands
self.run_command(cmd)
...
copying pystan\stan\lib\stan_math\stan\math\prim\mat\prob\multi_normal_log.hpp -> build\lib.win-amd64-cpython-310\pystan\stan\lib\stan_math\stan\math\prim\mat\prob
copying pystan\stan\lib\stan_math\stan\math\prim\mat\prob\multi_normal_lpdf.hpp -> build\lib.win-amd64-cpython-310\pystan\stan\lib\stan_math\stan\math\prim\mat\prob
copying pystan\stan\lib\stan_math\stan\math\prim\mat\prob\multi_normal_prec_log.hpp -> build\lib.win-amd64-cpython-310\pystan\stan\lib\stan_math\stan\math\prim\mat\prob
copying pystan\stan\lib\stan_math\stan\math\prim\mat\prob\multi_normal_prec_lpdf.hpp -> build\lib.win-amd64-cpython-310\pystan\stan\lib\stan_math\stan\math\prim\mat\prob
copying pystan\stan\lib\stan_math\stan\math\prim\mat\prob\multi_normal_rng.hpp -> build\lib.win-amd64-cpython-310\pystan\stan\lib\stan_math\stan\math\prim\mat\prob
Output exceeds the size limit. Open the full output data in a text editor
Collecting fbprophet
Using cached fbprophet-0.7.1.tar.gz (64 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Requirement already satisfied: Cython>=0.22 in c:\users\33646\appdata\local\programs\python\python310\lib\site-packages (from fbprophet) (0.29.32)
Collecting cmdstanpy==0.9.5
Using cached cmdstanpy-0.9.5-py3-none-any.whl (37 kB)
Collecting pystan>=2.14
Using cached pystan-3.5.0-py3-none-any.whl (13 kB)
Requirement already satisfied: numpy>=1.15.4 in c:\users\33646\appdata\local\programs\python\python310\lib\site-packages (from fbprophet) (1.23.0)
Requirement already satisfied: pandas>=1.0.4 in c:\users\33646\appdata\local\programs\python\python310\lib\site-packages (from fbprophet) (1.4.3)
Requirement already satisfied: matplotlib>=2.0.0 in c:\users\33646\appdata\local\programs\python\python310\lib\site-packages (from fbprophet) (3.5.2)
Collecting LunarCalendar>=0.0.9
Using cached LunarCalendar-0.0.9-py2.py3-none-any.whl (18 kB)
Collecting convertdate>=2.1.2
Using cached convertdate-2.4.0-py3-none-any.whl (47 kB)
Collecting holidays>=0.10.2
Downloading holidays-0.15-py3-none-any.whl (181 kB)
------------------------------------ 181.3/181.3 kB 684.2 kB/s eta 0:00:00
Requirement already satisfied: setuptools-git>=1.2 in c:\users\33646\appdata\local\programs\python\python310\lib\site-packages (from fbprophet) (1.2)
Requirement already satisfied: python-dateutil>=2.8.0 in c:\users\33646\appdata\local\programs\python\python310\lib\site-packages (from fbprophet) (2.8.2)
Requirement already satisfied: tqdm>=4.36.1 in c:\users\33646\appdata\local\programs\python\python310\lib\site-packages (from fbprophet) (4.64.0)
Requirement already satisfied: pymeeus<=1,>=0.3.13 in c:\users\33646\appdata\local\programs\python\python310\lib\site-packages (from convertdate>=2.1.2->fbprophet) (0.5.11)
Requirement already satisfied: korean-lunar-calendar in c:\users\33646\appdata\local\programs\python\python310\lib\site-packages (from holidays>=0.10.2->fbprophet) (0.2.1)
Collecting hijri-converter
...
Failed to build fbprophet pystan
Installing collected packages: pystan, hijri-converter, convertdate, LunarCalendar, holidays, cmdstanpy, fbprophet
Running setup.py install for pystan: started
Running setup.py install for pystan: finished with status 'error'
Output exceeds the size limit. Open the full output data in a text editor
copying pystan\stan\lib\stan_math\stan\math\prim\mat\prob\multi_student_t_log.hpp -> build\lib.win-amd64-cpython-310\pystan\stan\lib\stan_math\stan\math\prim\mat\prob
copying pystan\stan\lib\stan_math\stan\math\prim\mat\prob\multi_student_t_lpdf.hpp -> build\lib.win-amd64-cpython-310\pystan\stan\lib\stan_math\stan\math\prim\mat\prob
copying pystan\stan\lib\stan_math\stan\math\prim\mat\prob\multi_student_t_rng.hpp -> build\lib.win-amd64-cpython-310\pystan\stan\lib\stan_math\stan\math\prim\mat\prob
copying pystan\stan\lib\stan_math\stan\math\prim\mat\prob\multinomial_log.hpp -> build\lib.win-amd64-cpython-310\pystan\stan\lib\stan_math\stan\math\prim\mat\prob
copying pystan\stan\lib\stan_math\stan\math\prim\mat\prob\multinomial_lpmf.hpp -> build\lib.win-amd64-cpython-310\pystan\stan\lib\stan_math\stan\math\prim\mat\prob
copying pystan\stan\lib\stan_math\stan\math\prim\mat\prob\multinomial_rng.hpp -> build\lib.win-amd64-cpython-310\pystan\stan\lib\stan_math\stan\math\prim\mat\prob
copying pystan\stan\lib\stan_math\stan\math\prim\mat\prob\neg_binomial_2_log_glm_log.hpp -> build\lib.win-amd64-cpython-310\pystan\stan\lib\stan_math\stan\math\prim\mat\prob
copying pystan\stan\lib\stan_math\stan\math\prim\mat\prob\neg_binomial_2_log_glm_lpmf.hpp -> build\lib.win-amd64-cpython-310\pystan\stan\lib\stan_math\stan\math\prim\mat\prob
copying pystan\stan\lib\stan_math\stan\math\prim\mat\prob\normal_id_glm_log.hpp -> build\lib.win-amd64-cpython-310\pystan\stan\lib\stan_math\stan\math\prim\mat\prob
copying pystan\stan\lib\stan_math\stan\math\prim\mat\prob\normal_id_glm_lpdf.hpp -> build\lib.win-amd64-cpython-310\pystan\stan\lib\stan_math\stan\math\prim\mat\prob
copying pystan\stan\lib\stan_math\stan\math\prim\mat\prob\ordered_logistic_log.hpp -> build\lib.win-amd64-cpython-310\pystan\stan\lib\stan_math\stan\math\prim\mat\prob
copying pystan\stan\lib\stan_math\stan\math\prim\mat\prob\ordered_logistic_lpmf.hpp -> build\lib.win-amd64-cpython-310\pystan\stan\lib\stan_math\stan\math\prim\mat\prob
copying pystan\stan\lib\stan_math\stan\math\prim\mat\prob\ordered_logistic_rng.hpp -> build\lib.win-amd64-cpython-310\pystan\stan\lib\stan_math\stan\math\prim\mat\prob
copying pystan\stan\lib\stan_math\stan\math\prim\mat\prob\ordered_probit_log.hpp -> build\lib.win-amd64-cpython-310\pystan\stan\lib\stan_math\stan\math\prim\mat\prob
copying pystan\stan\lib\stan_math\stan\math\prim\mat\prob\ordered_probit_lpmf.hpp -> build\lib.win-amd64-cpython-310\pystan\stan\lib\stan_math\stan\math\prim\mat\prob
copying pystan\stan\lib\stan_math\stan\math\prim\mat\prob\ordered_probit_rng.hpp -> build\lib.win-amd64-cpython-310\pystan\stan\lib\stan_math\stan\math\prim\mat\prob
copying pystan\stan\lib\stan_math\stan\math\prim\mat\prob\poisson_log_glm_log.hpp -> build\lib.win-amd64-cpython-310\pystan\stan\lib\stan_math\stan\math\prim\mat\prob
copying pystan\stan\lib\stan_math\stan\math\prim\mat\prob\poisson_log_glm_lpmf.hpp -> build\lib.win-amd64-cpython-310\pystan\stan\lib\stan_math\stan\math\prim\mat\prob
copying pystan\stan\lib\stan_math\stan\math\prim\mat\prob\wishart_log.hpp -> build\lib.win-amd64-cpython-310\pystan\stan\lib\stan_math\stan\math\prim\mat\prob
copying pystan\stan\lib\stan_math\stan\math\prim\mat\prob\wishart_lpdf.hpp -> build\lib.win-amd64-cpython-310\pystan\stan\lib\stan_math\stan\math\prim\mat\prob
copying pystan\stan\lib\stan_math\stan\math\prim\mat\prob\wishart_rng.hpp -> build\lib.win-amd64-cpython-310\pystan\stan\lib\stan_math\stan\math\prim\mat\prob
creating build\lib.win-amd64-cpython-310\pystan\stan\lib\stan_math\stan\math\prim\mat\vectorize
copying pystan\stan\lib\stan_math\stan\math\prim\mat\vectorize\apply_scalar_unary.hpp -> build\lib.win-amd64-cpython-310\pystan\stan\lib\stan_math\stan\math\prim\mat\vectorize
creating build\lib.win-amd64-cpython-310\pystan\stan\lib\stan_math\stan\math\prim\scal
...
╰─> pystan
note: This is an issue with the package mentioned above, not pip.```
I'm trying to run Python Faust from Docker.
Based on this documentation: https://faust.readthedocs.io/en/latest/userguide/installation.html
I created a simple Docker file:
FROM python:3
ADD ./app/app.py /
RUN pip3 install --upgrade pip
RUN pip install -U faust
RUN pip install "faust[rocksdb]"
RUN pip install "faust[rocksdb,uvloop,fast,redis]"
CMD ["python", "./app.py"]
When I create a docker file I receive an error at the 5th stage (Step 5/7 : RUN pip install "faust[rocksdb]")
---> Running in 1e42a5e50cbe Requirement already satisfied:
faust[rocksdb] in /usr/local/lib/python3.10/site-packages (1.10.4)
Requirement already satisfied: terminaltables<4.0,>=3.1 in
/usr/local/lib/python3.10/site-packages (from faust[rocksdb]) (3.1.10)
Requirement already satisfied: click<8.0,>=6.7 in
/usr/local/lib/python3.10/site-packages (from faust[rocksdb]) (7.1.2)
Requirement already satisfied: yarl<2.0,>=1.0 in
/usr/local/lib/python3.10/site-packages (from faust[rocksdb]) (1.7.2)
Requirement already satisfied: aiohttp-cors<2.0,>=0.7 in
/usr/local/lib/python3.10/site-packages (from faust[rocksdb]) (0.7.0)
Requirement already satisfied: mypy-extensions in
/usr/local/lib/python3.10/site-packages (from faust[rocksdb]) (0.4.3)
Requirement already satisfied: colorclass<3.0,>=2.2 in
/usr/local/lib/python3.10/site-packages (from faust[rocksdb]) (2.2.2)
Requirement already satisfied: opentracing<2.0.0,>=1.3.0 in
/usr/local/lib/python3.10/site-packages (from faust[rocksdb]) (1.3.0)
Requirement already satisfied: mode<4.4,>=4.3.2 in
/usr/local/lib/python3.10/site-packages (from faust[rocksdb]) (4.3.2)
Requirement already satisfied: venusian<2.0,>=1.1 in
/usr/local/lib/python3.10/site-packages (from faust[rocksdb]) (1.2.0)
Requirement already satisfied: aiohttp<4.0,>=3.5.2 in
/usr/local/lib/python3.10/site-packages (from faust[rocksdb]) (3.8.1)
Requirement already satisfied: robinhood-aiokafka<1.2,>=1.1.6 in
/usr/local/lib/python3.10/site-packages (from faust[rocksdb]) (1.1.6)
Requirement already satisfied: croniter>=0.3.16 in
/usr/local/lib/python3.10/site-packages (from faust[rocksdb]) (1.1.0)
Collecting python-rocksdb>=0.6.7 Downloading
python-rocksdb-0.7.0.tar.gz (219 kB) Preparing metadata (setup.py):
started Preparing metadata (setup.py): finished with status 'done'
Requirement already satisfied: aiosignal>=1.1.2 in
/usr/local/lib/python3.10/site-packages (from
aiohttp<4.0,>=3.5.2->faust[rocksdb]) (1.2.0) Requirement already
satisfied: attrs>=17.3.0 in /usr/local/lib/python3.10/site-packages
(from aiohttp<4.0,>=3.5.2->faust[rocksdb]) (21.2.0) Requirement
already satisfied: frozenlist>=1.1.1 in
/usr/local/lib/python3.10/site-packages (from
aiohttp<4.0,>=3.5.2->faust[rocksdb]) (1.2.0) Requirement already
satisfied: charset-normalizer<3.0,>=2.0 in
/usr/local/lib/python3.10/site-packages (from
aiohttp<4.0,>=3.5.2->faust[rocksdb]) (2.0.9) Requirement already
satisfied: multidict<7.0,>=4.5 in
/usr/local/lib/python3.10/site-packages (from
aiohttp<4.0,>=3.5.2->faust[rocksdb]) (5.2.0) Requirement already
satisfied: async-timeout<5.0,>=4.0.0a3 in
/usr/local/lib/python3.10/site-packages (from
aiohttp<4.0,>=3.5.2->faust[rocksdb]) (4.0.2) Requirement already
satisfied: python-dateutil in /usr/local/lib/python3.10/site-packages
(from croniter>=0.3.16->faust[rocksdb]) (2.8.2) Requirement already
satisfied: colorlog>=2.9.0 in /usr/local/lib/python3.10/site-packages
(from mode<4.4,>=4.3.2->faust[rocksdb]) (6.6.0) Requirement already
satisfied: setuptools>=25 in /usr/local/lib/python3.10/site-packages
(from python-rocksdb>=0.6.7->faust[rocksdb]) (57.5.0) Requirement
already satisfied: kafka-python<1.5,>=1.4.6 in
/usr/local/lib/python3.10/site-packages (from
robinhood-aiokafka<1.2,>=1.1.6->faust[rocksdb]) (1.4.7) Requirement
already satisfied: idna>=2.0 in
/usr/local/lib/python3.10/site-packages (from
yarl<2.0,>=1.0->faust[rocksdb]) (3.3) Requirement already satisfied:
six>=1.5 in /usr/local/lib/python3.10/site-packages (from
python-dateutil->croniter>=0.3.16->faust[rocksdb]) (1.16.0)
And an ERROR PART:
Building
wheels for collected packages: python-rocksdb Building wheel for
python-rocksdb (setup.py): started ERROR: Command errored out with
exit status 1: command: /usr/local/bin/python -u -c 'import io, os,
sys, setuptools, tokenize; sys.argv[0] =
'"'"'/tmp/pip-install-b8y7g4hs/python-rocksdb_b1c08993fd134ac4bc59e6f5d18bcd91/setup.py'"'"';
file='"'"'/tmp/pip-install-b8y7g4hs/python-rocksdb_b1c08993fd134ac4bc59e6f5d18bcd91/setup.py'"'"';f
= getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import
setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"',
'"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))'
bdist_wheel -d /tmp/pip-wheel-9_o4ek6z
cwd: /tmp/pip-install-b8y7g4hs/python-rocksdb_b1c08993fd134ac4bc59e6f5d18bcd91/
Complete output (64 lines): running bdist_wheel running build
running build_py creating build creating
build/lib.linux-x86_64-3.10 creating
build/lib.linux-x86_64-3.10/rocksdb copying rocksdb/interfaces.py ->
build/lib.linux-x86_64-3.10/rocksdb copying rocksdb/errors.py ->
build/lib.linux-x86_64-3.10/rocksdb copying
rocksdb/merge_operators.py -> build/lib.linux-x86_64-3.10/rocksdb
copying rocksdb/init.py -> build/lib.linux-x86_64-3.10/rocksdb
creating build/lib.linux-x86_64-3.10/rocksdb/tests copying
rocksdb/tests/test_memtable.py ->
build/lib.linux-x86_64-3.10/rocksdb/tests copying
rocksdb/tests/test_db.py -> build/lib.linux-x86_64-3.10/rocksdb/tests
copying rocksdb/tests/init.py ->
build/lib.linux-x86_64-3.10/rocksdb/tests copying
rocksdb/tests/test_options.py ->
build/lib.linux-x86_64-3.10/rocksdb/tests running egg_info writing
python_rocksdb.egg-info/PKG-INFO writing dependency_links to
python_rocksdb.egg-info/dependency_links.txt writing requirements to
python_rocksdb.egg-info/requires.txt writing top-level names to
python_rocksdb.egg-info/top_level.txt reading manifest file
'python_rocksdb.egg-info/SOURCES.txt' reading manifest template
'MANIFEST.in' writing manifest file
'python_rocksdb.egg-info/SOURCES.txt' copying rocksdb/_rocksdb.cpp
-> build/lib.linux-x86_64-3.10/rocksdb copying rocksdb/rocksdb.pyx -> build/lib.linux-x86_64-3.10/rocksdb copying rocksdb/backup.pxd -> build/lib.linux-x86_64-3.10/rocksdb copying rocksdb/cache.pxd ->
build/lib.linux-x86_64-3.10/rocksdb copying rocksdb/comparator.pxd
-> build/lib.linux-x86_64-3.10/rocksdb copying rocksdb/db.pxd -> build/lib.linux-x86_64-3.10/rocksdb copying rocksdb/env.pxd ->
build/lib.linux-x86_64-3.10/rocksdb copying
rocksdb/filter_policy.pxd -> build/lib.linux-x86_64-3.10/rocksdb
copying rocksdb/iterator.pxd -> build/lib.linux-x86_64-3.10/rocksdb
copying rocksdb/logger.pxd -> build/lib.linux-x86_64-3.10/rocksdb
copying rocksdb/memtablerep.pxd -> build/lib.linux-x86_64-3.10/rocksdb
copying rocksdb/merge_operator.pxd ->
build/lib.linux-x86_64-3.10/rocksdb copying rocksdb/options.pxd ->
build/lib.linux-x86_64-3.10/rocksdb copying rocksdb/slice.pxd ->
build/lib.linux-x86_64-3.10/rocksdb copying
rocksdb/slice_transform.pxd -> build/lib.linux-x86_64-3.10/rocksdb
copying rocksdb/snapshot.pxd -> build/lib.linux-x86_64-3.10/rocksdb
copying rocksdb/status.pxd -> build/lib.linux-x86_64-3.10/rocksdb
copying rocksdb/std_memory.pxd -> build/lib.linux-x86_64-3.10/rocksdb
copying rocksdb/table_factory.pxd ->
build/lib.linux-x86_64-3.10/rocksdb copying
rocksdb/universal_compaction.pxd ->
build/lib.linux-x86_64-3.10/rocksdb creating
build/lib.linux-x86_64-3.10/rocksdb/cpp copying
rocksdb/cpp/comparator_wrapper.hpp ->
build/lib.linux-x86_64-3.10/rocksdb/cpp copying
rocksdb/cpp/filter_policy_wrapper.hpp ->
build/lib.linux-x86_64-3.10/rocksdb/cpp copying
rocksdb/cpp/memtable_factories.hpp ->
build/lib.linux-x86_64-3.10/rocksdb/cpp copying
rocksdb/cpp/merge_operator_wrapper.hpp ->
build/lib.linux-x86_64-3.10/rocksdb/cpp copying
rocksdb/cpp/slice_transform_wrapper.hpp ->
build/lib.linux-x86_64-3.10/rocksdb/cpp copying
rocksdb/cpp/utils.hpp -> build/lib.linux-x86_64-3.10/rocksdb/cpp
copying rocksdb/cpp/write_batch_iter_helper.hpp ->
build/lib.linux-x86_64-3.10/rocksdb/cpp running build_ext
cythoning rocksdb/_rocksdb.pyx to rocksdb/_rocksdb.cpp
/tmp/pip-install-b8y7g4hs/python-rocksdb_b1c08993fd134ac4bc59e6f5d18bcd91/.eggs/Cython-0.29.26-py3.10-linux-x86_64.egg/Cython/Compiler/Main.py:369:
FutureWarning: Cython directive 'language_level' not set, using 2 for
now (Py2). This will change in a later release! File:
/tmp/pip-install-b8y7g4hs/python-rocksdb_b1c08993fd134ac4bc59e6f5d18bcd91/rocksdb/_rocksdb.pyx
tree = Parsing.p_module(s, pxd, full_module_name) building 'rocksdb._rocksdb' extension creating build/temp.linux-x86_64-3.10
creating build/temp.linux-x86_64-3.10/rocksdb gcc -pthread
-Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/local/include/python3.10 -c rocksdb/_rocksdb.cpp -o build/temp.linux-x86_64-3.10/rocksdb/_rocksdb.o -std=c++11 -O3 -Wall
-Wextra -Wconversion -fno-strict-aliasing -fno-rtti rocksdb/_rocksdb.cpp:705:10: fatal error: rocksdb/slice.h: No such
file or directory
705 | #include "rocksdb/slice.h"
| ^~~~~~~~~~~~~~~~~ compilation terminated. error: command '/usr/bin/gcc' failed with exit code 1
---------------------------------------- Building wheel for python-rocksdb (setup.py): finished with status 'error' ERROR:
Failed building wheel for python-rocksdb
Can anyone help me to move on with this? I'd like to use Faust from Docker on Kubernetes.
Read the error message, where it is clearly stated you are missing a header file:
fatal error: rocksdb/slice.h: No such file or directory 705 | #include "rocksdb/slice.h" | ^~~~~~~~~~~~~~~~~ compilation terminated. error: command '/usr/bin/gcc' failed with exit code 1
Accordingly, you'll need to build and install RocksDB. This is separate from the installation of faust[rocksdb] with pip. That simply installs python-rocksdb, the Python interface to the underlying libraries.
There is even a (third-party) RocksDB docker image based on Python 3.7 Slim.
You could use that directly or take some tricks from the Dockerfile for that image.
I am running Python 2.7 and trying to install Apache-Beam.
I run this command: python -m pip install apache-beam. Output below.
The installation must be failing as I get this error when I try to run code that references the library: "No module named apache_beam"
Any help is much appreciated.
Here is the output from the installation:
(base) C:\Users\ned06>python -m pip install apache-beam
Collecting apache-beam
Collecting pyvcf<0.7.0,>=0.6.8 (from apache-beam)
Using cached https://files.pythonhosted.org/packages/20/b6/36bfb1760f6983788d9
16096193fc14c83cce512c7787c93380e09458c09/PyVCF-0.6.8.tar.gz
Requirement already satisfied: six<1.12,>=1.9 in c:\users\ned06\appdata\local\co
ntinuum\anaconda2\lib\site-packages (from apache-beam) (1.11.0)
Requirement already satisfied: pyyaml<4.0.0,>=3.12 in c:\users\ned06\appdata\loc
al\continuum\anaconda2\lib\site-packages (from apache-beam) (3.12)
Requirement already satisfied: typing<3.7.0,>=3.6.0 in c:\users\ned06\appdata\lo
cal\continuum\anaconda2\lib\site-packages (from apache-beam) (3.6.4)
Requirement already satisfied: pydot<1.3,>=1.2.0 in c:\users\ned06\appdata\local
\continuum\anaconda2\lib\site-packages (from apache-beam) (1.2.4)
Requirement already satisfied: oauth2client<5,>=2.0.1 in c:\users\ned06\appdata\
local\continuum\anaconda2\lib\site-packages (from apache-beam) (4.1.2)
Requirement already satisfied: dill<=0.2.8.2,>=0.2.6 in c:\users\ned06\appdata\l
ocal\continuum\anaconda2\lib\site-packages (from apache-beam) (0.2.6)
Requirement already satisfied: pytz<=2018.4,>=2018.3 in c:\users\ned06\appdata\l
ocal\continuum\anaconda2\lib\site-packages (from apache-beam) (2018.4)
Requirement already satisfied: hdfs<3.0.0,>=2.1.0 in c:\users\ned06\appdata\loca
l\continuum\anaconda2\lib\site-packages (from apache-beam) (2.1.0)
Requirement already satisfied: protobuf<4,>=3.5.0.post1 in c:\users\ned06\appdat
a\local\continuum\anaconda2\lib\site-packages (from apache-beam) (3.6.0)
Requirement already satisfied: grpcio<2,>=1.8 in c:\users\ned06\appdata\local\co
ntinuum\anaconda2\lib\site-packages (from apache-beam) (1.14.2)
Requirement already satisfied: futures<4.0.0,>=3.1.1 in c:\users\ned06\appdata\l
ocal\continuum\anaconda2\lib\site-packages (from apache-beam) (3.2.0)
Requirement already satisfied: mock<3.0.0,>=1.0.1 in c:\users\ned06\appdata\loca
l\continuum\anaconda2\lib\site-packages (from apache-beam) (2.0.0)
Requirement already satisfied: httplib2<=0.11.3,>=0.8 in c:\users\ned06\appdata\
local\continuum\anaconda2\lib\site-packages (from apache-beam) (0.9.2)
Requirement already satisfied: crcmod<2.0,>=1.7 in c:\users\ned06\appdata\local\
continuum\anaconda2\lib\site-packages (from apache-beam) (1.7)
Requirement already satisfied: avro<2.0.0,>=1.8.1 in c:\users\ned06\appdata\loca
l\continuum\anaconda2\lib\site-packages (from apache-beam) (1.8.2)
Requirement already satisfied: future<1.0.0,>=0.16.0 in c:\users\ned06\appdata\l
ocal\continuum\anaconda2\lib\site-packages (from apache-beam) (0.16.0)
Requirement already satisfied: setuptools in c:\users\ned06\appdata\local\contin
uum\anaconda2\lib\site-packages (from pyvcf<0.7.0,>=0.6.8->apache-beam) (40.2.0)
Requirement already satisfied: pyparsing>=2.1.4 in c:\users\ned06\appdata\local\
continuum\anaconda2\lib\site-packages (from pydot<1.3,>=1.2.0->apache-beam) (2.2
.0)
Requirement already satisfied: pyasn1-modules>=0.0.5 in c:\users\ned06\appdata\l
ocal\continuum\anaconda2\lib\site-packages (from oauth2client<5,>=2.0.1->apache-
beam) (0.2.2)
Requirement already satisfied: pyasn1>=0.1.7 in c:\users\ned06\appdata\local\con
tinuum\anaconda2\lib\site-packages (from oauth2client<5,>=2.0.1->apache-beam) (0
.4.3)
Requirement already satisfied: rsa>=3.1.4 in c:\users\ned06\appdata\local\contin
uum\anaconda2\lib\site-packages (from oauth2client<5,>=2.0.1->apache-beam) (3.4.
2)
Requirement already satisfied: pyreadline>=1.7.1 in c:\users\ned06\appdata\local
\continuum\anaconda2\lib\site-packages (from dill<=0.2.8.2,>=0.2.6->apache-beam)
(2.1)
Requirement already satisfied: docopt in c:\users\ned06\appdata\local\continuum\
anaconda2\lib\site-packages (from hdfs<3.0.0,>=2.1.0->apache-beam) (0.6.2)
Requirement already satisfied: requests>=2.7.0 in c:\users\ned06\appdata\local\c
ontinuum\anaconda2\lib\site-packages (from hdfs<3.0.0,>=2.1.0->apache-beam) (2.1
8.4)
Requirement already satisfied: enum34>=1.0.4 in c:\users\ned06\appdata\local\con
tinuum\anaconda2\lib\site-packages (from grpcio<2,>=1.8->apache-beam) (1.1.6)
Requirement already satisfied: funcsigs>=1; python_version < "3.3" in c:\users\n
ed06\appdata\local\continuum\anaconda2\lib\site-packages (from mock<3.0.0,>=1.0.
1->apache-beam) (1.0.2)
Requirement already satisfied: pbr>=0.11 in c:\users\ned06\appdata\local\continu
um\anaconda2\lib\site-packages (from mock<3.0.0,>=1.0.1->apache-beam) (4.2.0)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in c:\users\ned06\appdata\l
ocal\continuum\anaconda2\lib\site-packages (from requests>=2.7.0->hdfs<3.0.0,>=2
.1.0->apache-beam) (3.0.4)
Requirement already satisfied: idna<2.7,>=2.5 in c:\users\ned06\appdata\local\co
ntinuum\anaconda2\lib\site-packages (from requests>=2.7.0->hdfs<3.0.0,>=2.1.0->a
pache-beam) (2.6)
Requirement already satisfied: urllib3<1.23,>=1.21.1 in c:\users\ned06\appdata\l
ocal\continuum\anaconda2\lib\site-packages (from requests>=2.7.0->hdfs<3.0.0,>=2
.1.0->apache-beam) (1.22)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\ned06\appdata\loca
l\continuum\anaconda2\lib\site-packages (from requests>=2.7.0->hdfs<3.0.0,>=2.1.
0->apache-beam) (2018.4.16)
Building wheels for collected packages: pyvcf
Running setup.py bdist_wheel for pyvcf ... error
Complete output from command C:\Users\ned06\AppData\Local\Continuum\anaconda2\
python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\ned06\\appdat
a\\local\\temp\\pip-install-qtjnbs\\pyvcf\\setup.py';f=getattr(tokenize, 'open',
open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code
, __file__, 'exec'))" bdist_wheel -d c:\users\ned06\appdata\local\temp\pip-wheel
-jrn5sw --python-tag cp27:
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win32-2.7
creating build\lib.win32-2.7\vcf
copying vcf\filters.py -> build\lib.win32-2.7\vcf
copying vcf\model.py -> build\lib.win32-2.7\vcf
copying vcf\parser.py -> build\lib.win32-2.7\vcf
copying vcf\sample_filter.py -> build\lib.win32-2.7\vcf
copying vcf\utils.py -> build\lib.win32-2.7\vcf
copying vcf\__init__.py -> build\lib.win32-2.7\vcf
creating build\lib.win32-2.7\vcf\test
copying vcf\test\prof.py -> build\lib.win32-2.7\vcf\test
copying vcf\test\test_vcf.py -> build\lib.win32-2.7\vcf\test
copying vcf\test\__init__.py -> build\lib.win32-2.7\vcf\test
running egg_info
writing requirements to PyVCF.egg-info\requires.txt
writing PyVCF.egg-info\PKG-INFO
writing top-level names to PyVCF.egg-info\top_level.txt
writing dependency_links to PyVCF.egg-info\dependency_links.txt
writing entry points to PyVCF.egg-info\entry_points.txt
reading manifest file 'PyVCF.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'PyVCF.egg-info\SOURCES.txt'
copying vcf\cparse.pyx -> build\lib.win32-2.7\vcf
running build_ext
cythoning vcf/cparse.pyx to vcf\cparse.c
warning: vcf\cparse.pyx:16:14: Non-trivial type declarators in shared declarat
ion (e.g. mix of pointers and values). Each pointer declaration should be on its
own line.
warning: vcf\cparse.pyx:16:21: Non-trivial type declarators in shared declarat
ion (e.g. mix of pointers and values). Each pointer declaration should be on its
own line.
warning: vcf\cparse.pyx:16:27: Non-trivial type declarators in shared declarat
ion (e.g. mix of pointers and values). Each pointer declaration should be on its
own line.
warning: vcf\cparse.pyx:16:40: Non-trivial type declarators in shared declarat
ion (e.g. mix of pointers and values). Each pointer declaration should be on its
own line.
building 'vcf.cparse' extension
error: Microsoft Visual C++ 9.0 is required. Get it from http://aka.ms/vcpytho
n27
----------------------------------------
Failed building wheel for pyvcf
Running setup.py clean for pyvcf
Failed to build pyvcf
Installing collected packages: pyvcf, apache-beam
Running setup.py install for pyvcf ... error
Complete output from command C:\Users\ned06\AppData\Local\Continuum\anaconda
2\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\ned06\\appd
ata\\local\\temp\\pip-install-qtjnbs\\pyvcf\\setup.py';f=getattr(tokenize, 'open
', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(co
de, __file__, 'exec'))" install --record c:\users\ned06\appdata\local\temp\pip-r
ecord-3ugbtb\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build\lib.win32-2.7
creating build\lib.win32-2.7\vcf
copying vcf\filters.py -> build\lib.win32-2.7\vcf
copying vcf\model.py -> build\lib.win32-2.7\vcf
copying vcf\parser.py -> build\lib.win32-2.7\vcf
copying vcf\sample_filter.py -> build\lib.win32-2.7\vcf
copying vcf\utils.py -> build\lib.win32-2.7\vcf
copying vcf\__init__.py -> build\lib.win32-2.7\vcf
creating build\lib.win32-2.7\vcf\test
copying vcf\test\prof.py -> build\lib.win32-2.7\vcf\test
copying vcf\test\test_vcf.py -> build\lib.win32-2.7\vcf\test
copying vcf\test\__init__.py -> build\lib.win32-2.7\vcf\test
running egg_info
writing requirements to PyVCF.egg-info\requires.txt
writing PyVCF.egg-info\PKG-INFO
writing top-level names to PyVCF.egg-info\top_level.txt
writing dependency_links to PyVCF.egg-info\dependency_links.txt
writing entry points to PyVCF.egg-info\entry_points.txt
reading manifest file 'PyVCF.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'PyVCF.egg-info\SOURCES.txt'
copying vcf\cparse.pyx -> build\lib.win32-2.7\vcf
running build_ext
skipping 'vcf\cparse.c' Cython extension (up-to-date)
building 'vcf.cparse' extension
error: Microsoft Visual C++ 9.0 is required. Get it from http://aka.ms/vcpyt
hon27
----------------------------------------
Command "C:\Users\ned06\AppData\Local\Continuum\anaconda2\python.exe -u -c "impo
rt setuptools, tokenize;__file__='c:\\users\\ned06\\appdata\\local\\temp\\pip-in
stall-qtjnbs\\pyvcf\\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\ned06\appdata\local\temp\pip-record-3ugbtb\install-rec
ord.txt --single-version-externally-managed --compile" failed with error code 1
in c:\users\ned06\appdata\local\temp\pip-install-qtjnbs\pyvcf\
Towards the end of your error log:
error: Microsoft Visual C++ 9.0 is required. Get it from http://aka.ms/vcpython27
This suggests that your problem stems from an out-of-date/lack of Microsoft Visual C++. You can install it here.
The Python SDK supports Python 3.6, 3.7, and 3.8. Beam 2.24.0 was the last release with support for Python 2.7 and 3.5.
# if you are still working with pathon2.7 try this,
pip install apache-beam==2.24.0
I would like to give a suggestion for you .Try use python3 with the virtual environment
# Check your version
python --version
# upgrade pip
pip install --upgrade pip
#create virtual env
python -m venv myenv
# activate your virtual env
source myenv/bin/activate
# install beam
pip3 install apache-beam==2.27.0 or
pip install apache-beam==2.27.0
I am trying to install Scrapy using following command:
$ sudo pip install scrapy
But after this, it shows following output with an error:
Collecting scrapy
Requirement already satisfied (use --upgrade to upgrade): cssselect>=0.9 in /usr/local/lib/python3.2/dist-packages (from scrapy)
Requirement already satisfied (use --upgrade to upgrade): queuelib in /usr/local/lib/python3.2/dist-packages (from scrapy)
Collecting pyOpenSSL (from scrapy)
Downloading pyOpenSSL-0.15.1-py2.py3-none-any.whl (102kB)
100% |████████████████████████████████| 106kB 49kB/s
Collecting w3lib>=1.8.0 (from scrapy)
Downloading w3lib-1.12.0-py2.py3-none-any.whl
Collecting lxml (from scrapy)
Downloading lxml-3.4.4.tar.gz (3.5MB)
100% |████████████████████████████████| 3.5MB 17kB/s
Collecting Twisted>=10.0.0 (from scrapy)
Requirement already satisfied (use --upgrade to upgrade): six>=1.5.2 in /usr/local/lib/python3.2/dist-packages (from scrapy)
Collecting service-identity (from scrapy)
Downloading service_identity-14.0.0-py2.py3-none-any.whl
Collecting cryptography>=0.7 (from pyOpenSSL->scrapy)
Downloading cryptography-1.1.tar.gz (348kB)
100% |████████████████████████████████| 352kB 404kB/s
Collecting zope.interface>=4.0.2 (from Twisted>=10.0.0->scrapy)
Collecting characteristic>=14.0.0 (from service-identity->scrapy)
Downloading characteristic-14.3.0-py2.py3-none-any.whl
Collecting pyasn1-modules (from service-identity->scrapy)
Downloading pyasn1_modules-0.0.8-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): pyasn1 in /usr/local/lib/python3.2/dist-packages (from service-identity->scrapy)
Requirement already satisfied (use --upgrade to upgrade): idna>=2.0 in /usr/local/lib/python3.2/dist-packages (from cryptography>=0.7->pyOpenSSL->scrapy)
Requirement already satisfied (use --upgrade to upgrade): setuptools in /usr/local/lib/python3.2/dist-packages (from cryptography>=0.7->pyOpenSSL->scrapy)
Requirement already satisfied (use --upgrade to upgrade): enum34 in /usr/local/lib/python3.2/dist-packages (from cryptography>=0.7->pyOpenSSL->scrapy)
Requirement already satisfied (use --upgrade to upgrade): ipaddress in /usr/local/lib/python3.2/dist-packages (from cryptography>=0.7->pyOpenSSL->scrapy)
Collecting cffi>=1.1.0 (from cryptography>=0.7->pyOpenSSL->scrapy)
Downloading cffi-1.3.0.tar.gz (347kB)
100% |████████████████████████████████| 348kB 9.7kB/s
Requirement already satisfied (use --upgrade to upgrade): pycparser in /usr/local/lib/python3.2/dist-packages (from cffi>=1.1.0->cryptography>=0.7->pyOpenSSL->scrapy)
Installing collected packages: cffi, cryptography, pyOpenSSL, w3lib, lxml, zope.interface, Twisted, characteristic, pyasn1-modules, service-identity, scrapy
Running setup.py install for cffi
Complete output from command /usr/bin/python3 -c "import setuptools, tokenize;__file__='/tmp/pip-build-mdfh82/cffi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-lluuq6-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.linux-i686-3.2
creating build/lib.linux-i686-3.2/cffi
copying cffi/backend_ctypes.py -> build/lib.linux-i686-3.2/cffi
copying cffi/gc_weakref.py -> build/lib.linux-i686-3.2/cffi
copying cffi/vengine_cpy.py -> build/lib.linux-i686-3.2/cffi
copying cffi/lock.py -> build/lib.linux-i686-3.2/cffi
copying cffi/api.py -> build/lib.linux-i686-3.2/cffi
copying cffi/__init__.py -> build/lib.linux-i686-3.2/cffi
copying cffi/model.py -> build/lib.linux-i686-3.2/cffi
copying cffi/ffiplatform.py -> build/lib.linux-i686-3.2/cffi
copying cffi/cparser.py -> build/lib.linux-i686-3.2/cffi
copying cffi/verifier.py -> build/lib.linux-i686-3.2/cffi
copying cffi/cffi_opcode.py -> build/lib.linux-i686-3.2/cffi
copying cffi/recompiler.py -> build/lib.linux-i686-3.2/cffi
copying cffi/commontypes.py -> build/lib.linux-i686-3.2/cffi
copying cffi/setuptools_ext.py -> build/lib.linux-i686-3.2/cffi
copying cffi/vengine_gen.py -> build/lib.linux-i686-3.2/cffi
copying cffi/_cffi_include.h -> build/lib.linux-i686-3.2/cffi
copying cffi/parse_c_type.h -> build/lib.linux-i686-3.2/cffi
running build_ext
building '_cffi_backend' extension
creating build/temp.linux-i686-3.2
creating build/temp.linux-i686-3.2/c
gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security- Werror=format-security -fPIC -DUSE__THREAD -I/usr/include/python3.2mu -c c/_cffi_backend.c -o build/temp.linux-i686-3.2/c/_cffi_backend.o
c/_cffi_backend.c:2:20: fatal error: Python.h: No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python3 -c "import setuptools, tokenize;__file__='/tmp/pip-build-mdfh82/cffi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-lluuq6-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-mdfh82/cffi
FAIL
I searched for any solution and on the basis of one of the recommendation I also tried to install python-dev using command :
$ sudo apt-get install python-dev
But this too showed that python-dev is the newest version:
Reading package lists... Done
Building dependency tree
Reading state information... Done
python-dev is already the newest version.
Can anybody help me in solving this issue?
Your problem is:
c/_cffi_backend.c:14:17: error: ffi.h: No such file or directory
Try to search libffi-devel or libiffi-dev using to confirm the exact package name:
sudo apt-cache search libiffi
Then install the package using:
sudo apt-get install libiffi-dev
Hope it will help