python-escpos windows giving "bugtrack_url" error - python-3.x

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

Related

Why did my pip download both the newest and the older version?

This is my first time to develop a PyPI package and ask a question on StackOverflow...
I'm developing a package named tttk. After I uploaded v1.0.0 and tried to install it, pip told me there's an error in setup.py. Then I changed setup.py, and rebuild, upload v1.0.1. When I try to install it again, the error appears again. I read everything in cmd, then I found that pip downloaded the package of v1.0.0 after it runs the setup.py of v1.0.1.
here's the screenshot of cmd when I tried to install v1.0.1.
I'm just trying to install tttk (the package I uploaded). Why is it soooo hard!?
I retried like this:pip install -v -v -v tttk...
here's everything I found that might be useful:
Skipping link: not a file: https://pypi.org/simple/tkinter/
Given no hashes to check 0 links for project 'tkinter': discarding no candidates
Created temporary directory: C:\Users\Len\AppData\Local\Temp\pip-unpack-sdbco3t1
Looking up "https://files.pythonhosted.org/packages/78/e2/748aaa5d447f3ff3b0e997cbafd8b0f8cead796b059b92514c83d6411f07/tttk-1.0.0.tar.gz" in the cache
Current age based on date: 4074
Ignoring unknown cache-control directive: immutable
Freshness lifetime from max-age: 365000000
The response is "fresh", returning cached response
365000000 > 4074
Using cached tttk-1.0.0.tar.gz (16 kB)
Added tttk from https://files.pythonhosted.org/packages/78/e2/748aaa5d447f3ff3b0e997cbafd8b0f8cead796b059b92514c83d6411f07/tttk-1.0.0.tar.gz to build tracker 'C:\\Users\\Len\\AppData\\Local\\Temp\\pip-build-tracker-6md7cbrk'
Running setup.py (path:C:\Users\Len\AppData\Local\Temp\pip-install-7f41cz28\tttk_c1fc2afbed064900bbc613a248233cca\setup.py) egg_info for package tttk
Created temporary directory: C:\Users\Len\AppData\Local\Temp\pip-pip-egg-info-3e78aanv
Running command python setup.py egg_info
Traceback (most recent call last):
File "<string>", line 36, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "C:\Users\Len\AppData\Local\Temp\pip-install-7f41cz28\tttk_c1fc2afbed064900bbc613a248233cca\setup.py", line 4, in <module>
with open("./README.md", "r",encoding='utf-8') as fh:
FileNotFoundError: [Errno 2] No such file or directory: './README.md'
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
full command: 'D:\Python37\python.exe' -c '
exec(compile('"'"''"'"''"'"'
# This is <pip-setuptools-caller> -- a caller that pip uses to run setup.py
...
SOLVED
First, thanks to every reply...
I'm not an English speaker, and I wrote this without any help from translation software, so if you can't understand what I'm talking about, just read the last paragraph to find out the main reason and how did it caused the problem...
Maybe I forgot to write this in my question. In fact, I have already fixed the README.MD not found problem in v1.0.1 (and newer), but v1.0.0 still has this bug. pip downloaded both v1.0.1 and 1.0.0 so this error appears again.
The output in my question is just a part of all of them...
I went to pypi.org and yank every older versions (v1.0.0 and v0.1.0), then retried, and seems pip couldn't find tkinter. And here's what I've got:
screenshot again
The main reason of this problem is I wrote tkinter in requirements.txt (remember this is my first time to develop a PyPI package). pip couldn't found tkinter on its server ,so it tried to install the older version automatically. But the README file not found problem is still exists in the older version, so that's why it failed...

Python, pymesh install problem on windows10

Hi I'm a Python newbie trying to program python using pymesh library but I cant get it to install properly.
Accordijng to attached image I have installed it, and the package says its for 3.8.x and I have python 3.8.2 installed.
pymesh installation instructions (https://pymesh.readthedocs.io/en/latest/installation.html) say to run a test after installing the package. The test fails.
(work) (base) D:\Downloads\HoleCutter>python -c "import pymesh; pymesh.test()"
Traceback (most recent call last):
File "<string>", line 1, in <module>
AttributeError: module 'pymesh' has no attribute 'test'
I dont have the resources/capability to 'build packages with cmake'
screen snap from command prompt window
The reason is the PyMesh library isn't kept up to date on PIP, instead you have to use Docker or compile it yourself. This problem is covered by the following issue on Github, however no action has been taken for years: https://github.com/PyMesh/PyMesh/issues/94
Have you tried "pip install pymesh" or "pipx.x install pymesh"?
I think the instructions in the link you provided are for Linux and Mac OS. You can look at this link: ImportError: No module named PyMesh

I Tried to Install PyQtWebEngine, Always Stuck on the Same Problem. Couldn't Fine the solution anywhere [duplicate]

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

Cannot install NumPy from a wheel format

I am trying to install NumPy from a wheel (.whl) file. I get the error:
numpy-1.9.1%2Bmkl-cp34-none-win_amd64.whl is not a supported wheel on this platform.
Details:
Windows 8.1 pro x64, elevated command prompt
Python 3.4.2
Package NumPy from Gohlke's site
File numpy-1.9.1%2Bmkl-cp34-none-win_amd64.whl copied in the pip.exe folder
The log file shows:
d:\Program Files\WinPython-64bit-3.4.2.4\python-3.4.2.amd64\Scripts\pip run on 01/23/15 11:55:21
numpy-1.9.1%2Bmkl-cp34-none-win_amd64.whl is not a supported wheel on this platform.
Exception information:
Traceback (most recent call last):
File "D:\Python34\lib\site-packages\pip\basecommand.py", line 122, in main
status = self.run(options, args)
File "D:\Python34\lib\site-packages\pip\commands\install.py", line 257, in run
InstallRequirement.from_line(name, None))
File "D:\Python34\lib\site-packages\pip\req.py", line 167, in from_line
raise UnsupportedWheel("%s is not a supported wheel on this platform." % wheel.filename)
pip.exceptions.UnsupportedWheel: numpy-1.9.1%2Bmkl-cp34-none-win_amd64.whl is not a supported wheel on this platform.
What is wrong?
Short answer: rename the file to numpy-1.9.1%2Bmkl-cp34-none-win32.whl to install it.
You can check what tags your pip tool accepts for installation by running:
import pip; print(pip.pep425tags.get_supported())
In this case pip is incorrectly detecting your operating system to be 32-bits and the file you're trying to install was win_amd64 in its filename.
If you rename the file to numpy-1.9.1%2Bmkl-cp34-none-win32.whl (which now contains the tags that are considered supported) then you can install the package. It's a trick because the file is still built for 64-bits but this allows you to install the package as intended.
After several tests I think the problem is "win32" or "amd64" itself. I tried replacing those two with "any" and it worked.
In my case, the workaround to install gohlke packages on Python (3.4.4 (AMD64)) was to change the "cp34m" part rather than the "win*" parts in previous answers:
python -c "import pip; print(pip.pep425tags.get_supported())":
[('cp34', 'none', 'win_amd64'), ('py3', 'none', 'win_amd64'),
('cp34', 'none', 'any'), ...
ls -ld *:
matplotlib-2.0.0b3-cp34-cp34m-win_amd64.whl
numpy-1.11.1+mkl-cp34-cp34m-win_amd64.whl
pandas-0.18.1-cp34-cp34m-win_amd64.whl
Change the above names to:
matplotlib-2.0.0b3-cp34-none-win_amd64.whl
numpy-1.11.1+mkl-cp34-none-win_amd64.whl
pandas-0.18.1-cp34-none-win_amd64.whl
For example, pip install matplotlib-2.0.0b3-cp34-none-win_amd64.whl
Processing ...
...Successfully installed matplotlib-2.0.0b3
To add to the list of other possible solutions, I had to upgrade pip itself. The latest binary from Gholke's site had the "cp27m" tag, which didn't show up when I checked the pip tags using:
import pip; print(pip.pep425tags.get_supported())
After I upgraded pip, the wheel didn't work, but just doing a regular pip install numpy worked.
If you have, say, Python 3.4 installed, make sure to install the -cp34- version of the wheel and not -cp35-.
The current WinPython package manager need a two-characters fix to accept to recognize the new NumPy + mkl 'wheel'.
https://github.com/stonebig/winpython/commit/5e13230609a2e9f4d66d98c3776207ce4b4dd050
As a workaround, uninstall the NumPy package:
pip uninstall numpy
Then install it again from cache:
pip install numpy
I had the same problem with several packages after upgrading from 3.4.1 to 3.4.2.
Navigate to the directory where your 'pip.py' sits and then type following on the Windows command line:
..\python.exe pip.py install name_of_package.whl
This should work.
I had the same problem and tried to work it out with the suggested solutions.
I changed win64 to win32 and it didn't work either. But then I changed the name to original and this time it worked! The only extra thing I did was to go offline. That's so strange.
This has nothing to do with your operating system. Uninstall Python 32-bit and install Python 64-bit rather or alternatively find a 32-bit wheel file.

Using virtualenv with python3 in openSuSE

I am experiencing a problem when using virtualenv in openSuSE 12.3 with Python3:
I installed the python3 and python3-devel packages.
Then I installed the newest distribute and pip and finally virtualenv using pip.
When I try to create a virtualenv I get the following error:
$ virtualenv-3.3 venv01
Using base prefix '/usr'
New python executable in venv01/bin/python3.3
Also creating executable in venv01/bin/python
Installing distribute.........................................................................................................................................................................................................................................................................................................................................................................................................done.
Installing pip....
Complete output from command /home/user/venv01/bin/python3.3 -x /home/user/venv01/bin/easy_install /usr/local/lib/pytho...ort/pip-1.3.1.tar.gz:
/home/user/venv01/bin/python3.3: can't open file '/home/user/venv01/bin/easy_install': [Errno 2] No such file or directory
----------------------------------------
...Installing pip...done.
Traceback (most recent call last):
File "/usr/local/bin/virtualenv-3.3", line 9, in <module>
load_entry_point('virtualenv==1.9.1', 'console_scripts', 'virtualenv-3.3')()
File "/usr/local/lib/python3.3/site-packages/virtualenv.py", line 979, in main
no_pip=options.no_pip)
File "/usr/local/lib/python3.3/site-packages/virtualenv.py", line 1094, in create_environment
install_pip(py_executable, search_dirs=search_dirs, never_download=never_download)
File "/usr/local/lib/python3.3/site-packages/virtualenv.py", line 667, in install_pip
filter_stdout=_filter_setup)
File "/usr/local/lib/python3.3/site-packages/virtualenv.py", line 1057, in call_subprocess
% (cmd_desc, proc.returncode))
OSError: Command /home/user/venv01/bin/python3.3 -x /home/user/venv01/bin/easy_install /usr/local/lib/pytho...ort/pip-1.3.1.tar.gz failed with error code 2
Running it with -vvv yields some interesting output that shows that distribute
is extracted to <venv>/local/lib/python3.3/site-packages/.
I wonder why distribute is not installed into <venv>/lib/python3.3/site-packages/?
Does anyone have an idea why this happens and how I can use virtualenv in
openSuSE without compiling python3 myself?
[now fixed in latest patches from opensuse]
[oh! i just realised you are the same person as the original link. sorry. but i will leave this as it is a top result for google search on this issue (was searching myself for any update) so it may help others.]
this is a known issue, discussed at https://forums.opensuse.org/english/get-technical-help-here/applications/484475-using-virtualenv-python-3-a.html and with an open bug at https://bugzilla.novell.com/show_bug.cgi?id=809831
the only work-around i know of is to install everything yourself. it's not so hard, and i describe what is necessary at http://www.acooke.org/cute/GettingPyt0.html
basically:
install python 3.3 from source (do an "altinstall" to install as /usr/local/bin/python3.3)
fix the lib issue (link lib_dynload from /usr/local/lib64/python3.3 to /usr/local/lib/python3.3)
install distutils
install virtualenv
then you can use python3.3 and virtual-env-3.3 etc as expected.

Resources