My problem is:
I am having trouble for installing RDF package. I am using python 3.6.3.
C:\Users\suresh\Downloads>pip --no-cache-dir install RDF
Collecting RDF
Downloading rdf-0.9a6.tar.gz (48kB)
100% |████████████████████████████████| 51kB 749kB/s
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\suresh\AppData\Local\Temp\pip-build-62ewx87w\RDF\setup.py",
line 1, in <module>
from ez_setup import use_setuptools
File "C:\Users\suresh\AppData\Local\Temp\pip-build-62ewx87w\RDF\ez_setup.py",
line 97
except pkg_resources.VersionConflict, e:
^
SyntaxError: invalid syntax
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\suresh\AppData\Local\Temp\pip-build-62ewx87w\RDF\
Any suggestions to solve this problem, so that I can install the RDF package? Please suggest me any solution if you have ever encounter this problem before.
Setup script of RDF package is erroneous. It is specified to work with Python3 but uses the try...catch syntax of Python2. You can either use the package with Python2 or follow up with the developer of RDF package to fix the install issue for Python3. The package is broken for Python3 at the moment.
Related
This question already has an answer here:
Why python executable opens new window instance when function by multiprocessing module is called on windows
(1 answer)
Closed 3 years ago.
I'm new to this. Sorry for the mess.
I've been trying to install PyQtWebEngin, first On zorin os which is dualboot along with Windows10, it failed. Then I decided to install it on Linux Mint on VM inside Windows10. The error result is alway the same.
Here take a look,
poo#poo:~/Downloads$ pip3 install PyQtWebEngine
Collecting PyQtWebEngine
Using cached https://files.pythonhosted.org/packages/71/be/cd5243a456aae37788eebd8333d2326fd830de7ce1f1ac6618e966a66862/PyQtWebEngine-5.14.0-5.14.0-cp35.cp36.cp37.cp38-abi3-manylinux1_x86_64.whl
Collecting PyQt5-sip<13,>=12.7 (from PyQtWebEngine)
Using cached https://files.pythonhosted.org/packages/69/d2/92d85b0865fe68755488a30eec1c2b1b14da6c96c74441dc1c88e0659397/PyQt5_sip-12.7.0-cp36-cp36m-manylinux1_x86_64.whl
Collecting PyQt5>=5.14 (from PyQtWebEngine)
Using cached https://files.pythonhosted.org/packages/3a/fb/eb51731f2dc7c22d8e1a63ba88fb702727b324c6352183a32f27f73b8116/PyQt5-5.14.1.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python3.6/tokenize.py", line 452, in open
buffer = _builtin_open(filename, 'rb')
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pip-build-3tqr21z4/PyQt5/setup.py'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-3tqr21z4/PyQt5/
Can you guys help me out.
Thanks in advance.
Your pip seems to be trying to use a source distribution of PyQt5 for installation, but it seems that setup.py is missing from the .tar.gz on pypi, which is odd.
According to the docs installing from source is not recommended anyway
However using pip to install from the source package is not recommended
I do not know why your pip chose to download the .tar.gz in the first place. Looking at the other whl files from you log with cp36-cp36m-manylinux1_x86_64.whl, there is a PyQt5-5.14.1-5.14.0-cp35.cp36.cp37.cp38-abi3-manylinux2014_x86_64.whl on pypi that should be compatible with your system and should be the first choice of pip for downloading.
You can try to do it manually:
wget https://files.pythonhosted.org/packages/ea/9d/d609aab4111d9d74857fb73067f7de4ca38fc1f7fff87ceba092681754cf/PyQt5-5.14.1-5.14.0-cp35.cp36.cp37.cp38-abi3-manylinux2014_x86_64.whl
pip install PyQt5-5.14.1-5.14.0-cp35.cp36.cp37.cp38-abi3-manylinux2014_x86_64.whl
And then try your installation again
I'm trying to send Gmail through python3. I can use the email and smptlib, but I wanted to try out pyzmail.
However, when I try to install pyzmail, I get this:
$ pip3 install pyzmail
Collecting pyzmail
Using cached https://files.pythonhosted.org/packages/23/9a/c8709821fa15cec44f825fba884284b261a06d8a0033a16f4c35470eb26a/pyzmail-1.0.3.tar.gz
Collecting distribute (from pyzmail)
Using cached https://files.pythonhosted.org/packages/5f/ad/1fde06877a8d7d5c9b60eff7de2d452f639916ae1d48f0b8f97bf97e570a/distribute-0.7.3.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/8r/50c4fq6j70q0qmhvwxvr00fw0000gn/T/pip-install-v4ervkb7/distribute/setuptools/__init__.py", line 2, in <module>
from setuptools.extension import Extension, Library
File "/private/var/folders/8r/50c4fq6j70q0qmhvwxvr00fw0000gn/T/pip-install-v4ervkb7/distribute/setuptools/extension.py", line 5, in <module>
from setuptools.dist import _get_unpatched
File "/private/var/folders/8r/50c4fq6j70q0qmhvwxvr00fw0000gn/T/pip-install-v4ervkb7/distribute/setuptools/dist.py", line 7, in <module>
from setuptools.command.install import install
File "/private/var/folders/8r/50c4fq6j70q0qmhvwxvr00fw0000gn/T/pip-install-v4ervkb7/distribute/setuptools/command/__init__.py", line 8, in <module>
from setuptools.command import install_scripts
File "/private/var/folders/8r/50c4fq6j70q0qmhvwxvr00fw0000gn/T/pip-install-v4ervkb7/distribute/setuptools/command/install_scripts.py", line 3, in <module>
from pkg_resources import Distribution, PathMetadata, ensure_directory
File "/private/var/folders/8r/50c4fq6j70q0qmhvwxvr00fw0000gn/T/pip-install-v4ervkb7/distribute/pkg_resources.py", line 1518, in <module>
register_loader_type(importlib_bootstrap.SourceFileLoader, DefaultProvider)
AttributeError: module 'importlib._bootstrap' has no attribute 'SourceFileLoader'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/8r/50c4fq6j70q0qmhvwxvr00fw0000gn/T/pip-install-v4ervkb7/distribute/
I tested installing a different pip module but everything seemed to be in order.
I also tried easy_install but it installed for python 2.7, and not 3.
I think it might be something about my setuptools, but I don't know what needs to be done.
The pyzmail packages seems to be inactive now as the last commit and the last release were made 4 years ago. It does not seem to be updated for Python 3.6+.
There was an issue posted on the package's github page with the same error as yours: https://github.com/aspineux/pyzmail/issues/15. Someone posted a patch as a workaround but the best solution is to use pyzmail36 instead:
Tagging #cfenollosa #GheloAce in case you're still using this library
and are looking for a more maintainable way forward.
This repository unfortunately seems inactive, so I created a new
package on PyPI that includes all the fixes to make pyzmail
pip-installable on Python 3.6.
The name of the new package is pyzmail36. You can just update your
requirements.txt file to list pyzmail36 instead of pyzmail and all of
the rest of your code shouldn't need to change.
So just try with:
pip3 install pyzmail36
There are several ways to install pyzmail such as:
Try to use " pip install pyzmail36" by installing Python 3.6 first on your device.
Try to update the setup-tools by typing "pip install setuptools==20.1.1" and then install pyzmail.
Try to search for easy_install on Python 3.x, I have found several links for that.
Good luck.
Trying to install python-escpos library. The instructions say the following:
Ensure the library is installed on ${lib_arch}/${python_ver}/site-packages/escpos
On CLi you must run:
python setup.py build
sudo python setup.py install
What does ${lib_arch}/${python_ver}/ mean? Is it the path such as
\Users\RickT\AppData\Local\Programs\Python\Python36-32\Lib\site-packages\escpos?
When I run python setup.py build, I get the following error:
C:\Users\RickT\AppData\Local\Programs\Python\Python36-32\lib\distutils\dist.py:261: UserWarning: Unknown distribution option: 'bugtrack_url' warnings.warn(msg)Traceback (most recent call last):
File "setup.py", line 140, in <module> 'python-escpos = escpos.cli:main'
As I wrote in the comments you should write which version of the documentation you are using and which version of the codebase you are using.
The "error" considering the bugtrack_url is just a warning because setuptools does not know this token. This should not affect your setup in any way. You probably installed it successfully.
Concerning your question about the path: ${lib_arch}/${python_ver}/site-packages/escpos is more or less non-sense in a Windows-context. This just means your location of the site-packages-directory. So, your assumption is right.
All in all the probably easiest solution for you would be installing with pip. This would simply be - considering you have a working pip - a one-liner:
pip install python-escpos
I have a bug (ussue #14 on github) in my python project rma. Installing it trow pip 1.5.4 with python 3.4 some got error like this:
Downloading/unpacking rma
Downloading rma-0.1.5.tar.gz
Running setup.py (path:/tmp/pip_build_root/rma/setup.py) egg_info for package rma
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/tmp/pip_build_root/rma/setup.py", line 47
setup(**sdict, install_requires=['redis', 'tabulate', 'tqdm', 'msgpack-python'])
^
SyntaxError: invalid syntax
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/tmp/pip_build_root/rma/setup.py", line 47
setup(**sdict, install_requires=['redis', 'tabulate', 'tqdm', 'msgpack-python'])
^
SyntaxError: invalid syntax
----------------------------------------
My own pip version 8.0.2 (python is 3.5).
I newby in python, sorry if this well known issue. I want to know - should i found way to fix it (if this is my issue) or just recommend to update pip to my user?
That package won't install on any Python version < 3.5, because the syntax is indeed invalid on anything but Python 3.5 and newer.
You can't put the **kwargs syntax in front of other keyword arguments. The two should be swapped:
setup(install_requires=['redis', 'tabulate', 'tqdm', 'msgpack-python'], **sdict)
Reporting this as a bug was the correct thing to do; the package states it supports Python 3.4 and up.
Python 3.5 added support for an arbitrary number of *args and **kwargs expansions through PEP 448, opening the door for the above to work too.
Does unirest support python3? I have googled and zero information comes up. Even in the unirest documentation it does not say it is 2.x only which leads me to believe it supports both 3.x and 2.x. However the install fails with 3.4 and succeeds with 2.7. See below.
nkltss:~/dev$ mkvirtualenv mashape -p /usr/bin/python3
Running virtualenv with interpreter /usr/bin/python3
Using base prefix '/usr'
New python executable in mashape/bin/python3
Also creating executable in mashape/bin/python
Installing setuptools, pip...done.
(mashape)nkltss:~/dev$ pip install unirest
Downloading/unpacking unirest
Downloading Unirest-1.1.6.tar.gz
Running setup.py (path:/home/nick/.virtualenvs/mashape/build/unirest/setup.py) egg_info for package unirest
warning: no files found matching '*.txt' under directory 'docs'
Downloading/unpacking poster>=0.8.1 (from unirest)
Downloading poster-0.8.1.tar.gz
Running setup.py (path:/home/nick/.virtualenvs/mashape/build/poster/setup.py) egg_info for package poster
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/home/nick/.virtualenvs/mashape/build/poster/setup.py", line 2, in <module>
import poster
File "/home/nick/.virtualenvs/mashape/build/poster/poster/__init__.py", line 29, in <module>
import poster.streaminghttp
File "/home/nick/.virtualenvs/mashape/build/poster/poster/streaminghttp.py", line 61
print "send:", repr(value)
^
SyntaxError: invalid syntax
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/home/nick/.virtualenvs/mashape/build/poster/setup.py", line 2, in <module>
import poster
File "/home/nick/.virtualenvs/mashape/build/poster/poster/__init__.py", line 29, in <module>
import poster.streaminghttp
File "/home/nick/.virtualenvs/mashape/build/poster/poster/streaminghttp.py", line 61
print "send:", repr(value)
^
SyntaxError: invalid syntax
----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /home/nick/.virtualenvs/mashape/build/poster
Storing debug log for failure in /home/nick/.pip/pip.log
For now I am using 2.7 but I prefer to use 3.x for new projects.
The project is not Python 3 compatible. When the project doesn't explicitly state this (not in the setup.py trove classifiers nor in documentation), you'll have to look at the source code.
There I find:
no use_2to3 use in setup to automatically rewrite code on install
imports for urllib2, a Python 2 only library.
The project depends on the poster library, which is also urllib2 specific.
I'd use the requests library instead. It supports Python 3 out of the box, and apart from asynchronous requests it supports the same feature set (but better as it doesn't have the shortcomings urllib2 brings along). For asynchronous requests, you can add on requests-futures.