First I've no experience with python. I just want to install a module in blender which comes with a setup.py. It seems that I need Cython to install that. I added Cython to PYTHONPATH and the bin folder to the PATH. This error is shown:
python setup.py install
running install
running build
running build_ext
Traceback (most recent call last):
File "setup.py", line 17, in <module>
cmdclass = {'build_ext': build_ext})
File "C:\Python33\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Python33\lib\distutils\dist.py", line 917, in run_commands
self.run_command(cmd)
File "C:\Python33\lib\distutils\dist.py", line 936, in run_command
cmd_obj.run()
File "C:\Python33\lib\distutils\command\install.py", line 569, in run
self.run_command('build')
File "C:\Python33\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Python33\lib\distutils\dist.py", line 936, in run_command
cmd_obj.run()
File "C:\Python33\lib\distutils\command\build.py", line 126, in run
self.run_command(cmd_name)
File "C:\Python33\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Python33\lib\distutils\dist.py", line 936, in run_command
cmd_obj.run()
File "C:\Cython-0.19.1\Cython\Distutils\build_ext.py", line 163, in run
_build_ext.build_ext.run(self)
File "C:\Python33\lib\distutils\command\build_ext.py", line 354, in run
self.build_extensions()
File "C:\Cython-0.19.1\Cython\Distutils\build_ext.py", line 170, in build_extensions
ext.sources = self.cython_sources(ext.sources, ext)
File "C:\Cython-0.19.1\Cython\Distutils\build_ext.py", line 181, in cython_sources
from Cython.Compiler.Main \
File "C:\Cython-0.19.1\Cython\Compiler\Main.py", line 302
except UnicodeDecodeError#, e:
^
SyntaxError: invalid syntax
Versions are: Python 3.3 / Windows7 64 / Cython-0.19.1
Any ideas, what should I try?
It looks like your Cython installation was damaged somehow. You might want to consider getting a fresh installation, perhaps from the Cython Windows installer for Python 3.3.
Related
I am trying to install the Python package "py_coda" from this github:
https://github.com/surhudm/py-coda
I am following the steps in the README.md but when I enter the following command:
python setup.py install
I receive the following error:
running install /home/osgrinds/mnt/c/Users/Owner/anaconda3/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. warnings.warn( /home/osgrinds/mnt/c/Users/Owner/anaconda3/lib/python3.9/site-packages/setuptools/command/easy_install.py:144: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools. warnings.warn( running bdist_egg running egg_info writing src/py_coda.egg-info/PKG-INFO Traceback (most recent call last): File "/mnt/c/Users/Owner/Desktop/Stage_2022/BH_M-sigma_compilation/py-coda/setup.py", line 5, in setup(name='py-coda', File "/home/osgrinds/mnt/c/Users/Owner/anaconda3/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 148, in setup return run_commands(dist) File "/home/osgrinds/mnt/c/Users/Owner/anaconda3/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 163, in run_commands dist.run_commands() File "/home/osgrinds/mnt/c/Users/Owner/anaconda3/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 967, in run_commands self.run_command(cmd) File "/home/osgrinds/mnt/c/Users/Owner/anaconda3/lib/python3.9/site-packages/setuptools/dist.py", line 1214, in run_command super().run_command(command) File "/home/osgrinds/mnt/c/Users/Owner/anaconda3/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 986, in run_command cmd_obj.run() File "/home/osgrinds/mnt/c/Users/Owner/anaconda3/lib/python3.9/site-packages/setuptools/command/install.py", line 74, in run self.do_egg_install() File "/home/osgrinds/mnt/c/Users/Owner/anaconda3/lib/python3.9/site-packages/setuptools/command/install.py", line 123, in do_egg_install self.run_command('bdist_egg') File "/home/osgrinds/mnt/c/Users/Owner/anaconda3/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/home/osgrinds/mnt/c/Users/Owner/anaconda3/lib/python3.9/site-packages/setuptools/dist.py", line 1214, in run_command super().run_command(command) File "/home/osgrinds/mnt/c/Users/Owner/anaconda3/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 986, in run_command cmd_obj.run() File "/home/osgrinds/mnt/c/Users/Owner/anaconda3/lib/python3.9/site-packages/setuptools/command/bdist_egg.py", line 156, in run self.run_command("egg_info") File "/home/osgrinds/mnt/c/Users/Owner/anaconda3/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/home/osgrinds/mnt/c/Users/Owner/anaconda3/lib/python3.9/site-packages/setuptools/dist.py", line 1214, in run_command super().run_command(command) File "/home/osgrinds/mnt/c/Users/Owner/anaconda3/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 986, in run_command cmd_obj.run() File "/home/osgrinds/mnt/c/Users/Owner/anaconda3/lib/python3.9/site-packages/setuptools/command/egg_info.py", line 291, in run writer(self, ep.name, os.path.join(self.egg_info, ep.name)) File "/home/osgrinds/mnt/c/Users/Owner/anaconda3/lib/python3.9/site-packages/setuptools/command/egg_info.py", line 655, in write_pkg_info metadata.write_pkg_info(cmd.egg_info) File "/home/osgrinds/mnt/c/Users/Owner/anaconda3/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 1118, in write_pkg_info self.write_pkg_file(pkg_info) File "/home/osgrinds/mnt/c/Users/Owner/anaconda3/lib/python3.9/site-packages/setuptools/dist.py", line 193, in write_pkg_file license = rfc822_escape(self.get_license()) File "/home/osgrinds/mnt/c/Users/Owner/anaconda3/lib/python3.9/site-packages/setuptools/_distutils/util.py", line 494, in rfc822_escape lines = header.split('\n') AttributeError: 'list' object has no attribute 'split'
I'm not sure what is causing this or how to solve it.
You can try installing from the source(git) by
pip install git+https://github.com/surhudm/py-coda
I am trying to install Gelatin for python 3 with pip and I am getting this traceback:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\abejd\AppData\Local\Temp\pip-build-u3685bna\SimpleParse\setup.py", line 108, in <module>
**extraArguments
File "c:\python36-32\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "c:\python36-32\lib\distutils\dist.py", line 955, in run_commands
self.run_command(cmd)
File "c:\python36-32\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Python27\Lib\site-packages\setuptools\command\install.py", line 61, in run
return orig.install.run(self)
File "c:\python36-32\lib\distutils\command\install.py", line 557, in run
self.run_command(cmd_name)
File "c:\python36-32\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\python36-32\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Python27\Lib\site-packages\setuptools\command\install_egg_info.py", line 34, in run
self.run_command('egg_info')
File "c:\python36-32\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\python36-32\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Python27\Lib\site-packages\setuptools\command\egg_info.py", line 279, in run
self.find_sources()
File "C:\Python27\Lib\site-packages\setuptools\command\egg_info.py", line 306, in find_sources
mm.run()
File "C:\Python27\Lib\site-packages\setuptools\command\egg_info.py", line 533, in run
self.add_defaults()
File "C:\Python27\Lib\site-packages\setuptools\command\egg_info.py", line 569, in add_defaults
self.read_manifest()
File "C:\Python27\Lib\site-packages\setuptools\command\sdist.py", line 201, in read_manifest
self.filelist.append(line)
File "C:\Python27\Lib\site-packages\setuptools\command\egg_info.py", line 475, in append
path = convert_path(item)
File "c:\python36-32\lib\distutils\util.py", line 125, in convert_path
raise ValueError("path '%s' cannot be absolute" % pathname)
ValueError: path '/home/mcfletch/OpenGL-dev/simpleparse/simpleparse/stt/TextTools/mxTextTools/mxTextTools.c' cannot be absolute
I have tried 2 solutions but to no avail have I solved the problem. If there is any other information that I can provide to try and fix this please let me know.
Thanks ahead of time!
I had similar problem with pg-chameleon, caused by this rows in setup.py:
conf_dir = "/%s/pg_chameleon/configuration" % python_lib
conn_dir = "/%s/pg_chameleon/connection" % python_lib
sql_dir = "/%s/pg_chameleon/sql" % python_lib
sql_up_dir = "/%s/pg_chameleon/%s" % (python_lib, sql_up_path)
Error looked like:
ValueError: path '/f:\work\pycharmprojects\virtualenvironments\mysql2psql\Lib\site-packages/pg_chameleon/configuration' cannot be absolute
I solved this issue by downloading pg_chameleon-2.0.10.tar.gz and editing setup.py it (I removed '/' before '%s')
Then i did:
pip install "path-to-my-package"
and got
Successfully installed pg-chameleon-2.0.10
The problems seem to be related to the C:\Users\maparama\Documents\SimpleParse-2.2.0\SimpleParse-2.2.0\SimpleParse.egg-info\SOURCES.txt
Steps
Download the package from
https://pypi.org/project/SimpleParse/#files
Remove the SimpleParse.egg-info/ directory
perform python setup.py install.
C:\Users\maparama\Documents\SimpleParse-2.2.0\SimpleParse-2.2.0>pip list
Package Version
-------------- -------
gelatin 2.2.10 <---
lark-parser 0.6.4
lxml 4.2.5
pip 10.0.1
PyYAML 3.13
robotframework 3.0.4
setuptools 40.4.3
simpleparse 2.2.0
I'm having troubles installing python packages with PIP. I'm running on Windows 7, using pyzo IEP.
When typing pip install <package>, it starts running, downloading and copying files, but whenever it gets to the 'building' phase, it crashes, with several errors. Here is what I got when trying to install Biopython:
running build_ext
building 'Bio.cpairwise2' extension
Traceback (most recent call last):
File "", line 1, in
File "C:\Windows\Temp\pip_build_ItayMNB5\Biopython\setup.py", line
480, in
setup(**setup_args)
File "C:\pyzo2014a\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\pyzo2014a\lib\distutils\dist.py", line 955, in run_commands
self.run_command(cmd)
File "C:\pyzo2014a\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Windows\Temp\pip_build_ItayMNB5\Biopython\setup.py", line
235, in run
install.run(self)
File "C:\pyzo2014a\lib\distutils\command\install.py", line 554, in
run
self.run_command('build')
File "C:\pyzo2014a\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\pyzo2014a\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\pyzo2014a\lib\distutils\command\build.py", line 126, in run
self.run_command(cmd_name)
File "C:\pyzo2014a\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\pyzo2014a\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Windows\Temp\pip_build_ItayMNB5\Biopython\setup.py", line
252, in run
build_ext.run(self)
File "C:\pyzo2014a\lib\distutils\command\build_ext.py", line 348, in
run
self.build_extensions()
File "C:\pyzo2014a\lib\distutils\command\build_ext.py", line 457, in
build_extensions
self.build_extension(ext)
File "C:\pyzo2014a\lib\distutils\command\build_ext.py", line 512, in
build_extension
depends=ext.depends)
File "C:\pyzo2014a\lib\distutils\msvc9compiler.py", line 460, in
compile
self.initialize()
File "C:\pyzo2014a\lib\distutils\msvc9compiler.py", line 371, in
initialize
vc_env = query_vcvarsall(VERSION, plat_spec)
File "C:\pyzo2014a\lib\distutils\msvc9compiler.py", line 287, in
query_vcvarsall
raise ValueError(str(list(result.keys())))
ValueError: ['path']
Similar stuff comes up when I try to install other packages.
I tried reinstalling python, but nothing changed. Any ideas what the problem might be?
Thanks!
This question already has answers here:
rpy2 install on windows 7
(9 answers)
Closed 8 years ago.
I am trying to find solution for my problem, so far not with success.
I am trying to install latest Rpy2 version on my computer. I already have all required programs (R 2.15.1 and 2.7 Python) installed. I am installing Rpy2 (rpy2-2.3.0) trough cmd with command
python setup.py build install
I am getting this traceback:
Traceback (most recent call last):
File "setup.py", line 441, in
[os.path.join('doc', 'source', 'rpy2_logo.png')])],
File "c:\Python27\lib\distutils\core.py", line 152, in setup
dist.run_commands()
File "c:\Python27\lib\distutils\dist.py", line 953, in run_commands
self.run_command(cmd)
File "c:\Python27\lib\distutils\dist.py", line 972, in run_command
cmd_obj.>run()
File "c:\Python27\lib\distutils\command\install.py", line 563, in run
self.run_command('build')
File "c:\Python27\lib\distutils\cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "c:\Python27\lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "c:\Python27\lib\distutils\command\build.py", line 127, in run
self.run_command(cmd_name)
File "c:\Python27\lib\distutils\cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "c:\Python27\lib\distutils\dist.py", line 971, in run_command
cmd_obj.ensure_finalized()
File "c:\Python27\lib\distutils\cmd.py", line 109, in ensure_finalized
self.finalize_options()
File "setup.py", line 152, in finalize_options
config += get_rconfig(r_home, about)
File "setup.py", line 312, in get_rconfig
rc = RConfig.from_string(rconfig, allow_empty = allow_empty)
File "setup.py", line 272, in from_string
'\nin string\n' + string)
ValueError: Invalid substring
in string
The same error I get when trying to install with
easy_install rpy2
UPDATE: now the same error shows on the other pc (64bit)
Thanks for help! :D
Gave up on the rpy package. I will recommend PypeR package it is faster, easy to install (easy_install) and enjoyable to use! http://pypi.python.org/pypi/PypeR/
ValueError: invalid version number '2.20.51.20100613'
I'm having problems installing pycrypto. Tried package manager: pip & easy_install, didn't work. Tried to manually install it via "python setup.py install", the same error like the above appears.
I've followed the instructions here and got stuck at installing pycrypto after installing "mingW" gcc, g++ and msys-base (MSYS shell environment)
Not really sure what to do now after several days of trying.
Here's the complete output of the error:
C:\Users\Denz\Desktop>pip install pycrypto
Downloading/unpacking pycrypto
Running setup.py egg_info for package pycrypto
Installing collected packages: pycrypto
Running setup.py install for pycrypto
Traceback (most recent call last):
File "", line 1, in ?
File "C:\Users\Denz\Desktop\build\pycrypto\setup.py", line 340, in ?
core.setup(**kw)
File "C:\Python24\lib\distutils\core.py", line 149, in setup
dist.run_commands()
File "C:\Python24\lib\distutils\dist.py", line 946, in run_commands
self.run_command(cmd)
File "C:\Python24\lib\distutils\dist.py", line 966, in run_command
cmd_obj.run()
File "c:\python24\lib\site-packages\distribute-0.6.14-py2.4.egg\setuptools
\command\install.py", line 53, in run
return _install.run(self)
File "C:\Python24\lib\distutils\command\install.py", line 506, in run
self.run_command('build')
File "C:\Python24\lib\distutils\cmd.py", line 333, in run_command
self.distribution.run_command(command)
File "C:\Python24\lib\distutils\dist.py", line 966, in run_command
cmd_obj.run()
File "C:\Python24\lib\distutils\command\build.py", line 112, in run
self.run_command(cmd_name)
File "C:\Python24\lib\distutils\cmd.py", line 333, in run_command
self.distribution.run_command(command)
File "C:\Python24\lib\distutils\dist.py", line 966, in run_command
cmd_obj.run()
File "C:\Python24\lib\distutils\command\build_ext.py", line 253, in run
force=self.force)
File "C:\Python24\lib\distutils\ccompiler.py", line 1177, in new_compiler
return klass (None, dry_run, force)
File "C:\Python24\lib\distutils\cygwinccompiler.py", line 292, in init
CygwinCCompiler.__init__ (self, verbose, dry_run, force)
File "C:\Python24\lib\distutils\cygwinccompiler.py", line 83, in __init__
self.gcc_version, self.ld_version, self.dllwrap_version = \
File "C:\Python24\lib\distutils\cygwinccompiler.py", line 424, in get_versions
ld_version = StrictVersion(result.group(1))
File "C:\Python24\lib\distutils\version.py", line 40, in __init__
self.parse(vstring)
File "C:\Python24\lib\distutils\version.py", line 107, in parse
raise ValueError, "invalid version number '%s'" % vstring
ValueError: invalid version number '2.20.51.20100613'
You can get working windows binaries on this page.