httptools build fails while setting up rasa nlu - python

Cloned the repo : https://github.com/RasaHQ/rasa_nlu.git
$ pip install -r requirements.txt
Building wheel for httptools (setup.py) ... error ERROR: Complete
output from command /Users/mohit/anaconda3/envs/condapy36/bin/python
-u -c 'import setuptools, tokenize;file='"'"'/private/var/folders/9t/0qgpwgy906z_sww71dnkgkr80000gn/T/pip-install-7hmlhuo6/httptools/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
/private/var/folders/9t/0qgpwgy906z_sww71dnkgkr80000gn/T/pip-wheel-u02mzs5m
--python-tag cp36: ERROR: running bdist_wheel
error: command 'gcc' failed with exit status 1
---------------------------------------- ERROR: Failed building wheel for httptools Running setup.py clean for httptools Building
wheel for ujson (setup.py) ... error
$ pip install -e .
Obtaining file:///Users/mohit/work/research/NLP/Rasa/rasa_nlu ERROR:
Error installing
'file:///Users/mohit/work/research/NLP/Rasa/rasa_nlu': editable mode
is not supported for pyproject.toml-style projects. pip is processing
this project as pyproject.toml-style because it has a pyproject.toml
file. Since the project has a setup.py and the pyproject.toml has no
"build-backend" key for the "build_system" value, you may pass
--no-use-pep517 to opt out of pyproject.toml-style processing. See PEP 517 for details on pyproject.toml-style projects.
OS : Mac OS High Sierra
Python 3.6.8 :: Anaconda custom (64-bit)
pip 19.1

That's was actually in issue in pip (https://github.com/pypa/pip/issues/6375).
Please install using pip install --no-use-pep517 -e . or upgrade pip to the latest version.

check for visual studio, redists, vc++ and allied syncing up

Related

error installing guidedlda on google colab notebook

I was trying to install guidedlda on google colab notebook but it keeps giving me errors the following code i have used so far.
!pip install guidedlda
pip install guidedlda
https://github.com/vi3k6i5/GuidedLDA
cd GuidedLDA
sh build_dist.sh
python setup.py sdist
pip install -e
I kept getting the following error. If someone knows how to fix this on google colab please let me know
Collecting guidedlda Using cached
https://files.pythonhosted.org/packages/f8/ee/6d6e2b3525388399e12a4482554c7529a5fcf5e99c50a60abaa02894b8bf/guidedlda-2.0.0.dev22.tar.gz
Requirement already satisfied: numpy in
/usr/local/lib/python3.7/dist-packages (from guidedlda) (1.19.5)
Building wheels for collected packages: guidedlda Building wheel for
guidedlda (setup.py) ... error ERROR: Failed building wheel for
guidedlda Running setup.py clean for guidedlda Failed to build
guidedlda Installing collected packages: guidedlda
Running setup.py install for guidedlda ... error ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys,
setuptools, tokenize; sys.argv[0] =
'"'"'/tmp/pip-install-1u3r_cht/guidedlda/setup.py'"'"';
file='"'"'/tmp/pip-install-1u3r_cht/guidedlda/setup.py'"'"';f=getattr(tokenize,
'"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"',
'"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))'
install --record /tmp/pip-record-wpryz4pa/install-record.txt
--single-version-externally-managed --compile Check the logs for full command output.
You probably saw this, but just in case : https://guidedlda.readthedocs.io/en/latest/
If pip install doesn’t work then try the next step.
https://github.com/vi3k6i5/GuidedLDA
cd GuidedLDA
sh build_dist.sh
python setup.py sdist
pip install -e .

How to install psycopg2 on Python 3.9 on Windows?

I have been trying to install psycopg2 (pip install psycopg2), but I keep getting this error.
I have also tried with: pip install psycopg2-binary but I'm getting the same error.
Here is the error message:
ERROR: Command errored out with exit status 1:
command: 'c:\users\viktor\pycharmprojects\wemport\venv\scripts\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Viktor\\AppData\\Local\\Temp\\pip-install-015ceiei\\psycop
g2\\setup.py'"'"'; __file__='"'"'C:\\Users\\Viktor\\AppData\\Local\\Temp\\pip-install-015ceiei\\psycopg2\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'
"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\Viktor\AppData\Local\Temp\pip-pip-egg-info-3shb13sl'
cwd: C:\Users\Viktor\AppData\Local\Temp\pip-install-015ceiei\psycopg2\
Complete output (23 lines):
running egg_info
creating C:\Users\Viktor\AppData\Local\Temp\pip-pip-egg-info-3shb13sl\psycopg2.egg-info
writing C:\Users\Viktor\AppData\Local\Temp\pip-pip-egg-info-3shb13sl\psycopg2.egg-info\PKG-INFO
writing dependency_links to C:\Users\Viktor\AppData\Local\Temp\pip-pip-egg-info-3shb13sl\psycopg2.egg-info\dependency_links.txt
writing top-level names to C:\Users\Viktor\AppData\Local\Temp\pip-pip-egg-info-3shb13sl\psycopg2.egg-info\top_level.txt
writing manifest file 'C:\Users\Viktor\AppData\Local\Temp\pip-pip-egg-info-3shb13sl\psycopg2.egg-info\SOURCES.txt'
Error: pg_config executable not found.
pg_config is required to build psycopg2 from source. Please add the directory
containing pg_config to the $PATH or specify the full executable path with the
option:
python setup.py build_ext --pg-config /path/to/pg_config build ...
or with the pg_config option in 'setup.cfg'.
If you prefer to avoid building psycopg2 from source, please install the PyPI
'psycopg2-binary' package instead.
For further information please check the 'doc/src/install.rst' file (also at
<https://www.psycopg.org/docs/install.html>).
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
How to fix that?
The following will install prebuilt binaries for windows. It's worked for me on 3.9. You can uninstall pipwin after install psycopg2.
pip install pipwin
pipwin install psycopg2
Optional after psycopg2 installed:
pip uninstall pipwin
if u use linux
You need to make sure that you install wheel model
and Try that
sudo ./venv/bin/python -m pip install wheel
after that install psycopg2 and psycopg2-binary
sudo ./venv/bin/python -m pip install psycopg2
sudo ./venv/bin/python -m pip install psycopg-binary

installing openbabel with pip for linux in venv

I am trying to install openbabel with pip on a linux computer without root access and also using a virtual environment. I run the following command
pip install openbabel --user --log LOG
and then I get the following error:
Collecting openbabel
Using cached openbabel-2.4.1.tar.gz (74 kB)
Building wheels for collected packages: openbabel
Building wheel for openbabel (setup.py) ... error
ERROR: Failed building wheel for openbabel
Running setup.py clean for openbabel
Failed to build openbabel
Installing collected packages: openbabel
Running setup.py install for openbabel ... error
ERROR: Command errored out with exit status 1: /users/name/env_for_pymatgen/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-b51wnefv/openbabel/setup.py'"'"'; __file__='"'"'/tmp/pip-install-b51wnefv/openbabel/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-4207icvx/install-record.txt --single-version-externally-managed --compile --install-headers /users/name/env_for_pymatgen/include/site/python3.6/openbabel Check the logs for full command output.
The main problems seems to be
Error: SWIG failed. Is Open Babel installed?
You may need to manually specify the location of Open Babel include and library directories. For example:
python setup.py build_ext -I/usr/local/include/openbabel-2.0 -L/usr/local/lib
python setup.py install
I see many people had similar issues with setup.py and they are advised to go to the directory and run the same command again, but I don't know what directory I should go to...
EDIT
Would it work if I download openbabel from github and give the path to it?
From my experience, instead of pip install <package_name>, download a wheel file from here which has python binaries built from source code found on PyPI.
After that, open a terminal where you downloaded .whl files and then type :
pip install nameOfYourFile.whl
in my case it's :
pip install openbabel-3.1.1-cp38-cp38-win32.whl
EDIT: be sure to download a version matching your python version otherwise the package will not install.
EDIT2:
I honestly didn't notice that the answer is focused on Linux, so to answer your question, your most reliable option is to build it from source with the python bindings and swig flags enabled, this can be done by following the compiling instructions.
Those instructions still work for the latest version of openbabel in the GitHub repo as of the date of this edit, and i could successfully compile a working openbabel with the python bindings (pybel) on Ubuntu 21.10.

Python package cx_Oracle==5.1.3 Microsoft Visual C++ 9.0 is required for

Trying to install cx_Oracle==5.1.3 package onto windows 2012 server Through Jenkins. Using python 2.7 with setuptools-41.1.0.dist-info. I have installed Microsoft C++ Compiler for Python 9.0 but pip complains it can't find it
Run the pip install code from the command line and it works. Tried setting various paths, tried calling the C++ environment from Jenkins. Scoured the internet for advice, not getting anywhere :(
call "C:\Users*****\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\vcvarsall.bat" x86_amd64
%WORKON_HOME%\emileTest\Scripts\pip install cx_Oracle==5.1.3
This is the Jenkins error log
Collecting cx_Oracle==5.1.3
Using cached https://files.pythonhosted.org/packages/be/25/afc07a79ed268f6ab2e8959cfcff997504ce09500b881a1d93f92904762e/cx_Oracle-5.1.3.tar.gz
Building wheels for collected packages: cx-Oracle
Building wheel for cx-Oracle (setup.py): started
Building wheel for cx-Oracle (setup.py): finished with status 'error'
ERROR: Command errored out with exit status 1:
command: 'c:\envs\emiletest\scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'c:\windows\temp\pip-install-umf517\cx-Oracle\setup.py'"'"'; file='"'"'c:\windows\temp\pip-install-umf517\cx-Oracle\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:\windows\temp\pip-wheel-kg80iv' --python-tag cp27
cwd: c:\windows\temp\pip-install-umf517\cx-Oracle\
Complete output (5 lines):
running bdist_wheel
running build
running build_ext
building 'cx_Oracle' extension
error: Microsoft Visual C++ 9.0 is required. Get it from http://aka.ms/vcpython27
To avoid this build problem with Jenkins, what I did is install the old cx_Oracle version under the default python site packages. I use virtualenv so I can create a virtual environment and basically tell it to inherit the default python site packages like this:
mkvirtualenv --system-site-packages env_name
So this environment will have access to the default cx_Oracle package. Since the requirement will already be satisfied, pip will not try to install it again when building in Jenkins.
I would love to upgrade a lot of things but it's just not seen as priority as long as everything works.

Error when installing cmake for python windows

I have windows 10 and fresh Python 3.6.1.
I was trying to install package Cmake 0.6.0 (needed for another package, atari-py) using
pip install cmake
but I'm getting an error.
I have these packages installed: pip,scikit-build, setuptools, wheel, pybdist.
I do have a foreign symbol in my account name (lesson learnt), but it works fine when installing other packages. I am not a skilled windows administrator.
Collecting cmake
Using cached cmake-0.6.0.tar.gz
Building wheels for collected packages: cmake
Running setup.py bdist_wheel for cmake: started
Running setup.py bdist_wheel for cmake: finished with status 'error'
Complete output from command C:\Python\Python36-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Čejkis\\AppData\\Local\\Temp\\pycharm-packaging1\\cmake\\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\EJKIS~1\AppData\Local\Temp\tmp3br7eri7pip-wheel- --python-tag cp36:
Traceback (most recent call last):
File "C:\Python\Python36-32\lib\site-packages\skbuild\setuptools_wrap.py", line 405, in setup
cmkr = cmaker.CMaker()
File "C:\Python\Python36-32\lib\site-packages\skbuild\cmaker.py", line 67, in __init__
"Problem with the CMake installation, aborting build.")
Problem with the CMake installation, aborting build.
----------------------------------------
Running setup.py clean for cmake
Failed to build cmake
Installing collected packages: cmake
Running setup.py install for cmake: started
Running setup.py install for cmake: finished with status 'error'
Complete output from command C:\Python\Python36-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Čejkis\\AppData\\Local\\Temp\\pycharm-packaging1\\cmake\\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\EJKIS~1\AppData\Local\Temp\pip-5ql_x35g-record\install-record.txt --single-version-externally-managed --compile:
Traceback (most recent call last):
File "C:\Python\Python36-32\lib\site-packages\skbuild\setuptools_wrap.py", line 405, in setup
cmkr = cmaker.CMaker()
File "C:\Python\Python36-32\lib\site-packages\skbuild\cmaker.py", line 67, in __init__
"Problem with the CMake installation, aborting build.")
Problem with the CMake installation, aborting build.
----------------------------------------
Failed building wheel for cmake
Command "C:\Python\Python36-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Čejkis\\AppData\\Local\\Temp\\pycharm-packaging1\\cmake\\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\EJKIS~1\AppData\Local\Temp\pip-5ql_x35g-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\Čejkis\AppData\Local\Temp\pycharm-packaging1\cmake\
python -m pip install --upgrade pip
and then you can run
pip3 install cmake
This works for me on Pyhton 3.8
if the above answers of pip3 or pip install cmake don't work try
sudo apt-get install cmake
As of today, CMake wheels for python 3.6 are available and pip install cmake is expected to work.
Background
At the time of your first post, there were no wheels for python 3.6, pip was rightfully trying to build the wheel using the source distribution.
Considering that:
the project allowing to generate a CMake wheel itself depends on scikit-build and cmake
we simply repackage the existing binaries into the windows wheels
... you got the general error message Problem with the CMake installation, aborting build.
References:
http://cmake-python-distributions.readthedocs.io
http://scikit-build.readthedocs.io/
Installing atari-py on windows
Looking at the documentation and open pull requests of the corresponding project, it look like windows is not supported. See https://github.com/openai/atari-py
If you would like to help the project and improve their windows support, let me know and I could try to give you some guidance to create a pull request and simplify their build system.
Eventually I installed cmake 0.8 from a binary file from their webpage.
I originally wanted to install package atari-py that needed cmake. I downloaded that from git and in cmd with administrator rights I ran
python install setup.py
which worked.
python setup.py install
still didn't work. Unfortunately I can't give any further explanation.
I just downloaded VS Code with C++ libraries and that did the trick, I was able to install CMake. (I was on Windows 10 btw)

Categories

Resources