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 .
Related
I am trying to install numba in python however it gives me this error down below, how would I be able to fix it. I am using a 64 bit windows 10 system and using python 3.9. It gives me a wheel error even though I have installed wheel using pip.
CMD Error:
Building wheel for numba (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'c:\python\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\maste\\AppData\\Local\\Temp\\pip-install-4uo3q6pv\\numba_24f4c114cf4a4628ab2eab71e4fa46a4\\setup.py'"'"'; __file__='"'"'C:\\Users\\maste\\AppData\\Local\\Temp\\pip-install-4uo3q6pv\\numba_24f4c114cf4a4628ab2eab71e4fa46a4\\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\maste\AppData\Local\Temp\pip-wheel-ttxzbc1n'
cwd: C:\Users\maste\AppData\Local\Temp\pip-install-4uo3q6pv\numba_24f4c114cf4a4628ab2eab71e4fa46a4\
Running setup.py clean for numba
Building wheel for llvmlite (setup.py) ... error
Running setup.py clean for llvmlite
Failed to build numba llvmlite
Installing collected packages: llvmlite, numba
Running setup.py install for llvmlite ... error
You can download numba whl file form here for python3.9.
Then use pip install path/numba-0.51.2-cp39-cp39-win_amd64.whl.
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.
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
I tried to run pip install flask on Arch Linux and I get the following error:
Collecting itsdangerous>=0.24 (from flask)
Using cached https://files.pythonhosted.org/packages/dc/b4/a60bcdba945c00f6d608d8975131ab3f25b22f2bcfe1dab221165194b2d4/itsdangerous-0.24.tar.gz
Collecting MarkupSafe>=0.23 (from Jinja2>=2.10->flask)
Using cached https://files.pythonhosted.org/packages/4d/de/32d741db316d8fdb7680822dd37001ef7a448255de9699ab4bfcbdf4172b/MarkupSafe-1.0.tar.gz
Installing collected packages: Werkzeug, click, MarkupSafe, Jinja2, itsdangerous, flask
Running setup.py install for MarkupSafe ... done
Running setup.py install for itsdangerous ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-9u23zlnf/itsdangerous/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-r51zrnnv-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib
copying itsdangerous.py -> build/lib
running install_lib
copying build/lib/itsdangerous.py -> /usr/lib/python3.6/site-packages
byte-compiling /usr/lib/python3.6/site-packages/itsdangerous.py to itsdangerous.cpython-36.pyc
error: [Errno 13] Permission denied: '/usr/lib/python3.6/site-packages/__pycache__/itsdangerous.cpython-36.pyc.140591598548528'
----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-9u23zlnf/itsdangerous/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-r51zrnnv-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-9u23zlnf/itsdangerous/
You are using pip version 9.0.1, however version 10.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.`
What does this error mean?
Use
pip install --user flask
instead.
You are getting a Permission Denied error which means that you don't have access to write to a specific location.
When you are using pip install flask, pip will try to install the package flask somewhere in /usr/lib/python3.6/../. This directory requires root access something you don't have at the time you were running pip install flask.
By using the --user flag, you are telling pip to install the package to your home directory which does not require root permissions.
It's always a good practice to install Python packages using the --user flag because you are not installing that package system-wide. When you use sudo pip install package_name then you are installing/upgrading a package (with dependencies) system-wide. Python in some systems power-up critical system components, forcing the system to install a new version of a package might break some critical system component. Usually, systems are stuck to a specific package version just to support backwards-compatibility, you might break this if you try to install it as a sudo.
ERROR: Can not perform a '--user' install. User site-packages are not visible in this virtualenv.
I need to install dryscrape for python but I got error, what's the problem?
C:\Users\parvij\Anaconda3\Scripts>pip install dryscrape
I got this:
Collecting dryscrape
Collecting webkit-server>=1.0 (from dryscrape)
Using cached webkit-server-1.0.tar.gz
Collecting xvfbwrapper (from dryscrape)
Requirement already satisfied (use --upgrade to upgrade): lxml in c:\users\parvij\anaconda3\lib\site-packages (from dryscrape)
Building wheels for collected packages: webkit-server
Running setup.py bdist_wheel for webkit-server ... error
Complete output from command c:\users\parvij\anaconda3\python.exe -u -c"import setuptools,tokenize;__file__='C:\\Users\\parvij\\AppData\\Local\\Temp\\pip-build-o7nlv0dz\\webkit-server\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d C:\Users\parvij\AppData\Local\Temp\tmp71w59qv6pip-wheel- --python-tag cp35:
running bdist_wheel
running build
'make' is not recognized as an internal or external command,
operable program or batch file.
error: [Errno 2] No such file or directory: 'src/webkit_server'
----------------------------------------
Failed building wheel for webkit-server
Running setup.py clean for webkit-server
Failed to build webkit-server
Installing collected packages: webkit-server, xvfbwrapper, dryscrape
Running setup.py install for webkit-server ... error
Complete output from command c:\users\parvij\anaconda3\python.exe -u -c"import setuptools,tokenize;__file__='C:\\Users\\parvij\\AppData\\Local\\Temp\\pip-build-o7nlv0dz\\webkit-server\\setup.py';exec(compile(getattr(tokenize, 'open',open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\parvij\AppData\Local\Temp\pip-tyzalid7-record\install-record.txt --single-version-externally-managed --compile:
running install
running build
'make' is not recognized as an internal or external command,
operable program or batch file.
error: [Errno 2] No such file or directory: 'src/webkit_server'
----------------------------------------
Command "c:\users\parvij\anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\parvij\\AppData\\Local\\Temp\\pip-build-o7nlv0dz\\webkit-server\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\parvij\AppData\Local\Temp\pip-tyzalid7-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\parvij\AppData\Local\Temp\pip-build-o7nlv0dz\webkit-server\
my operating system is windows 8
my python version is 3.5
Download webkit-server from github
git clone https://github.com/niklasb/webkit-server.git webkit-server
Change in webkit-server/setup.py :
shutil.copy('src/webkit_server', self.build_purelib)
shutil.copy('src/webkit_server', self.build_platlib)
to
shutil.copy('src/webkit_server.pro', self.build_purelib)
shutil.copy('src/webkit_server.pro', self.build_platlib)
then
cd webkit-server
python setup.py install
There you go.
Need to install http://www.qt.io. Also, The 5.6+ version of Qt removes the Qt WebKit module in favor of the new module Qt WebEngine. So far, webkit-server has not been ported to WebEngine (and likely won't be in the near future), so Qt <= 5.5 is a requirement.
From the doc, you have to installed also requirements.
You can do this as follow
pip install -r requirements.txt
After this retry to install dryscrape.
Need do install qt4 and libqtwebkit-dev for compile webkit-server, then follow the steps of #Erwan Clügairtz
sudo apt install libqtwebkit-dev qt4