I was trying to install eel using pip install eel but I get an error of
C:\Users\USER>pip install eel
Collecting eel
Using cached Eel-0.7.0.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:\users\user\appdata\local\temp\pip-build-aa7ptb\eel\setup.py", line 14, in <module>
long_description=open('README.md', encoding='utf-8').readlines()[1],
TypeError: 'encoding' is an invalid keyword argument for this function
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in c:\users\user\appdata\local\temp\pip-build-aa7ptb\eel\
I tried using pip install --upgrade setuptools but still doesnt work.
using python 2.7
The open function in Python 2.7 has a different signature and especially no keyword argument called encoding, as you can read from the error message.
Eel seems to no support Python 2.7 (you should go with Python 3 anyways ;)
open in Python 2.7: https://docs.python.org/2/library/functions.html#open
open in Python 3.6: https://docs.python.org/3/library/functions.html#open
Related
I needed a simple hash function for passwords and thought I could use hashlib. PyCharm suggested to install it by running pip install hashLib.
But now PyCharm is complaining about a syntax error in the library:
Collecting hashLib
Using cached https://files.pythonhosted.org/packages/74/bb/9003d081345e9f0451884146e9ea2cff6e4cc4deac9ffd4a9ee98b318a49/hashlib-20081119.zip
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/6_/8g1vyy5n1t1859x2d30ssk480000gn/T/pycharm-packaging/hashLib/setup.py", line 68
print "unknown OS, please update setup.py"
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("unknown OS, please update setup.py")?
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/6_/8g1vyy5n1t1859x2d30ssk480000gn/T/pycharm-packaging/hashLib/
It suggests that it may be a problem related to the Python version I am using (I tried with Python 2.7 and Python 3.8, but none of them worked).
Make sure that you use a version of Python supported by this package.
Currently you are using Python 3.8.
hashlib is in the standard library now. That means you don't need to install it, it's there already with your Python installation.
The one you tried to install from PyPI is for very old versions of Python (<= 2.4).
I have been trying to install gearman on python 3.6 but I'm getting this error:
$ pip install gearman
Collecting gearman
Using cached gearman-2.0.2.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-xmf1cqe7/gearman/setup.py", line 5, in <module>
from gearman import __version__ as version
File "/tmp/pip-build-xmf1cqe7/gearman/gearman/__init__.py", line 7, in <module>
from gearman.admin_client import GearmanAdminClient
File "/tmp/pip-build-xmf1cqe7/gearman/gearman/admin_client.py", line 4, in <module>
from gearman import util
File "/tmp/pip-build-xmf1cqe7/gearman/gearman/util.py", line 62
except select_lib.error, exc:
^
SyntaxError: invalid syntax
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-xmf1cqe7/gearman/
I am using Ubuntu 16.04 LTS
pip -V -> pip 9.0.1 from [my_project_folder]/venv/lib/python3.6/site-packages (python 3.6)
python --version -> Python 3.6.2
How do I fix that?
The gearman package does not support Python 3. Only python 2.4-2.7 are supported according to their setup.py. There is an open pull request to add python 3 support but it has been untouched for a year. I believe that Yelp! may have stopped supporting this library.
You use python3 and in python3
Use as instead:the raise syntax no longer accepts comma-separated arguments.
The gearman is not the Python 3 version, you can check the link https://pypi.python.org/pypi/gearman
I try to install local instance of Read the Docs on my Win10
When I follow this documentation:
http://docs.readthedocs.io/en/latest/install.html
and type:
pip install -r requirements.txt
I get this error:
Collecting Distutils2==1.0a3 (from -r requirements/pip.txt (line 65))
Using cached Distutils2-1.0a3.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\USER\AppData\Local\Temp\pip-build-xseiavup\Distutils2\setup.py", line 9, in <module>
from distutils2.util import find_packages
File "C:\Users\USER\AppData\Local\Temp\pip-build-xseiavup\Distutils2\distutils2\util.py", line 174
except KeyError, var:
^
SyntaxError: invalid syntax
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\USER\AppData\Local\Temp\pip-build-xseiavup\Distutils2\
Anyone know this error?
My pip version: 8.1.2;
python: 3.5
Is it possible you are running the Python 2 pip? The error message clearly indicates that the code is being executed under Python 3 but has Python 2 syntax. Do you get better results with
python -m pip install -r requirements.txt
I wonder? If not then verify that
python
runs version 3.5 ...
Oh. I just checked and the disutils2 page on PyPI says
Distutils2 development is stopped.
tl;dr: keep using setuptools and pip for now, don’t use distutils2.
It looks like there was never a Python 3 version. Looks like you might need to update your code.
I'm trying to install BeautifulSoup package through PyCharm, I have also tried to download it through the command line. But I just cannot seem to get to it to run on PyCharm. I keep getting the following error
Collecting BeautifulSoup
Using cached BeautifulSoup-3.2.1.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Hemesh\AppData\Local\Temp\pycharm-packaging\BeautifulSoup\setup.py", line 22
print "Unit tests have failed!"
^
SyntaxError: Missing parentheses in call to 'print'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\Hemesh\AppData\Local\Temp\pycharm-packaging\BeautifulSoup\
You are using pip version 8.1.1, however version 8.1.2 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
Can anyone help?
thanks in advance
Are you used to using Python 2.7? It seems to be asking for Python 3.X syntax for your print statement, so it might be an issue with the versions you're trying to use?
BeautifulSoup 3.2.1 only works with Python 2.7 (and is obsolete), if you get BeautifulSoup 4, it should work with both versions.
I'm trying to install pystashop module.
I have a Python 3.4 installed on Windows 7 64 bits.
When I try pip install pystashop I get this error:
Collecting pystashop
Downloading pystashop-0.4.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 20, in <module>
File "C:\Users\Me\AppData\Local\Temp\pip-build-zyt3yyca\pystashop\setup.py", line 12, in <module>
execfile(os.path.join('pystashop', 'version.py'))
NameError: name 'execfile' is not defined
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\Me\AppData\Local\Temp\pip-build-zyt3yyca\pystashop
how can I solve this?
ADD:
I tryed to install and run 'python ez_setup.py' and after run 'easy_install pip' but with no success. Still getting the same error.
execfile is a standard library builtin in Python 2. It was removed in Python 3, which means that pystashop does not support Python 3. You should try contacting the developer(s) and request Python 3 support, and in the meantime see if you can get by with Python 2.
You can attempt to remedy the situation yourself by cloning the GitHub repo, making changes, and installing with python3 setup.py install, but there's no guarantee that it will work properly. The offending code seems to be here:
execfile(os.path.join('pystashop', 'version.py'))
You can replace this with the following:
exec(open(os.path.join('pystashop','version.py')).read())
This will provide the expected functionality. From a cursory glance over the code, everything else appears to be compatible with Python 3, though I may have missed something.