Asked
7 years, 2 months ago
Viewed
4k times
-
I am trying to install python-pptx-0.5.7 package in windows 7.
What I did is as follows:1) Downloaded the python-pptx-0.5.7.tar file from website. 2) Unzipped it and kept it in the Python34/Script folder. 3) I used command prompt to install the package as setup.py install. Here is the ouptput of the command that I wrote in command prompt c:Python34Scriptspython-pptx-0.5.7>setup.py install usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...] or: setup.py --help [cmd1 cmd2 ...] or: setup.py --help-commands or: setup.py cmd --help error: no commands supplied.
The second approach using «pip»
c:Python34Scripts>pip install python-pptx
Collecting python-pptx
Downloading python-pptx-0.5.7.tar.gz (5.2MB)
100% |################################| 5.2MB 25kB/s
Collecting lxml>=3.1.0 (from python-pptx)
Downloading lxml-3.5.0.tar.gz (3.8MB)
100% |################################| 3.8MB 41kB/s
Requirement already satisfied (use —upgrade to upgrade): Pillow>=2.6.1 in c:python34libsite-packages (from python-pptx)
Collecting XlsxWriter>=0.5.7 (from python-pptx)
Downloading XlsxWriter-0.7.7-py2.py3-none-any.whl (133kB)
100% |################################| 135kB 62kB/s
Building wheels for collected packages: python-pptx, lxml
Running setup.py bdist_wheel for python-pptx
Stored in directory: C:UserspraveenAppDataLocalpipCachewheels1ffa42
bbc04bb0ef4be4cd49f228cc1fa3280bb99c1a37d3b193b81b
Running setup.py bdist_wheel for lxml
error: Microsoft Visual C++ 10.0 is required (Unable to find vcvarsall.bat).
Failed building wheel for lxml
Successfully built python-pptx
Failed to build lxml
ERROR: b»‘xslt-config’ is not recognized as an internal or external command,
rnoperable program or batch file.rn»
** make sure the development packages of libxml2 and libxslt are installed **
asked Nov 24, 2015 at 20:18
error: command ‘/usr/bin/clang’ failed with exit code 69
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> lxml
note: This is an issue with the package mentioned above, not pip.
answered Dec 10, 2022 at 4:18
1
I have downloaded pyglet, but when I
run the «setup.py» thing, it just says this in the
command line:
Traceback (most recent call last):
File «C:PythonXIncludepygletpyglet-1.1.4setup.py», line 285, in
setup(**setup_info)
File «C:Python27libdistutilscore.py», line 140, in setup
raise SystemExit, gen_usage(dist.script_name) + "nerror: %s" % msg
SystemExit: usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2
[cmd2_opts] …]
or: setup.py —help [cmd1 cmd2 …]
or: setup.py —help-commands
or: setup.py cmd —help
error: no commands supplied
How do I fix this error and install pyglet?
If you just did python setup.py
, you’ll get this — you need to type python setup.py build
followed by python setup.py install
.
As you are on Windows; even the above commands may not work correctly. In that case, you can download the Windows installer version (http://www.lfd.uci.edu/~gohlke/pythonlibs/#pyglet) which will install the library to your default system Python.
Just checked the pyglet website, there is an msi installer found on their main page:
http://pyglet.googlecode.com/files/pyglet-1.1.4.msi
You’ll also need to install a recent version of python
Here’s the 64 bit installer:
http://www.python.org/ftp/python/3.3.2/python-3.3.2.amd64.msi
and the 32 bit installer:
http://www.python.org/ftp/python/3.3.2/python-3.3.2.msi
Try this if trying on Windows7:
Add environment variable in windows
Windows+Pause > Advanced Sys Settings > Environment Variables
Add New under system variables:
Variable: Python34
Value: c:Python34python.py (or whereever u have installed Python)
then run using cmd:
c:Python34>python setup_bs4.py install (setup_bs4.py-> is BS4 setup file copied here)
and done…
Hope it helps.
I had the same problem.
It worked fine when i installed on my desktop but when i wanted to install on my laptop it gave me the error message.
Solution:
Remove Python installation and reinstall again then proceed with setup of django.
* First run the command to build: setup.py build
* then run the command to install: setup.py install
This would solve your problem. But if it persists, get the msi installer
Comments Section
He is trying to install it, not run it.
None of these commands work on either command line or command prompt. They all are either invalid syntax or ‘python’ is not recognized as an internal or external command, operable program or batch file.
If you check that link, the pyglet devs say that it doesn’t need to be installed; it’s portable.
Yes, I read that, but can anyone tell me how to download/get/whatever pyglet?
Check my edit, they have an msi installer on their download page. Did you try that?
@theSilentOne: It said i required 1.4 or later.
Who is «it» that said that?
@Hissing Cockroach, check the other links I posted. Pick the Python installer for the architecture of your windows machine.
The window still said I had to have 2.4 or later, even after I downloaded 3.3.2
Related Topics
python
Mentions
Burhan Khalid
Saurabh
Hissing Cockroach
Reuben Tanner
Kindson Munonye Kany
References
https://stackoverflow.com/questions/19672690/error-no-commands-supplied-when-trying-to-install-pyglet
Содержание
- Python-сообщество
- Уведомления
- #1 Ноя. 5, 2008 11:31:01
- py2exe
- #2 Ноя. 5, 2008 11:34:53
- py2exe
- #3 Ноя. 5, 2008 11:34:57
- py2exe
- #4 Ноя. 5, 2008 11:53:39
- py2exe
- #5 Ноя. 5, 2008 12:10:20
- py2exe
- #6 Ноя. 5, 2008 13:25:44
- py2exe
- #7 Ноя. 5, 2008 13:50:59
- py2exe
- #8 Ноя. 5, 2008 14:25:55
- py2exe
- #9 Июль 20, 2009 14:03:10
- py2exe
- #10 Июль 20, 2009 23:53:49
- py2exe
- usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] . ] #13
- Comments
- Error running either python3 setup.py install «TypeError: must be str, not NoneType» #2283
- Comments
Python-сообщество
Уведомления
#1 Ноя. 5, 2008 11:31:01
py2exe
кто знает где можно скачать py2exe для windows и python 2.5.2 (желательно ссылка)
#2 Ноя. 5, 2008 11:34:53
py2exe
#3 Ноя. 5, 2008 11:34:57
py2exe
#4 Ноя. 5, 2008 11:53:39
py2exe
кто знает почему когда я запускаю setup.py и мой код называется script.py я получаю такую ошибку:
Traceback (most recent call last):
File “C:/Documents and Settings/InternetComp-5/Мои документы/setup.py”, line 5, in
setup(console=)
File “C:Python25libdistutilscore.py”, line 139, in setup
raise SystemExit, gen_usage(dist.script_name) + “nerror: %s” % msg
SystemExit: usage: setup.py cmd1 [cmd2 …]
or: setup.py –help
or: setup.py –help-commands
or: setup.py cmd –help
error: no commands supplied
#5 Ноя. 5, 2008 12:10:20
py2exe
l-i-m-o-n_1
кто знает почему когда я запускаю setup.py и мой код называется script.py я получаю такую ошибку:
Отредактировано (Ноя. 5, 2008 12:15:14)
#6 Ноя. 5, 2008 13:25:44
py2exe
вот сожержимое setup.py:
Отредактировано (Ноя. 5, 2008 13:26:59)
#7 Ноя. 5, 2008 13:50:59
py2exe
Ты походу свой setup.py из под IDE запускаешь. Сделай батник в той папке где у тебя setup.py и script.py и напиши в нем:
#8 Ноя. 5, 2008 14:25:55
py2exe
timas, спасибо теперь буду знать
#9 Июль 20, 2009 14:03:10
py2exe
В продолжении темы )
Запускаю свой файл
from distutils.core import setup
import py2exe
setup(windows=)
и получаю следущее:
erroe: MSVCP90.dll: No such file or directory
дллка на месте, где ей и положено быть (
#10 Июль 20, 2009 23:53:49
py2exe
Python 2.6? Я не так давно столкнулся с этой проблемой. Читать тут.
Источник
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] . ] #13
Hi, all
When I run the python setup.py command in cmd, I got these print:
I think these are not errors.
But could someone kindly tell me how to use this repo to make faster rcnn on Windows ?
The text was updated successfully, but these errors were encountered:
Same problem here. Also got confused..
@zhonhel this turns out rigght command:
python setup.py install
C:UsersRahamPycharmProjectsFramescrm114-python-52f1450e6d485275a14a281eb3854a0fedc03b35crm114>python setup.py install
running install
running bdist_egg
running egg_info
writing crm114.egg-infoPKG-INFO
writing dependency_links to crm114.egg-infodependency_links.txt
writing top-level names to crm114.egg-infotop_level.txt
error: package directory ‘crm114’ does not exist
What should I do now?
C:WINDOWSsystem32>python C:_Mahdi. setup.py install
running install
running bdist_egg
running egg_info
creating instabot_py.egg-info
writing instabot_py.egg-infoPKG-INFO
writing dependency_links to instabot_py.egg-infodependency_links.txt
writing entry points to instabot_py.egg-infoentry_points.txt
writing requirements to instabot_py.egg-inforequires.txt
writing top-level names to instabot_py.egg-infotop_level.txt
writing manifest file ‘instabot_py.egg-infoSOURCES.txt’
reading manifest file ‘instabot_py.egg-infoSOURCES.txt’
writing manifest file ‘instabot_py.egg-infoSOURCES.txt’
installing library code to buildbdist.win-amd64egg
running install_lib
warning: install_lib: ‘buildlib’ does not exist — no Python modules to install
WARNING:root:Fail load requirements file, so using default ones.
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] . ]
or: setup.py —help [cmd1 cmd2 . ]
or: setup.py —help-commands
or: setup.py cmd —help
@Rahulvlog Did you discover the reason for the error?
what should I do? I am facing the same error/
Installed c:userszeeshanaconda3libsite-packagespysentiment-0.2-py3.7.egg
Processing dependencies for pysentiment==0.2
Searching for abductions
Reading https://pypi.org/simple/abductions/
Couldn’t find index page for ‘abductions’ (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.org/simple/
No local packages or working download links found for abductions
error: Could not find suitable distribution for Requirement.parse(‘abductions’)
What shold I do? I am facing this problem:
C:UsersLenovoDesktopFCA-masterFCA-master>python setup.py
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] . ]
or: setup.py —help [cmd1 cmd2 . ]
or: setup.py —help-commands
or: setup.py cmd —help
error: no commands supplied
Hi, all When I run the python setup.py command in cmd, I got these print:
I think these are not errors. But could someone kindly tell me how to use this repo to make faster rcnn on Windows ?
Have you slove the problem?
Hi, all When I run the python setup.py command in cmd, I got these print:
I think these are not errors. But could someone kindly tell me how to use this repo to make faster rcnn on Windows ?
Источник
Error running either python3 setup.py install «TypeError: must be str, not NoneType» #2283
I just installed an API pyunicorn and when I import it I get an error. It tells me that it cannot import setup. Therefore, I went to install setup.py. My steps were:
First:
python3 setup.py install
or
pip3 install .
It gives the following error:
How to solve it?
The text was updated successfully, but these errors were encountered:
Hello there, could you please point us to the setup.py script, since it doesn’t seems to be pyunicorn’s?
Thanks for your answer. Here is the scritp:
The code you provided seems to be a potion of CPython’s setup.py. Normally, your GNU/Linux distribution should already provide a Python interpreter; and the build instruction (just in case one wants to compile it oneself) is available under CPython’s README.
However, could you please clarify what you are trying to do and what you expect to happen by executing the script, since it isn’t clear what it has to do with pyunicorn?
Thanks for your comment. I just installed the API pyunicorn:
But when I import it, I have this error:
Then I’ve followed the instructions elsewhere to install setup.py, which seems to be the source of bug.
Given the following import
I strongly suggest you to file an issue over pyunicorn to report that
- Their setup.py does not install itself to be available for import.
- It is conventionally discouraged to install the setup script to site packages and import it.
From the content of your /usr/local/lib/python3.6/dist-packages/setup.py , it is hinted that some other project also tries to do (2) and it might be helpful for them if you file an issue over there as well. Moreover, you might want to avoid installing packages from PyPI (which are not audited) to your root filesystem: using pip —user might be a safer solution and a virtual environment may even be a better practice.
Edit: I see the confusion (2) is giving you: setup.py contain setuptools’ configuration to build and install a project. By no means the script should be installed to a site location and projects relying on this behavior (like pyunicorn) are asking for trouble.
Hello, thanks for your comment, once again. In a nutshell:
a) the procedure to install setup.py is not correct;
b) the problem is with pyunicorn code.
(?)
setup.py is used to install things, not to be installed, so yes, the issue is with pyunicorn. It was actually filed as pik-copan/pyunicorn#129 so you might want to head over there to say that it affects you as well and nudge the maintainers for a solution.
Thank you so much. I’ve never thought it would be so hard to use an API. :/
You’re welcome. We humans make mistakes all the time (I’d argue that it is one of the things that makes us humans 😄 ), so don’t let others’ mistake let you down, take it as opportunity to learn from (e.g. about Python packaging in this case 😉 ). In your very case you might want to install an older version (0.6.0.post1) until it gets fixed.
Hey I just fixed it. I have to thank you very much.
Источник
Уведомления
- Начало
- » Python для экспертов
- » py2exe
#1 Ноя. 5, 2008 11:31:01
py2exe
кто знает где можно скачать py2exe для windows и python 2.5.2 (желательно ссылка)
Офлайн
- Пожаловаться
#4 Ноя. 5, 2008 11:53:39
py2exe
кто знает почему когда я запускаю setup.py и мой код называется script.py я получаю такую ошибку:
Traceback (most recent call last):
File “C:/Documents and Settings/InternetComp-5/Мои документы/setup.py”, line 5, in <module>
setup(console=)
File “C:Python25libdistutilscore.py”, line 139, in setup
raise SystemExit, gen_usage(dist.script_name) + “nerror: %s” % msg
SystemExit: usage: setup.py cmd1 [cmd2 …]
or: setup.py –help
or: setup.py –help-commands
or: setup.py cmd –help
error: no commands supplied
Офлайн
- Пожаловаться
#5 Ноя. 5, 2008 12:10:20
py2exe
l-i-m-o-n_1
кто знает почему когда я запускаю setup.py и мой код называется script.py я получаю такую ошибку:
Напиши еще содержимое твоего setup.py и как ты его запускаешь
Ты походу запускаешь так:
А надо так
Отредактировано (Ноя. 5, 2008 12:15:14)
Офлайн
- Пожаловаться
#6 Ноя. 5, 2008 13:25:44
py2exe
### # setup.pyfrom distutils.core import setup
import py2exe
setup(console=["script.py"])
### python setup.py py2exe
Отредактировано (Ноя. 5, 2008 13:26:59)
Офлайн
- Пожаловаться
#7 Ноя. 5, 2008 13:50:59
py2exe
Ты походу свой setup.py из под IDE запускаешь. Сделай батник в той папке где у тебя setup.py и script.py и напиши в нем:
Офлайн
- Пожаловаться
#9 Июль 20, 2009 14:03:10
py2exe
В продолжении темы )
Запускаю свой файл
from distutils.core import setup
import py2exe
setup(windows=)
и получаю следущее:
erroe: MSVCP90.dll: No such file or directory
дллка на месте, где ей и положено быть (
Офлайн
- Пожаловаться
#10 Июль 20, 2009 23:53:49
py2exe
Python 2.6? Я не так давно столкнулся с этой проблемой. Читать тут.
Офлайн
- Пожаловаться
Я загрузил pyglet, но когда я запускаю «setup.py», он просто говорит это в командной строке:
Traceback (последний последний вызов):
Файл «C:PythonXIncludepygletpyglet-1.1.4setup.py», строка 285, в
setup(**setup_info)
Файл «C:Python27libdistutilscore.py», строка 140, в настройках
raise SystemExit, gen_usage(dist.script_name) + "nerror: %s" % msg
SystemExit: использование: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] …]
или: setup.py —help [cmd1 cmd2 …]
или: setup.py —help-commands
или: setup.py cmd —help
ошибка: не введены команды
Как исправить эту ошибку и установить pyglet?
4 ответы
Если бы ты только что сделал python setup.py
, вы получите это — вам нужно ввести python setup.py build
последующей python setup.py install
.
Как вы в Windows; даже приведенные выше команды могут работать некорректно. В этом случае вы можете скачать версию установщика Windows который установит библиотеку в вашу систему Python по умолчанию.
ответ дан 30 окт ’13, 02:10
ответ дан 30 окт ’13, 03:10
У меня такая же проблема. Он работал нормально, когда я устанавливал на свой рабочий стол, но когда я хотел установить на свой ноутбук, он выдавал мне сообщение об ошибке. Решение: удалите установку Python и переустановите ее снова, затем продолжите настройку django. * Сначала запустите команду для сборки: setup.py build * затем запустите команду для установки: setup.py install
Это решит вашу проблему. Но если это не исчезнет, получите установщик msi
Создан 27 ноя.
Попробуйте это, если пытаетесь использовать Windows7: добавьте переменную среды в окнах Windows+Pause > Advanced Sys Settings > Environment Variables Add New под системными переменными: Variable: Python34 Value: c:Python34python.py (или везде, где вы установили Python)
затем запустите с помощью cmd: c:Python34>python setup_bs4.py install (здесь скопирован установочный файл BS4 setup_bs4.py->)
и готово… Надеюсь, это поможет.
ответ дан 27 авг.
Не тот ответ, который вы ищете? Просмотрите другие вопросы с метками
python
or задайте свой вопрос.
Dec-29-2016, 09:31 PM
(This post was last modified: Dec-30-2016, 06:17 AM by snippsat.)
I am using python3.4 on debian jessie After the following enties
from setuptools import setup setup( name='vseach', version='1.0', py_modules=['vsearch'], )
Error:
error:no commands supplied
vsearch is a file in the current directory containing two function definitions.
I am just getting started with python and have found several instructions identical to the lines above. None specify a command..
Is there something I have missed?
Posts: 99
Threads: 43
Joined: Dec 2016
Reputation:
0
From my limited knowledge it looks like all you have done is defined three variables, thus the ‘no commands supplied’ error.
Can you post links to some of the instructions you mentioned?
Posts: 4
Threads: 1
Joined: Dec 2016
Reputation:
0
Here are a couple references
https://pythonhosted.org/an_example_pypi…tools.html
The setup in this reference is more elaborate but still no commands. If you scroll down there is a listing of possible commands. On my system the entry
setup —help-commands
does not work.
The following reference uses
from distutils import setup
and I have tried this too with the same results
https://docs.python.org/3/distutils/intr…le-example:
I had a third reference which I have misplaced. It used the minimal script exactly as in my original post but advised that a much more detailed version should be used.
Posts: 99
Threads: 43
Joined: Dec 2016
Reputation:
0
Dec-29-2016, 11:53 PM
(This post was last modified: Dec-29-2016, 11:53 PM by mcmxl22.)
For the first one did you do all this?
import os from setuptools import setup def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read()
Posts: 4
Threads: 1
Joined: Dec 2016
Reputation:
0
I entered the lines you suggested and python accepted them followed by the setup lines in my original post. The result was still
error: no commands supplied
Posts: 4
Threads: 1
Joined: Dec 2016
Reputation:
0
Dec-30-2016, 03:11 AM
(This post was last modified: Dec-30-2016, 06:19 AM by snippsat.)
My misunderstanding. The instructions meant to create a file setup.py with the contents
from setuptools import setup setup( name='vsearch', version='1.0', py_modules=['vsearch'], )
in same the directory as vsearch.py
which contains the function definitions.
Then from the system prompt run the command
python3.4 setup.py dist
This works and creates a sub directory dist containing the file vsearch-1.0.tar.gz
Finally from the system prompt run:
python3.4 -m pip install vsearch-1.0.tar.gz
.
This last step does not work for me. The system responds /usr/bin/python3.4 No module named pip
My understanding is pip should be a part of python3.4.installation.
How can I fix this?
Posts: 99
Threads: 43
Joined: Dec 2016
Reputation:
0
There are instructions for installing pip on your system here. http://stackoverflow.com/questions/65875…h-python-3
Posts: 6,575
Threads: 116
Joined: Sep 2016
Reputation:
487
Dec-30-2016, 06:07 AM
(This post was last modified: Dec-30-2016, 06:08 AM by snippsat.)
The link from mcmxl22 should get you pip.
You could also make wheel,
which is a better format an more modern format for python.
pip install wheel
Then from command line:
python setup.py bdist_wheel
Now you should have vsearch-1.0-py3-none-any.whl
Usage:
pip install vsearch-1.0-py3-none-any.whl
If want to share with the world,then upload to PyPI
Then when finish it can eg be pip install vsearch
(will download and install your module to user).