I download the rpy2-2.2.3 , and try to : python setup.py install on my windows xp computer with R: 2.12.2 , Python: 2.6.1 , after copying some files, it shows below error msg. How to fix ?
Traceback (most recent call last):
File "setup.py", line 441, in <module>
[os.path.join('doc', 'source', 'rpy2_logo.png')])],
File "D:\Python\lib\distutils\core.py", line 152, in setup
dist.run_commands()
File "D:\Python\lib\distutils\dist.py", line 975, in run_commands
self.run_command(cmd)
File "D:\Python\lib\distutils\dist.py", line 995, in run_command
cmd_obj.run()
File "D:\Python\lib\distutils\command\install.py", line 577, in run
self.run_command('build')
File "D:\Python\lib\distutils\cmd.py", line 333, in run_command
self.distribution.run_command(command)
File "D:\Python\lib\distutils\dist.py", line 995, in run_command
cmd_obj.run()
File "D:\Python\lib\distutils\command\build.py", line 134, in run
self.run_command(cmd_name)
File "D:\Python\lib\distutils\cmd.py", line 333, in run_command
self.distribution.run_command(command)
File "D:\Python\lib\distutils\dist.py", line 994, in run_command
cmd_obj.ensure_finalized()
File "D:\Python\lib\distutils\cmd.py", line 117, in ensure_finalized
self.finalize_options()
File "setup.py", line 144, in finalize_options
rversion = get_rversion(r_home)
File "setup.py", line 186, in get_rversion
rversion = m.groups()[0]
AttributeError: 'NoneType' object has no attribute 'groups'
R: 2.12.2 , Python: 2.6.1
Latest is rpy2-2.2.7.
rpy2-2.3.0beta is in fact the latest
No official support for Win32 (or Win64) but it might build with the latest rpy2
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 a python package DMRG101 on Linux Zorin. I get this package from GitHub https://github.com/iglpdc/dmrg101. I have python 2.7.12 and python 3.5.2 installed. I tried to install this package using
python setup.py install
but it is giving me the following error
running install
running build
running build_py
running install_lib
running install_egg_info
Traceback (most recent call last):
File "setup.py", line 30, in <module>
requires = [],
File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/usr/lib/python2.7/distutils/command/install.py", line 613, in run
self.run_command(cmd_name)
File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "/usr/lib/python2.7/distutils/dist.py", line 971, in run_command
cmd_obj.ensure_finalized()
File "/usr/lib/python2.7/distutils/cmd.py", line 109, in ensure_finalized
self.finalize_options()
File "/usr/lib/python2.7/distutils/command/install_egg_info.py", line 46, in finalize_options
to_filename(safe_version(self.distribution.get_version()))
File "/usr/lib/python2.7/distutils/command/install_egg_info.py", line 88, in safe_version
version = version.replace(' ','.')
AttributeError: 'float' object has no attribute 'replace'
how can I eliminate this error?
I just go to install_egg_info.py and modify this line as:
version = str(version).replace(' ','.')
Then, rerun the install command again and it works.
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!
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.
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/