Running into error with Glassdoor python package - python

I am trying to emulate the Glassdoor API call that is described on this GitHub repository. Below is the example that was used. Seems pretty straight forward but I am running into issues with the pip command.
pip install glassdoor
from glassdoor import get
x = get('dropbox')
x
When I run this part:
pip install glassdoor
I get the below output/error:
Collecting glassdoor
Downloading glassdoor-0.0.8.tar.gz (5.7 kB)
Requirement already satisfied: requests>=1.1.0 in c:\users\<user>\anaconda3\lib\site-packages (from glassdoor) (2.25.1)
Collecting BeautifulSoup>=3.2.1
Using cached BeautifulSoup-3.2.2.tar.gz (32 kB)
Using cached BeautifulSoup-3.2.1.tar.gz (31 kB)
Collecting glassdoor
Downloading glassdoor-0.0.4.tar.gz (5.1 kB)
Downloading glassdoor-0.0.2.tar.gz (3.8 kB)
Downloading glassdoor-0.0.1.tar.gz (3.1 kB)
The conflict is caused by:
glassdoor 0.0.8 depends on BeautifulSoup>=3.2.1
glassdoor 0.0.4 depends on BeautifulSoup>=3.2.1
glassdoor 0.0.2 depends on BeautifulSoup>=3.2.1
glassdoor 0.0.1 depends on BeautifulSoup>=3.2.1
To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict
Note: you may need to restart the kernel to use updated packages.
ERROR: Command errored out with exit status 1:
command: 'c:\Users\<user>\Anaconda3\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\<user>\\AppData\\Local\\Temp\\pip-install-jrj24n8x\\beautifulsoup_d39f5c5ac2e34bec980b5f105aa8db54\\setup.py'"'"'; __file__='"'"'C:\\Users\\<user>\\AppData\\Local\\Temp\\pip-install-jrj24n8x\\beautifulsoup_d39f5c5ac2e34bec980b5f105aa8db54\\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\<user>\AppData\Local\Temp\pip-pip-egg-info-gdpczqw5'
cwd: C:\Users\<user>\AppData\Local\Temp\pip-install-jrj24n8x\beautifulsoup_d39f5c5ac2e34bec980b5f105aa8db54\
Complete output (6 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\<user>\AppData\Local\Temp\pip-install-jrj24n8x\beautifulsoup_d39f5c5ac2e34bec980b5f105aa8db54\setup.py", line 3
"You're trying to run a very old release of Beautiful Soup under Python 3. This will not work."<>"Please use Beautiful Soup 4, available through the pip package 'beautifulsoup4'."
^
SyntaxError: invalid syntax
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/40/f2/6c9f2f3e696ee6a1fb0e4d7850617e224ed2b0b1e872110abffeca2a09d4/BeautifulSoup-3.2.2.tar.gz#sha256=a04169602bff6e3138b1259dbbf491f5a27f9499dea9a8fbafd48843f9d89970 (from https://pypi.org/simple/beautifulsoup/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Command errored out with exit status 1:
command: 'c:\Users\<user>\Anaconda3\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\<user>\\AppData\\Local\\Temp\\pip-install-jrj24n8x\\beautifulsoup_5e37669d18a24e84b464eb7a655a54d7\\setup.py'"'"'; __file__='"'"'C:\\Users\\<user>\\AppData\\Local\\Temp\\pip-install-jrj24n8x\\beautifulsoup_5e37669d18a24e84b464eb7a655a54d7\\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\<user>\AppData\Local\Temp\pip-pip-egg-info-mpb24z6z'
cwd: C:\Users\<user>\AppData\Local\Temp\pip-install-jrj24n8x\beautifulsoup_5e37669d18a24e84b464eb7a655a54d7\
Complete output (6 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\<user>\AppData\Local\Temp\pip-install-jrj24n8x\beautifulsoup_5e37669d18a24e84b464eb7a655a54d7\setup.py", line 22
print "Unit tests have failed!"
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Unit tests have failed!")?
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/1e/ee/295988deca1a5a7accd783d0dfe14524867e31abb05b6c0eeceee49c759d/BeautifulSoup-3.2.1.tar.gz#sha256=6a8cb4401111e011b579c8c52a51cdab970041cc543814bbd9577a4529fe1cdb (from https://pypi.org/simple/beautifulsoup/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Cannot install glassdoor==0.0.1, glassdoor==0.0.2, glassdoor==0.0.4 and glassdoor==0.0.8 because these package versions have conflicting dependencies.
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies
I have tried in both CoLab and Visual Studio Code and get the same error. I have also tried uninstalling both the Glassdoor and the BeautifulSoup4 packages and reinstalling the latest versions to no avail.
Does anyone have any insight on how to fix this?

Related

when I `pip install mmseg`, I got the error 'NameError: name 'reload' is not defined'

However, I got the same problem, when I pip install mmseg. So, what should I do?
The log is like that:
(Monocular3D) root#gpu9:~/MonoRUn$ pip3 install mmseg -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
Looking in indexes: http://pypi.douban.com/simple/
Collecting mmseg
Downloading http://pypi.doubanio.com/packages/f8/31/3bc9205f39cc8ab37193a6fbb24693993b2f305aba9f35b09fad882107ee/mmseg-1.3.0.tar.gz (817 kB)
|████████████████████████████████| 817 kB 4.4 MB/s
ERROR: Command errored out with exit status 1:
command: /home/root/miniconda3/envs/Monocular3D/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-sz89ieuw/mmseg_86227a7da2734023a199ab7a10d06662/setup.py'"'"';
__file__='"'"'/tmp/pip-install-sz89ieuw/mmseg_86227a7da2734023a199ab7a10d06662/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 /tmp/pip-pip-egg-info-20_hddgd
cwd: /tmp/pip-install-sz89ieuw/mmseg_86227a7da2734023a199ab7a10d06662/
Complete output (5 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-sz89ieuw/mmseg_86227a7da2734023a199ab7a10d06662/setup.py", line 6, in <module>
reload(sys)
NameError: name 'reload' is not defined
----------------------------------------
WARNING: Discarding http://pypi.doubanio.com/packages/c9/3a/a38acf3f3ae401082d74cd283d29a873dd3d1b77dc0c7fb28b80f0348073/mmseg-1.2.4.tar.gz#sha256=e7ba753b7bbefe54b4a7c2e27ed6714d1349e30ad6db9d7f67ce67b80b818f4c (from http://pypi.doubanio.com/simple/mmseg/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement mmseg
ERROR: No matching distribution found for mmseg
The following worked for me:
pip install openmim
mim install mmsegmentation
You may try to install the latest package version manually. Something like:
pip install mmseg==1.3.0

Problems with installing plotly on Windows 10 with Python 3.8.5

I am having problems installing plotly on Windows 10 with Python 3.8.5. The command line prompt is in admin mode.
The package manager pip3 here seems to be installing the package retrying-1.3.3 which is running into an error:
ModuleNotFoundError: No module named '_distutils_hack'
Anybody has a solution for this? Greatly appreciate your time. Thanks
C:\ProgramData\Python38\Scripts>pip3 install plotly
Collecting plotly
Using cached plotly-4.14.1-py2.py3-none-any.whl (13.2 MB)
Requirement already satisfied: six in c:\programdata\python38\lib\site-packages (from plotly) (1.15.0)
Collecting retrying>=1.3.3
Using cached retrying-1.3.3.tar.gz (10 kB)
ERROR: Command errored out with exit status 1:
command: 'c:\programdata\python38\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\student\\AppData\\Local\\Temp\\pip-install-2qndeluw\\retrying_de785ef56b9d4150b577dd9f4437e271\\setup.py'"'"'; __file__='"'"'C:\\Users\\student\\AppData\\Local\\Temp\\pip-install-2qndeluw\\retrying_de785ef56b9d4150b577dd9f4437e271\\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\student\AppData\Local\Temp\pip-pip-egg-info-3tjoj6d_'
cwd: C:\Users\student\AppData\Local\Temp\pip-install-2qndeluw\retrying_de785ef56b9d4150b577dd9f4437e271\
Complete output (5 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:\programdata\python38\lib\site-packages\setuptools\__init__.py", line 8, in <module>
import _distutils_hack.override # noqa: F401
ModuleNotFoundError: No module named '_distutils_hack'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
The problem may be that the version of the 'setuptools' package is too old. I just updated it when I encountered this problem before.
pip install --upgrade setuptools

Parsing PDF to CSV

I have a PDF which contains a table that I would like to get into Excel. I found pdftables (a Python library) which may be able to do the job but I am having a problem installing the library. I am running Python 3.7.4 with Anaconda. When I try to install using pip, I get an error. Can anyone either tell me how to install the library or suggest another way to parse the table?
pip install pdftables
Collecting pdftables
Using cached https://files.pythonhosted.org/packages/5a/68/c587103e6937acd2ac4f07538e8b09d76e75979ffe57ac7bc59f256a79d7/pdftables-0.0.4.tar.gz
Collecting pdfminer==20110515 (from pdftables)
Using cached https://files.pythonhosted.org/packages/ce/f8/512bcd1a116d0332ab9fab84c3771d4699216db1086e120d581535665c31/pdfminer-20110515.tar.gz
ERROR: Command errored out with exit status 1:
command: /Users/ihf/opt/anaconda3/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/y2/38gkkc0s7d52_mr_s6zfj7m80000gq/T/pip-install-_h1bkupj/pdfminer/setup.py'"'"'; file='"'"'/private/var/folders/y2/38gkkc0s7d52_mr_s6zfj7m80000gq/T/pip-install-_h1bkupj/pdfminer/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 pip-egg-info
cwd: /private/var/folders/y2/38gkkc0s7d52_mr_s6zfj7m80000gq/T/pip-install-_h1bkupj/pdfminer/
Complete output (8 lines):
Traceback (most recent call last):
File "", line 1, in
File "/private/var/folders/y2/38gkkc0s7d52_mr_s6zfj7m80000gq/T/pip-install-_h1bkupj/pdfminer/setup.py", line 3, in
from pdfminer import version
File "/private/var/folders/y2/38gkkc0s7d52_mr_s6zfj7m80000gq/T/pip-install-_h1bkupj/pdfminer/pdfminer/init.py", line 4
if name == 'main': print version
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(version)?
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output

How to install Python Catalyst on Python 3.7, getting error?

(catalyst) C:\Users\deliseev\Documents\Pyhon>pip install enigma-catalyst matplotlib
Collecting enigma-catalyst
Using cached enigma-catalyst-0.5.21.tar.gz (767 kB)
Collecting matplotlib
Using cached matplotlib-3.2.1-cp36-cp36m-win_amd64.whl (9.2 MB)
Requirement already satisfied: pip>=7.1.0 in c:\programdata\anaconda3\envs\catalyst\lib\site-packages (from enigma-catalyst) (20.0.2)
Collecting setuptools==38.5.1
Using cached setuptools-38.5.1-py2.py3-none-any.whl (489 kB)
Collecting Logbook==0.12.5
Using cached Logbook-0.12.5.tar.gz (166 kB)
**ERROR: Command errored out with exit status 1:
command: 'C:\ProgramData\Anaconda3\envs\catalyst\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\deliseev\\AppData\\Local\\Temp\\pip-install-3jmpw5h7\\Logbook\\setup.py'"'"'; __file__='"'"'C:\\Users\\deliseev\\AppData\\Local\\Temp\\pip-install-3jmpw5h7\\Logbook\\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\deliseev\AppData\Local\Temp\pip-install-3jmpw5h7\Logbook\pip-egg-info'
cwd: C:\Users\deliseev\AppData\Local\Temp\pip-install-3jmpw5h7\Logbook\
Complete output (5 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\deliseev\AppData\Local\Temp\pip-install-3jmpw5h7\Logbook\setup.py", line 57, in <module>
from setuptools import setup, Extension, Feature
ImportError: cannot import name 'Feature'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.**
as i can see from error, its some issue with setuptools, but is successfully istalled in pevios lines
from setuptools import setup, Extension, Feature
ImportError: cannot import name 'Feature'
(base) C:\Users\deliseev>python --version
Python 3.7.6
Managed to change version of setuptools, the restart
pip3 install setuptools==45
pip install enigma-catalyst matplotlib
The problem was described here
https://github.com/pypa/setuptools/issues/2017

Unable to Install with Pip Due to Outdated beautifulsoup

I'm using Anaconda with Python 3 and am trying to install the package cc, which is a requirement for the uber h3 package.
When trying to install in the anaconda command line via:
pip install cc
I'm getting an error that I'm using an outdated version of beautifulsoup on Python 3 and should use beautifulsoup4 instead. Bs4 IS installed, but it appears the requirements file coming directly to pip selects BeautifulSoup 3.2.1.
How can I override this?
Below is the error I'm getting:
Collecting cc
Using cached https://files.pythonhosted.org/packages/2f/c0/813dd3de3cda756a7ffc17b50779da0c1ea5de74c9df5e1da2856735c940/cc-0.1.tar.gz
Requirement already satisfied: requests>=2.2.1 in c:\programdata\anaconda3\lib\site-packages (from cc) (2.22.0)
Collecting BeautifulSoup>=3.2.1
Using cached https://files.pythonhosted.org/packages/40/f2/6c9f2f3e696ee6a1fb0e4d7850617e224ed2b0b1e872110abffeca2a09d4/BeautifulSoup-3.2.2.tar.gz
ERROR: Command errored out with exit status 1:
command: 'C:\ProgramData\Anaconda3\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\wintch3\\AppData\\Local\\Temp\\pip-install-qgjizksk\\BeautifulSoup\\setup.py'"'"'; __file__='"'"'C:\\Users\\wintch3\\AppData\\Local\\Temp\\pip-install-qgjizksk\\BeautifulSoup\\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\wintch3\AppData\Local\Temp\pip-install-qgjizksk\BeautifulSoup\pip-egg-info'
cwd: C:\Users\wintch3\AppData\Local\Temp\pip-install-qgjizksk\BeautifulSoup\
Complete output (6 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\wintch3\AppData\Local\Temp\pip-install-qgjizksk\BeautifulSoup\setup.py", line 3
"You're trying to run a very old release of Beautiful Soup under Python 3. This will not work."<>"Please use Beautiful Soup 4, available through the pip package 'beautifulsoup4'."
^
SyntaxError: invalid syntax
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Thanks for all and any help!
Let's see: https://pypi.org/project/cc/#history. The only version was 0.1 released in 2016. It requires BeautifulSoup (not BeautifulSoup4).
I very much doubt it's the package that Uber requires. h3 really mentions cc but it's not a Python package — it's a C compiler! You must have gcc or any other C compiler, not that outdated cc from PyPI!

Categories