I am trying to install IMDbPY in all sorts of ways and keep failing. The package is not pure Python (it has a few C lines) and I suspect that the compilation is the root cause (I'm on Windows).
What I've attempted so far:
pip install imdbpy.
easy_install imdbpy.
Downloading IMDbPY-4.9.tar.gz from Pypi Package Index > IMDbPY 4.9, extracting the thing and then python setup.py install.
I've noticed that pip was trying to install the following packages: imdbpy, SQLObject, FormEncode, SQLAlchemy, decorator, Tempita. I've decided to try installing those packages one after the other by myself, starting with Tempita. I went to Pypi Package Index > Tempita, downloaded the archive, extracted and then python setup.py install. It also failed.
The output of each attempt:
pip install imdbpy:
Downloading/unpacking imdbpy
Running setup.py egg_info for package imdbpy
Created locale for: en it tr.
warning: no previously-included files matching '*~' found anywhere in distri
bution
no previously-included directories found matching 'CVS'
no previously-included directories found matching '.svn'
no previously-included directories found matching '.hg'
warning: no previously-included files matching 'CVS' found anywhere in distr
ibution
warning: no previously-included files matching '.svn' found anywhere in dist
ribution
Downloading/unpacking SQLObject (from imdbpy)
Running setup.py egg_info for package SQLObject
warning: no files found matching 'examples\*.py'
warning: no files found matching '*.py' under directory 'tests'
Downloading/unpacking FormEncode (from imdbpy)
Running setup.py egg_info for package FormEncode
warning: no files found matching '*.py' under directory '.'
no previously-included directories found matching '**\.svn'
Downloading/unpacking SQLAlchemy (from imdbpy)
Running setup.py egg_info for package SQLAlchemy
warning: no files found matching '*.jpg' under directory 'doc'
warning: no files found matching 'Makefile' under directory 'doc'
no previously-included directories found matching 'doc\build\output'
Downloading/unpacking sqlalchemy-migrate (from imdbpy)
Running setup.py egg_info for package sqlalchemy-migrate
warning: no files found matching '*' under directory 'tests'
warning: no previously-included files matching '*pyc' found anywhere in dist
ribution
warning: no previously-included files found matching '.hgtags'
warning: no previously-included files matching '*' found under directory 'do
cs\_build'
Requirement already satisfied (use --upgrade to upgrade): lxml in c:\python27\li
b\site-packages (from imdbpy)
Downloading/unpacking decorator (from sqlalchemy-migrate->imdbpy)
Running setup.py egg_info for package decorator
warning: no previously-included files found matching 'Makefile'
Downloading/unpacking Tempita>=0.4 (from sqlalchemy-migrate->imdbpy)
Running setup.py egg_info for package Tempita
Requirement already satisfied (use --upgrade to upgrade): distribute in c:\pytho
n27\lib\site-packages\distribute-0.6.15-py2.7.egg (from sqlalchemy-migrate->imdb
py)
Installing collected packages: imdbpy, SQLObject, FormEncode, SQLAlchemy, sqlalc
hemy-migrate, decorator, Tempita
Running setup.py install for imdbpy
Created locale for: en it tr.
building 'imdb.parser.sql.cutils' extension
====================================================================
ERROR
=====
Aaargh! An error! An error!
Curse my metal body, I wasn't fast enough. It's all my fault!
Anyway, if you were trying to build a package or install IMDbPY to your
system, looks like we're unable to fetch or install some dependencies,
or to compile the C module.
The best solution is to resolve these dependencies (maybe you're
not connected to Internet?) and/or install a C compiler.
You may, however, go on without some optional pieces of IMDbPY;
try re-running this script with the corresponding optional argument:
--without-lxml exclude lxml (speeds up 'http')
--without-cutils don't compile the C module (speeds up 'sql')
--without-sqlobject exclude SQLObject (you need at least one of)
--without-sqlalchemy exclude SQLAlchemy (SQLObject or SQLAlchemy,)
(if you want to access a )
(local SQL database )
--without-sql no access to SQL databases (implied if both
--without-sqlobject and --without-sqlalchemy
are used)
Example:
python ./setup.py --without-lxml --without-sql install
The caught exception, is re-raise below:
error: Unable to find vcvarsall.bat
Complete output from command C:\Python27\python.exe -c "import setuptools;__
file__='C:\\Users\\yonatan\\build\\imdbpy\\setup.py';execfile(__file__)" install
--single-version-externally-managed --record c:\users\yonatan\appdata\local\tem
p\pip-czwg98-record\install-record.txt:
Created locale for: en it tr.
running install
running build
running build_py
copying imdb\Character.py -> build\lib.win32-2.7\imdb
copying imdb\Company.py -> build\lib.win32-2.7\imdb
copying imdb\helpers.py -> build\lib.win32-2.7\imdb
copying imdb\linguistics.py -> build\lib.win32-2.7\imdb
copying imdb\Movie.py -> build\lib.win32-2.7\imdb
copying imdb\Person.py -> build\lib.win32-2.7\imdb
copying imdb\utils.py -> build\lib.win32-2.7\imdb
copying imdb\_compat.py -> build\lib.win32-2.7\imdb
copying imdb\_exceptions.py -> build\lib.win32-2.7\imdb
copying imdb\_logging.py -> build\lib.win32-2.7\imdb
copying imdb\__init__.py -> build\lib.win32-2.7\imdb
copying imdb\locale\generatepot.py -> build\lib.win32-2.7\imdb\locale
copying imdb\locale\msgfmt.py -> build\lib.win32-2.7\imdb\locale
copying imdb\locale\rebuildmo.py -> build\lib.win32-2.7\imdb\locale
copying imdb\locale\__init__.py -> build\lib.win32-2.7\imdb\locale
copying imdb\parser\__init__.py -> build\lib.win32-2.7\imdb\parser
copying imdb\parser\http\characterParser.py -> build\lib.win32-2.7\imdb\parser\h
ttp
copying imdb\parser\http\companyParser.py -> build\lib.win32-2.7\imdb\parser\htt
p
copying imdb\parser\http\movieParser.py -> build\lib.win32-2.7\imdb\parser\http
copying imdb\parser\http\personParser.py -> build\lib.win32-2.7\imdb\parser\http
copying imdb\parser\http\searchCharacterParser.py -> build\lib.win32-2.7\imdb\pa
rser\http
copying imdb\parser\http\searchCompanyParser.py -> build\lib.win32-2.7\imdb\pars
er\http
copying imdb\parser\http\searchKeywordParser.py -> build\lib.win32-2.7\imdb\pars
er\http
copying imdb\parser\http\searchMovieParser.py -> build\lib.win32-2.7\imdb\parser
\http
copying imdb\parser\http\searchPersonParser.py -> build\lib.win32-2.7\imdb\parse
r\http
copying imdb\parser\http\topBottomParser.py -> build\lib.win32-2.7\imdb\parser\h
ttp
copying imdb\parser\http\utils.py -> build\lib.win32-2.7\imdb\parser\http
copying imdb\parser\http\__init__.py -> build\lib.win32-2.7\imdb\parser\http
copying imdb\parser\mobile\__init__.py -> build\lib.win32-2.7\imdb\parser\mobile
copying imdb\parser\sql\alchemyadapter.py -> build\lib.win32-2.7\imdb\parser\sql
copying imdb\parser\sql\dbschema.py -> build\lib.win32-2.7\imdb\parser\sql
copying imdb\parser\sql\objectadapter.py -> build\lib.win32-2.7\imdb\parser\sql
copying imdb\parser\sql\__init__.py -> build\lib.win32-2.7\imdb\parser\sql
copying imdb\parser\http\bsouplxml\bsoupxpath.py -> build\lib.win32-2.7\imdb\par
ser\http\bsouplxml
copying imdb\parser\http\bsouplxml\etree.py -> build\lib.win32-2.7\imdb\parser\h
ttp\bsouplxml
copying imdb\parser\http\bsouplxml\html.py -> build\lib.win32-2.7\imdb\parser\ht
tp\bsouplxml
copying imdb\parser\http\bsouplxml\_bsoup.py -> build\lib.win32-2.7\imdb\parser\
http\bsouplxml
copying imdb\parser\http\bsouplxml\__init__.py -> build\lib.win32-2.7\imdb\parse
r\http\bsouplxml
running build_ext
building 'imdb.parser.sql.cutils' extension
====================================================================
ERROR
=====
Aaargh! An error! An error!
Curse my metal body, I wasn't fast enough. It's all my fault!
Anyway, if you were trying to build a package or install IMDbPY to your
system, looks like we're unable to fetch or install some dependencies,
or to compile the C module.
The best solution is to resolve these dependencies (maybe you're
not connected to Internet?) and/or install a C compiler.
You may, however, go on without some optional pieces of IMDbPY;
try re-running this script with the corresponding optional argument:
--without-lxml exclude lxml (speeds up 'http')
--without-cutils don't compile the C module (speeds up 'sql')
--without-sqlobject exclude SQLObject (you need at least one of)
--without-sqlalchemy exclude SQLAlchemy (SQLObject or SQLAlchemy,)
(if you want to access a )
(local SQL database )
--without-sql no access to SQL databases (implied if both
--without-sqlobject and --without-sqlalchemy
are used)
Example:
python ./setup.py --without-lxml --without-sql install
The caught exception, is re-raise below:
error: Unable to find vcvarsall.bat
----------------------------------------
Command C:\Python27\python.exe -c "import setuptools;__file__='C:\\Users\\yonata
n\\build\\imdbpy\\setup.py';execfile(__file__)" install --single-version-externa
lly-managed --record c:\users\yonatan\appdata\local\temp\pip-czwg98-record\insta
ll-record.txt failed with error code 1
Storing complete log in C:\Users\yonatan\AppData\Roaming\pip\pip.log
easy_install imdbpy
Searching for imdbpy
Reading http://pypi.python.org/simple/imdbpy/
Reading http://imdbpy.sf.net/
Reading http://imdbpy.sf.net/?page=download
Best match: IMDbPY 4.9
Downloading http://pypi.python.org/packages/source/I/IMDbPY/IMDbPY-4.9.tar.gz#md
5=5b071cd63d1804ed568741d2db8d12b5
Processing IMDbPY-4.9.tar.gz
Running IMDbPY-4.9\setup.py -q bdist_egg --dist-dir c:\users\yonatan\appdata\loc
al\temp\easy_install-tubh5e\IMDbPY-4.9\egg-dist-tmp-nsslin
Created locale for: en it tr.
warning: no previously-included files matching '*~' found anywhere in distributi
on
no previously-included directories found matching 'CVS'
no previously-included directories found matching '.svn'
no previously-included directories found matching '.hg'
warning: no previously-included files matching 'CVS' found anywhere in distribut
ion
warning: no previously-included files matching '.svn' found anywhere in distribu
tion
====================================================================
ERROR
=====
Aaargh! An error! An error!
Curse my metal body, I wasn't fast enough. It's all my fault!
Anyway, if you were trying to build a package or install IMDbPY to your
system, looks like we're unable to fetch or install some dependencies,
or to compile the C module.
The best solution is to resolve these dependencies (maybe you're
not connected to Internet?) and/or install a C compiler.
You may, however, go on without some optional pieces of IMDbPY;
try re-running this script with the corresponding optional argument:
--without-lxml exclude lxml (speeds up 'http')
--without-cutils don't compile the C module (speeds up 'sql')
--without-sqlobject exclude SQLObject (you need at least one of)
--without-sqlalchemy exclude SQLAlchemy (SQLObject or SQLAlchemy,)
(if you want to access a )
(local SQL database )
--without-sql no access to SQL databases (implied if both
--without-sqlobject and --without-sqlalchemy
are used)
Example:
python ./setup.py --without-lxml --without-sql install
The caught exception, is re-raise below:
error: Setup script exited with error: Unable to find vcvarsall.bat
python setup.py install
Created locale for: en it tr.
====================================================================
ERROR
=====
Aaargh! An error! An error!
Curse my metal body, I wasn't fast enough. It's all my fault!
Anyway, if you were trying to build a package or install IMDbPY to your
system, looks like we're unable to fetch or install some dependencies,
or to compile the C module.
The best solution is to resolve these dependencies (maybe you're
not connected to Internet?) and/or install a C compiler.
You may, however, go on without some optional pieces of IMDbPY;
try re-running this script with the corresponding optional argument:
--without-lxml exclude lxml (speeds up 'http')
--without-cutils don't compile the C module (speeds up 'sql')
--without-sqlobject exclude SQLObject (you need at least one of)
--without-sqlalchemy exclude SQLAlchemy (SQLObject or SQLAlchemy,)
(if you want to access a )
(local SQL database )
--without-sql no access to SQL databases (implied if both
--without-sqlobject and --without-sqlalchemy
are used)
Example:
python ./setup.py --without-lxml --without-sql install
The caught exception, is re-raise below:
error in IMDbPY setup command: access to SQL databases wants to be able to remov
e imdb.parser.sql, but the distribution doesn't contain any packages or modules
under imdb.parser.sql
Trying to install Tempita with python setup.py install
running install
running bdist_egg
running egg_info
creating Tempita.egg-info
writing Tempita.egg-info\PKG-INFO
writing top-level names to Tempita.egg-info\top_level.txt
writing dependency_links to Tempita.egg-info\dependency_links.txt
writing manifest file 'Tempita.egg-info\SOURCES.txt'
warning: manifest_maker: standard file 'setup.py' not found
error: package directory 'tempita' does not exist
If you're using Python 2.7 32 bit you could try out the binary package listed towards the bottom of this page.
You could try installing Visual Studio Express 2008 (not 2010), it's free and provides the needed compiler.
You can also switch to ActivePython and use Pypm to install this package.
Related
This question deals with discord.py errors caused by asyncio, but any advice on creating discord bots would be very welcome. I am more than willing to read documentation to fully understand responses, and will pursue provided articles.
Problem:
I am attempting to create a simple discord bot in python 3.9. I am new to python, and have been using pycharm to write my scripts. I found an error while attempting to run the script. Script provided here:
import discord
client = discord.Client()
#client.event
async def on_ready():
print('We have logged in as {0.user}'.format(client))
#client.event
async def on_message(message):
if message.author == client.user:
return
if message.content.startswith('$hello'):
await message.channel.send('Hello!')
client.run('my bot token')
Error provided here:
Traceback (most recent call last):
File "C:\Users\User\py_projects\discord\scrambot_main.py", line 2, in <module>
import discord
File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\__init__.py", line 20, in <module>
from .client import Client, AppInfo, ChannelPermissions
File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\client.py", line 38, in <module>
from .state import ConnectionState
File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\state.py", line 36, in <module>
from . import utils, compat
File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\compat.py", line 32
create_task = asyncio.async
^
SyntaxError: invalid syntax
Solutions I've Seen So Far:
I have seen a myriad of questions asking the same for python 3.7, and none for 3.9. This would either be because nobody else experiences the same error with python 3.9 in pycharm, or the solution is the same as in python 3.7.
I have seen many people recommending dropping to version 3.6 of python because async is a keyword in 3.7, which I want to avoid if possible. I'm fairly sure it still is a keyword in 3.9.
Some responses have said that pycharm creates virtual environments and would not have discord.py installed. This is not true in my case -- I have checked my project preferences and discord.py is in fact included and accessible by my script. More evidence is in the error message: the line causing problems is found in the discord.py directory, so the compiler must be able to access it. Right?
The problem may arise from the fact that i installed using pip install discord.py and then tried again with pip3 install discord.py. As far as I can tell, these worked as intended. There is an error if i try to use pip3 install discord or pip install discord, which I have provided. I do not know if the .py makes a difference, but if it does, i'm sure it would help to know that. The only other version of a solution i've seen is downloading the rewrite version of discord.py off github. I have not tried this yet because i want to make this version work if possible.
C:\Users\User>pip3 install discord
Collecting discord
Using cached discord-1.0.1-py3-none-any.whl (1.1 kB)
Collecting discord.py>=1.0.1
Using cached discord.py-1.5.1-py3-none-any.whl (701 kB)
Processing c:\users\user\appdata\local\pip\cache\wheels\b6\9c\bd\6b99bc6ec9dab11f3756d31fb8506d3ecf07aea58b6201f539\aiohttp-3.6.3-py3-none-any.whl
Collecting attrs>=17.3.0
Using cached attrs-20.2.0-py2.py3-none-any.whl (48 kB)
Requirement already satisfied: chardet<4.0,>=2.0 in c:\users\user\appdata\local\programs\python\python39\lib\site-packages (from aiohttp<3.7.0,>=3.6.0->discord.py>=1.0.1->discord) (3.0.4)
Collecting yarl<1.6.0,>=1.0
Using cached yarl-1.5.1.tar.gz (173 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Collecting multidict<5.0,>=4.5
Using cached multidict-4.7.6.tar.gz (50 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Requirement already satisfied: async-timeout<4.0,>=3.0 in c:\users\user\appdata\local\programs\python\python39\lib\site-packages (from aiohttp<3.7.0,>=3.6.0->discord.py>=1.0.1->discord) (3.0.1)
Collecting idna>=2.0
Using cached idna-2.10-py2.py3-none-any.whl (58 kB)
Building wheels for collected packages: yarl, multidict
Building wheel for yarl (PEP 517) ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\user\appdata\local\programs\python\python39\python.exe' 'c:\users\user\appdata\local\programs\python\python39\lib\site-packages\pip\_vendor\pep517\_in_process.py' build_wheel 'C:\Users\User\AppData\Local\Temp\tmpib94rz6b'
cwd: C:\Users\User\AppData\Local\Temp\pip-install-rrtk0pij\yarl
Complete output (35 lines):
**********************
* Accellerated build *
**********************
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
creating build\lib.win-amd64-3.9\yarl
copying yarl\_quoting.py -> build\lib.win-amd64-3.9\yarl
copying yarl\_quoting_py.py -> build\lib.win-amd64-3.9\yarl
copying yarl\_url.py -> build\lib.win-amd64-3.9\yarl
copying yarl\__init__.py -> build\lib.win-amd64-3.9\yarl
running egg_info
writing yarl.egg-info\PKG-INFO
writing dependency_links to yarl.egg-info\dependency_links.txt
writing requirements to yarl.egg-info\requires.txt
writing top-level names to yarl.egg-info\top_level.txt
reading manifest file 'yarl.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '*.cache' found anywhere in distribution
warning: no previously-included files found matching 'yarl\*.html'
warning: no previously-included files found matching 'yarl\*.so'
warning: no previously-included files found matching 'yarl\*.pyd'
no previously-included directories found matching 'docs\_build'
writing manifest file 'yarl.egg-info\SOURCES.txt'
copying yarl\__init__.pyi -> build\lib.win-amd64-3.9\yarl
copying yarl\_quoting_c.c -> build\lib.win-amd64-3.9\yarl
copying yarl\_quoting_c.pyi -> build\lib.win-amd64-3.9\yarl
copying yarl\_quoting_c.pyx -> build\lib.win-amd64-3.9\yarl
copying yarl\py.typed -> build\lib.win-amd64-3.9\yarl
running build_ext
building 'yarl._quoting_c' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
----------------------------------------
ERROR: Failed building wheel for yarl
Building wheel for multidict (PEP 517) ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\user\appdata\local\programs\python\python39\python.exe' 'c:\users\user\appdata\local\programs\python\python39\lib\site-packages\pip\_vendor\pep517\_in_process.py' build_wheel 'C:\Users\User\AppData\Local\Temp\tmp_yeznrct'
cwd: C:\Users\User\AppData\Local\Temp\pip-install-rrtk0pij\multidict
Complete output (40 lines):
**********************
* Accellerated build *
**********************
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
creating build\lib.win-amd64-3.9\multidict
copying multidict\_abc.py -> build\lib.win-amd64-3.9\multidict
copying multidict\_compat.py -> build\lib.win-amd64-3.9\multidict
copying multidict\_multidict_base.py -> build\lib.win-amd64-3.9\multidict
copying multidict\_multidict_py.py -> build\lib.win-amd64-3.9\multidict
copying multidict\__init__.py -> build\lib.win-amd64-3.9\multidict
running egg_info
writing multidict.egg-info\PKG-INFO
writing dependency_links to multidict.egg-info\dependency_links.txt
writing top-level names to multidict.egg-info\top_level.txt
reading manifest file 'multidict.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files found matching 'multidict\_multidict.html'
warning: no previously-included files found matching 'multidict\*.so'
warning: no previously-included files found matching 'multidict\*.pyd'
warning: no previously-included files found matching 'multidict\*.pyd'
no previously-included directories found matching 'docs\_build'
writing manifest file 'multidict.egg-info\SOURCES.txt'
copying multidict\__init__.pyi -> build\lib.win-amd64-3.9\multidict
copying multidict\_multidict.c -> build\lib.win-amd64-3.9\multidict
copying multidict\py.typed -> build\lib.win-amd64-3.9\multidict
creating build\lib.win-amd64-3.9\multidict\_multilib
copying multidict\_multilib\defs.h -> build\lib.win-amd64-3.9\multidict\_multilib
copying multidict\_multilib\dict.h -> build\lib.win-amd64-3.9\multidict\_multilib
copying multidict\_multilib\istr.h -> build\lib.win-amd64-3.9\multidict\_multilib
copying multidict\_multilib\iter.h -> build\lib.win-amd64-3.9\multidict\_multilib
copying multidict\_multilib\pair_list.h -> build\lib.win-amd64-3.9\multidict\_multilib
copying multidict\_multilib\views.h -> build\lib.win-amd64-3.9\multidict\_multilib
running build_ext
building 'multidict._multidict' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
----------------------------------------
ERROR: Failed building wheel for multidict
Failed to build yarl multidict
ERROR: Could not build wheels for yarl, multidict which use PEP 517 and cannot be installed directly
Questions:
Has anyone had success with discord bots in python 3.9?
Is something wrong with my script?
Is async a keyword in python 3.9? If so, how can i modify my program to solve this problem?
How can I fix this issue without downgrading to python 3.6? Is that the only way?
Why does pip install discord not work? What are wheels? I do not want to install C++ build tools.
Would it be easier to program a bot in C++ or JS? I don't know any JS but i am familiar with C++.
Any help with this issue would be massively appreciated. Also, as this is my first stack overflow post, please feel free to let me know if i could have done anything better in asking this question. if there's anything else i can provide to help you wonderful developers who are willing to spend their time solving noob problems like this one, please let me know.
Also, if willing and able, please provide some tips for writing discord bots. This is intended to be a small Admin bot created to test and develop my python skills. Interaction with people is the focus, not automation of any kind, although I do want to try out as many ideas as possible.
Edit:
Included PyCharm python interpreter settings.
Also had an issue with opening a new venv project and installing discord.py to it. Same wheels error as above, provided errors and other relevant windows in the image below. also not sure where to put my script file or how to make the run configuration.
the issue is with your discord.Client() you should never use that instead use
from discord.ext import commands
client = commands.Bot(prefix="ur prefix")
And you have written command in wrong way
#client.event
async def on_message(message):
if message.author == client.user:
return
if message.content.startswith('$hello'):
await message.channel.send('Hello!')
correct way :
#client.command()
async def hello(ctx):
await ctx.send("Hello!")
I am using an old Mac Mini without internet connection, with OS X 10.3.7 and Python 2.7.7,
and cannot install timeloop with "python setup.py install".
Should timeloop principally work on this system?
Is there maybe any other way to get it work on this rather old machine?
Please don't recommend me to use a newer system: It's a project and I need to use this computer.
I would appreciate your help very much.
what I get is this: Do you see any error message which could help?
$ python setup.py install
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'long_description_content_type'
warnings.warn(msg)
running install
running bdist_egg
running egg_info
writing timeloop.egg-info/PKG-INFO
writing top-level names to timeloop.egg-info/top_level.txt
writing dependency_links to timeloop.egg-info/dependency_links.txt
reading manifest file 'timeloop.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'timeloop.egg-info/SOURCES.txt'
installing library code to build/bdist.macosx-10.3-ppc/egg
running install_lib
running build_py
creating build/bdist.macosx-10.3-ppc/egg
creating build/bdist.macosx-10.3-ppc/egg/timeloop
copying build/lib/timeloop/exceptions.py -> build/bdist.macosx-10.3-ppc/egg/timeloop
byte-compiling build/bdist.macosx-10.3-ppc/egg/timeloop/exceptions.py to exceptions.pyc
creating build/bdist.macosx-10.3-ppc/egg/EGG-INFO
copying timeloop.egg-info/PKG-INFO -> build/bdist.macosx-10.3-ppc/egg/EGG-INFO
copying timeloop.egg-info/SOURCES.TXT -> build/bdist.macosx-10.3-ppc/egg/EGG-INFO
copying timeloop.egg-info/dependency_links.txt -> build/bdist.macosx-10.3-ppc/egg/EGG-INFO
copying timeloop.egg-info/top_level.txt -> build/bdist.macosx-10.3-ppc/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating 'dist/timeloop-1.0.2-py2.7.egg' and adding 'build/bdist.macosx-10.3-ppc/egg' to it
removing 'build/bdist.macosx-10.3-ppc/egg' (and everything under it)
Processing timeloop-1.0.2-py2.7.egg
Removing /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/timeloop-1.0.2-py2.7.egg
Copying timeloop-1.0.2-py2.7.egg to /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages
Removing timeloop 1.0 from easy-install.pth file
Adding timeloop 1.0.2 to easy-install.pth file
Installed /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/timeloop-1.0.2-py2.7.egg
Processing dependencies for timeloop==1.0.2
Finished processing dependencies for timeloop==1.0.2
I'm also getting the same error while installing Twisted.
Here's version info:
Django : 1.9
Python : 3.5
Trying to install latest version of Django-channels
Command used : pip install channels
The error :
running build_ext
building 'twisted.test.raiser' extension error:
[WinError 2] The system cannot find the file specified
(Almost) full error message
.......pip install channels
Collecting channels
Using cached channels-1.1.8-py2.py3-none-any.whl
Collecting daphne~=1.3 (from channels)
Using cached daphne-1.3.0-py2.py3-none-any.whl
Requirement already satisfied: asgiref~=1.1 in g:\django\projectChat\venv\lib\site-packages (from channels
)
Requirement already satisfied: Django>=1.8 in g:\django\projectChat\venv\lib\site-packages (from channels)
Requirement already satisfied: autobahn>=0.18 in g:\django\projectChat\venv\lib\site-packages (from daphne
~=1.3->channels)
Collecting twisted>=17.1 (from daphne~=1.3->channels)
Using cached Twisted-17.9.0.tar.bz2
Requirement already satisfied: six in g:\django\projectChat\venv\lib\site-packages (from asgiref~=1.1->cha
nnels)
Requirement already satisfied: txaio>=2.7.0 in g:\django\projectChat\venv\lib\site-packages (from autobahn
>=0.18->daphne~=1.3->channels)
Requirement already satisfied: zope.interface>=4.0.2 in g:\django\projectChat\venv\lib\site-packages (from
twisted>=17.1->daphne~=1.3->channels)
Requirement already satisfied: constantly>=15.1 in g:\django\projectChat\venv\lib\site-packages (from twis
ted>=17.1->daphne~=1.3->channels)
Requirement already satisfied: incremental>=16.10.1 in g:\django\projectChat\venv\lib\site-packages (from
twisted>=17.1->daphne~=1.3->channels)
Requirement already satisfied: Automat>=0.3.0 in g:\django\projectChat\venv\lib\site-packages (from twiste
d>=17.1->daphne~=1.3->channels)
Requirement already satisfied: hyperlink>=17.1.1 in g:\django\projectChat\venv\lib\site-packages (from twi
sted>=17.1->daphne~=1.3->channels)
Requirement already satisfied: setuptools in g:\django\projectChat\venv\lib\site-packages (from zope.inter
face>=4.0.2->twisted>=17.1->daphne~=1.3->channels)
Requirement already satisfied: attrs in g:\django\projectChat\venv\lib\site-packages (from Automat>=0.3.0-
>twisted>=17.1->daphne~=1.3->channels)
Installing collected packages: twisted, daphne, channels
Running setup.py install for twisted ... error
Complete output from command G:\django\projectChat\venv\Scripts\python.exe -u -c "import setuptools, t
okenize;__file__='C:\\Users\\Mike\\AppData\\Local\\Temp\\pip-build-ngnwgsvg\\twisted\\setup.py';f=getattr(tokenize, 'open'
, open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Use
rs\Mike\AppData\Local\Temp\pip-y5sbi03u-record\install-record.txt --single-version-externally-managed --compile --install-
headers G:\django\projectChat\venv\include\site\python3.5\twisted:
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.5
creating build\lib.win-amd64-3.5\twisted
copying src\twisted\copyright.py -> build\lib.win-amd64-3.5\twisted
copying src\twisted\plugin.py -> build\lib.win-amd64-3.5\twisted
copying src\twisted\_version.py -> build\lib.win-amd64-3.5\twisted
copying src\twisted\__init__.py -> build\lib.win-amd64-3.5\twisted
copying src\twisted\__main__.py -> build\lib.win-amd64-3.5\twisted
creating build\lib.win-amd64-3.5\twisted\application
copying src\twisted\application\app.py -> build\lib.win-amd64-3.5\twisted\application
copying src\twisted\application\internet.py -> build\lib.win-amd64-3.5\twisted\application
copying src\twisted\application\reactors.py -> build\lib.win-amd64-3.5\twisted\application
copying src\twisted\application\service.py -> build\lib.win-amd64-3.5\twisted\application
copying src\twisted\application\strports.py -> build\lib.win-amd64-3.5\twisted\application
copying src\twisted\application\__init__.py -> build\lib.win-amd64-3.5\twisted\application
creating build\lib.win-amd64-3.5\twisted\conch
copying src\twisted\conch\avatar.py -> build\lib.win-amd64-3.5\twisted\conch
[...]
creating build\lib.win-amd64-3.5\twisted\_threads\test
copying src\twisted\_threads\test\test_convenience.py -> build\lib.win-amd64-3.5\twisted\_threads\test
copying src\twisted\_threads\test\test_memory.py -> build\lib.win-amd64-3.5\twisted\_threads\test
copying src\twisted\_threads\test\test_team.py -> build\lib.win-amd64-3.5\twisted\_threads\test
copying src\twisted\_threads\test\test_threadworker.py -> build\lib.win-amd64-3.5\twisted\_threads\test
copying src\twisted\_threads\test\__init__.py -> build\lib.win-amd64-3.5\twisted\_threads\test
running egg_info
writing dependency_links to src\Twisted.egg-info\dependency_links.txt
writing entry points to src\Twisted.egg-info\entry_points.txt
writing src\Twisted.egg-info\PKG-INFO
writing top-level names to src\Twisted.egg-info\top_level.txt
writing requirements to src\Twisted.egg-info\requires.txt
reading manifest file 'src\Twisted.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*.misc' found under directory 'src\twisted'
warning: no previously-included files matching '*.bugfix' found under directory 'src\twisted'
warning: no previously-included files matching '*.doc' found under directory 'src\twisted'
warning: no previously-included files matching '*.feature' found under directory 'src\twisted'
warning: no previously-included files matching '*.removal' found under directory 'src\twisted'
warning: no previously-included files matching 'NEWS' found under directory 'src\twisted'
warning: no previously-included files matching 'README' found under directory 'src\twisted'
warning: no previously-included files matching 'newsfragments' found under directory 'src\twisted'
warning: no previously-included files found matching 'src\twisted\topfiles\CREDITS'
warning: no previously-included files found matching 'src\twisted\topfiles\ChangeLog.Old'
warning: no previously-included files found matching 'pyproject.toml'
warning: no previously-included files found matching 'codecov.yml'
warning: no previously-included files found matching 'appveyor.yml'
no previously-included directories found matching 'bin'
no previously-included directories found matching 'admin'
no previously-included directories found matching '.travis'
warning: no previously-included files found matching 'docs\historic\2003'
warning: no previously-included files matching '*' found under directory 'docs\historic\2003'
writing manifest file 'src\Twisted.egg-info\SOURCES.txt'
copying src\twisted\python\_sendmsg.c -> build\lib.win-amd64-3.5\twisted\python
copying src\twisted\python\twisted-completion.zsh -> build\lib.win-amd64-3.5\twisted\python
creating build\lib.win-amd64-3.5\twisted\python\_pydoctortemplates
copying src\twisted\python\_pydoctortemplates\common.html -> build\lib.win-amd64-3.5\twisted\python\_pydoctortemplates
copying src\twisted\python\_pydoctortemplates\index.html -> build\lib.win-amd64-3.5\twisted\python\_pydoctortemplates
copying src\twisted\python\_pydoctortemplates\summary.html -> build\lib.win-amd64-3.5\twisted\python\_pydoctortemplates
copying src\twisted\test\cert.pem.no_trailing_newline -> build\lib.win-amd64-3.5\twisted\test
copying src\twisted\test\key.pem.no_trailing_newline -> build\lib.win-amd64-3.5\twisted\test
copying src\twisted\test\raiser.c -> build\lib.win-amd64-3.5\twisted\test
copying src\twisted\test\raiser.pyx -> build\lib.win-amd64-3.5\twisted\test
copying src\twisted\test\server.pem -> build\lib.win-amd64-3.5\twisted\test
copying src\twisted\internet\iocpreactor\build.bat -> build\lib.win-amd64-3.5\twisted\internet\iocpreactor
copying src\twisted\internet\iocpreactor\notes.txt -> build\lib.win-amd64-3.5\twisted\internet\iocpreactor
creating build\lib.win-amd64-3.5\twisted\internet\iocpreactor\iocpsupport
copying src\twisted\internet\iocpreactor\iocpsupport\acceptex.pxi -> build\lib.win-amd64-3.5\twisted\internet\iocpreactor\
iocpsupport
copying src\twisted\internet\iocpreactor\iocpsupport\connectex.pxi -> build\lib.win-amd64-3.5\twisted\internet\iocpreactor
\iocpsupport
copying src\twisted\internet\iocpreactor\iocpsupport\iocpsupport.c -> build\lib.win-amd64-3.5\twisted\internet\iocpreactor
\iocpsupport
copying src\twisted\internet\iocpreactor\iocpsupport\iocpsupport.pyx -> build\lib.win-amd64-3.5\twisted\internet\iocpreact
or\iocpsupport
copying src\twisted\internet\iocpreactor\iocpsupport\winsock_pointers.c -> build\lib.win-amd64-3.5\twisted\internet\iocpre
actor\iocpsupport
copying src\twisted\internet\iocpreactor\iocpsupport\winsock_pointers.h -> build\lib.win-amd64-3.5\twisted\internet\iocpre
actor\iocpsupport
copying src\twisted\internet\iocpreactor\iocpsupport\wsarecv.pxi -> build\lib.win-amd64-3.5\twisted\internet\iocpreactor\i
ocpsupport
copying src\twisted\internet\iocpreactor\iocpsupport\wsasend.pxi -> build\lib.win-amd64-3.5\twisted\internet\iocpreactor\i
ocpsupport
copying src\twisted\internet\test\_awaittests.py.3only -> build\lib.win-amd64-3.5\twisted\internet\test
copying src\twisted\internet\test\_yieldfromtests.py.3only -> build\lib.win-amd64-3.5\twisted\internet\test
creating build\lib.win-amd64-3.5\twisted\internet\test\fake_CAs
copying src\twisted\internet\test\fake_CAs\chain.pem -> build\lib.win-amd64-3.5\twisted\internet\test\fake_CAs
copying src\twisted\internet\test\fake_CAs\not-a-certificate -> build\lib.win-amd64-3.5\twisted\internet\test\fake_CAs
copying src\twisted\internet\test\fake_CAs\thing1.pem -> build\lib.win-amd64-3.5\twisted\internet\test\fake_CAs
copying src\twisted\internet\test\fake_CAs\thing2-duplicate.pem -> build\lib.win-amd64-3.5\twisted\internet\test\fake_CAs
copying src\twisted\internet\test\fake_CAs\thing2.pem -> build\lib.win-amd64-3.5\twisted\internet\test\fake_CAs
copying src\twisted\mail\test\rfc822.message -> build\lib.win-amd64-3.5\twisted\mail\test
copying src\twisted\python\test\_deprecatetests.py.3only -> build\lib.win-amd64-3.5\twisted\python\test
copying src\twisted\words\im\instancemessenger.glade -> build\lib.win-amd64-3.5\twisted\words\im
copying src\twisted\words\xish\xpathparser.g -> build\lib.win-amd64-3.5\twisted\words\xish
running build_ext
building 'twisted.test.raiser' extension
error: [WinError 2] The system cannot find the file specified
----------------------------------------
Command "G:\django\projectChat\venv\Scripts\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Us
ers\\Mike\\AppData\\Local\\Temp\\pip-build-ngnwgsvg\\twisted\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f
.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\Mike\AppData\Loca
l\Temp\pip-y5sbi03u-record\install-record.txt --single-version-externally-managed --compile --install-headers G:\django\projectChat\venv\include\site\python3.5\twisted" failed with error code 1 in C:\Users\Mike\AppData\Local\Tem
p\pip-build-ngnwgsvg\twisted\
I don't know what i'm missing, could someone help me please, thanks.
You need a working C compiler to install Twisted on platforms for which wheels are not provided. There is no Python 3.5 wheel on PyPI for Twisted (at this time). So you need a working C compiler.
Follow these instructions for installing VS2015 to get a working C compiler so Twisted can build the necessary extension modules and install successfully.
The problem is not regarding the need for Visual C++ 14.0 or whatsoever. It is concerned with the installation of Twisted. I was able to fix this problem after trying for weeks together.
To install the correct version of Twisted visit this link. (Found this on a similar question's answer, I'm not sure of the writer to give rightful credits).
The above-mentioned link displays several versions of Twisted. You should download the one corresponding to your python version. For instance, if your python version is 3.5, you should proceed with downloading cp35m-win32.whl (For Windows only) and so forth.
Further, open Command prompt, go to the downloaded path activate your virtual environment and pip install the downloaded file.
This shall fix your issue.
I had a similar problem... I was only able to fix it by downloading Visual Studio Build tools and installing the Visual C++ Build Tools, Windows 10 SDK, and VC++ 2015.3 v14
Microsoft Visual C++ is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/
here https://www.dropbox.com/developers-v1/core/sdks/python im download SDK and then try to run setup code on windows server 2008 like this:
C:\Users\Administrator>C:\Users\Administrator\AppData\Local\Programs\Python\Pyth
on36-32\python.exe C:\Users\Administrator\Desktop\dropbox-python-sdk-2.2.0\setup
.py install
and then got this in console:
running install
running bdist_egg
running egg_info
writing dropbox.egg-info\PKG-INFO
writing dependency_links to dropbox.egg-info\dependency_links.txt
writing requirements to dropbox.egg-info\requires.txt
writing top-level names to dropbox.egg-info\top_level.txt
warning: manifest_maker: standard file 'setup.py' not found
package init file 'C:/Users/Administrator/AppData/Local/Programs/Python/Python36
-32/dropbox\__init__.py' not found (or not a regular file)
package init file 'C:/Users/Administrator/AppData/Local/Programs/Python/Python36
-32/tests\__init__.py' not found (or not a regular file)
reading manifest file 'dropbox.egg-info\SOURCES.txt'
writing manifest file 'dropbox.egg-info\SOURCES.txt'
installing library code to build\bdist.win32\egg
running install_lib
running build_py
warning: install_lib: 'build\lib' does not exist -- no Python modules to install
creating build\bdist.win32\egg
creating build\bdist.win32\egg\EGG-INFO
copying dropbox.egg-info\PKG-INFO -> build\bdist.win32\egg\EGG-INFO
copying dropbox.egg-info\SOURCES.txt -> build\bdist.win32\egg\EGG-INFO
copying dropbox.egg-info\dependency_links.txt -> build\bdist.win32\egg\EGG-INFO
copying dropbox.egg-info\requires.txt -> build\bdist.win32\egg\EGG-INFO
copying dropbox.egg-info\top_level.txt -> build\bdist.win32\egg\EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating 'dist\dropbox-2.2.0-py3.6.egg' and adding 'build\bdist.win32\egg' to it
removing 'build\bdist.win32\egg' (and everything under it)
Processing dropbox-2.2.0-py3.6.egg
Removing c:\users\administrator\appdata\local\programs\python\python36-32\lib\si
te-packages\dropbox-2.2.0-py3.6.egg
Copying dropbox-2.2.0-py3.6.egg to c:\users\administrator\appdata\local\programs
\python\python36-32\lib\site-packages
dropbox 2.2.0 is already the active version in easy-install.pth
Installed c:\users\administrator\appdata\local\programs\python\python36-32\lib\s
ite-packages\dropbox-2.2.0-py3.6.egg
Processing dependencies for dropbox==2.2.0
Searching for urllib3==1.21.1
Best match: urllib3 1.21.1
Processing urllib3-1.21.1-py3.6.egg
urllib3 1.21.1 is already the active version in easy-install.pth
Using c:\users\administrator\appdata\local\programs\python\python36-32\lib\site-
packages\urllib3-1.21.1-py3.6.egg
Finished processing dependencies for dropbox==2.2.0
and nothing happened, folders "dropbox" and "tests" still empty
whats wrong?
Running Python 2.7 X86 on Snow Leopard. Installed 64 bit MySQL to avoid conflicts between bit versions. However, still have issues installing MySQLdb.
After following this and various other online guides I'm still no closer. The output I receive during install is:
$ ARCHFLAGS='-arch x86_64' python setup.py install
running install
running bdist_egg
running egg_info
writing MySQL_python.egg-info/PKG-INFO
writing top-level names to MySQL_python.egg-info/top_level.txt
writing dependency_links to MySQL_python.egg-info/dependency_links.txt
reading manifest file 'MySQL_python.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'MANIFEST'
warning: no files found matching 'ChangeLog'
warning: no files found matching 'GPL'
writing manifest file 'MySQL_python.egg-info/SOURCES.txt'
installing library code to build/bdist.macosx-10.6-x86_64/egg
running install_lib
running build_py
copying MySQLdb/release.py -> build/lib.macosx-10.6-x86_64-2.7/MySQLdb
running build_ext
copying build/lib.macosx-10.6-x86_64-2.7/MySQLdb/release.py -> build/bdist.macosx-10.6-x86_64/egg/MySQLdb
byte-compiling build/bdist.macosx-10.6-x86_64/egg/MySQLdb/release.py to release.pyc
creating stub loader for _mysql.so
byte-compiling build/bdist.macosx-10.6-x86_64/egg/_mysql.py to _mysql.pyc
copying MySQL_python.egg-info/PKG-INFO -> build/bdist.macosx-10.6-x86_64/egg/EGG-INFO
copying MySQL_python.egg-info/SOURCES.txt -> build/bdist.macosx-10.6-x86_64/egg/EGG-INFO
copying MySQL_python.egg-info/dependency_links.txt -> build/bdist.macosx-10.6-x86_64/egg/EGG-INFO
copying MySQL_python.egg-info/top_level.txt -> build/bdist.macosx-10.6-x86_64/egg/EGG-INFO
writing build/bdist.macosx-10.6-x86_64/egg/EGG-INFO/native_libs.txt
zip_safe flag not set; analyzing archive contents...
creating 'dist/MySQL_python-1.2.3-py2.7-macosx-10.6-x86_64.egg' and adding 'build/bdist.macosx- 10.6-x86_64/egg' to it
error: dist/MySQL_python-1.2.3-py2.7-macosx-10.6-x86_64.egg: Permission denied
Anyone know where I am going wrong?
Chances are that at one point you tried running python setup.py under sudo and now have a dist directory belonging to root. Clear out the existing dist subdirectory in your build directory and rerun:
sudo rm -rf ./dist
ARCHFLAGS='-arch x86_64' python setup.py install
If you then get permission errors in the final install step, you may need to run the install step under sudo:
sudo bash
export ARCHFLAGS='-arch x86_64'
/path/to/same/python2.7 setup.py install
exit
but it's probably better to not do that if you don't have to.