Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install asking for python3 while using python 2 #67

Open
Psy-Fer opened this issue Aug 23, 2019 · 4 comments
Open

Install asking for python3 while using python 2 #67

Psy-Fer opened this issue Aug 23, 2019 · 4 comments
Assignees
Labels

Comments

@Psy-Fer
Copy link

Psy-Fer commented Aug 23, 2019

Hello,

I am following on from this issue over at circtools ( dieterich-lab/circtools#82 )

So I made a python2 venv, and while trying to install, it's now telling me I need python 3?

I've dropped the stacktrace below.

Any help would be appreciated.

Cheers,

Processing dependencies for DCC==0.4.7
Searching for pandas<0.24.0
Reading https://pypi.org/simple/pandas/
Downloading https://files.pythonhosted.org/packages/e9/ad/5e92ba493eff96055a23b0a1323a9a803af71ec859ae3243ced86fcbd0a4/pandas-0.23.4.tar.gz#sha256=5b24ca47acf69222e82530e89111dd9d14f9b970ab2cd3a1c2c78f0c4fbba4f4
Best match: pandas 0.23.4
Processing pandas-0.23.4.tar.gz
Writing /tmp/easy_install-24Uv/pandas-0.23.4/setup.cfg
Running pandas-0.23.4/setup.py -q bdist_egg --dist-dir /tmp/easy_install-24Uv/pandas-0.23.4/egg-dist-tmp-znTUbd
Traceback (most recent call last):
File "setup.py", line 122, in
'scripts/DCC',
File "/home/jamfer/work/sandy2714/lib/python2.7/site-packages/setuptools/init.py", line 145, in setup
return distutils.core.setup(**attrs)
File "/home/jamfer/work/python-2714/lib/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
File "/home/jamfer/work/python-2714/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/home/jamfer/work/python-2714/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/home/jamfer/work/sandy2714/lib/python2.7/site-packages/setuptools/command/install.py", line 67, in run
self.do_egg_install()
File "/home/jamfer/work/sandy2714/lib/python2.7/site-packages/setuptools/command/install.py", line 117, in do_egg_install
cmd.run()
File "/home/jamfer/work/sandy2714/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 418, in run
self.easy_install(spec, not self.no_deps)
File "/home/jamfer/work/sandy2714/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 660, in easy_install
return self.install_item(None, spec, tmpdir, deps, True)
File "/home/jamfer/work/sandy2714/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 707, in install_item
self.process_distribution(spec, dist, deps)
File "/home/jamfer/work/sandy2714/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 752, in process_distribution
[requirement], self.local_index, self.easy_install
File "/home/jamfer/work/sandy2714/lib/python2.7/site-packages/pkg_resources/init.py", line 782, in resolve
replace_conflicting=replace_conflicting
File "/home/jamfer/work/sandy2714/lib/python2.7/site-packages/pkg_resources/init.py", line 1065, in best_match
return self.obtain(req, installer)
File "/home/jamfer/work/sandy2714/lib/python2.7/site-packages/pkg_resources/init.py", line 1077, in obtain
return installer(requirement)
File "/home/jamfer/work/sandy2714/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 679, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "/home/jamfer/work/sandy2714/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 705, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "/home/jamfer/work/sandy2714/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 890, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "/home/jamfer/work/sandy2714/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1158, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "/home/jamfer/work/sandy2714/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1144, in run_setup
run_setup(setup_script, args)
File "/home/jamfer/work/sandy2714/lib/python2.7/site-packages/setuptools/sandbox.py", line 253, in run_setup
raise
File "/home/jamfer/work/python-2714/lib/python2.7/contextlib.py", line 35, in exit
self.gen.throw(type, value, traceback)
File "/home/jamfer/work/sandy2714/lib/python2.7/site-packages/setuptools/sandbox.py", line 195, in setup_context
yield
File "/home/jamfer/work/python-2714/lib/python2.7/contextlib.py", line 35, in exit
self.gen.throw(type, value, traceback)
File "/home/jamfer/work/sandy2714/lib/python2.7/site-packages/setuptools/sandbox.py", line 166, in save_modules
saved_exc.resume()
File "/home/jamfer/work/sandy2714/lib/python2.7/site-packages/setuptools/sandbox.py", line 141, in resume
six.reraise(type, exc, self._tb)
File "/home/jamfer/work/sandy2714/lib/python2.7/site-packages/setuptools/sandbox.py", line 154, in save_modules
yield saved
File "/home/jamfer/work/sandy2714/lib/python2.7/site-packages/setuptools/sandbox.py", line 195, in setup_context
yield
File "/home/jamfer/work/sandy2714/lib/python2.7/site-packages/setuptools/sandbox.py", line 250, in run_setup
_execfile(setup_script, ns)
File "/home/jamfer/work/sandy2714/lib/python2.7/site-packages/setuptools/sandbox.py", line 45, in _execfile
exec(code, globals, locals)
File "/tmp/easy_install-24Uv/pandas-0.23.4/setup.py", line 749, in

File "/home/jamfer/work/sandy2714/lib/python2.7/site-packages/setuptools/init.py", line 144, in setup
_install_setup_requires(attrs)
File "/home/jamfer/work/sandy2714/lib/python2.7/site-packages/setuptools/init.py", line 139, in _install_setup_requires
dist.fetch_build_eggs(dist.setup_requires)
File "/home/jamfer/work/sandy2714/lib/python2.7/site-packages/setuptools/dist.py", line 719, in fetch_build_eggs
replace_conflicting=True,
File "/home/jamfer/work/sandy2714/lib/python2.7/site-packages/pkg_resources/init.py", line 782, in resolve
replace_conflicting=replace_conflicting
File "/home/jamfer/work/sandy2714/lib/python2.7/site-packages/pkg_resources/init.py", line 1065, in best_match
return self.obtain(req, installer)
File "/home/jamfer/work/sandy2714/lib/python2.7/site-packages/pkg_resources/init.py", line 1077, in obtain
return installer(requirement)
File "/home/jamfer/work/sandy2714/lib/python2.7/site-packages/setuptools/dist.py", line 786, in fetch_build_egg
return cmd.easy_install(req)
File "/home/jamfer/work/sandy2714/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 679, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "/home/jamfer/work/sandy2714/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 705, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "/home/jamfer/work/sandy2714/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 890, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "/home/jamfer/work/sandy2714/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1158, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "/home/jamfer/work/sandy2714/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1144, in run_setup
run_setup(setup_script, args)
File "/home/jamfer/work/sandy2714/lib/python2.7/site-packages/setuptools/sandbox.py", line 253, in run_setup
raise
File "/home/jamfer/work/python-2714/lib/python2.7/contextlib.py", line 35, in exit
self.gen.throw(type, value, traceback)
File "/home/jamfer/work/sandy2714/lib/python2.7/site-packages/setuptools/sandbox.py", line 195, in setup_context
yield
File "/home/jamfer/work/python-2714/lib/python2.7/contextlib.py", line 35, in exit
self.gen.throw(type, value, traceback)
File "/home/jamfer/work/sandy2714/lib/python2.7/site-packages/setuptools/sandbox.py", line 166, in save_modules
saved_exc.resume()
File "/home/jamfer/work/sandy2714/lib/python2.7/site-packages/setuptools/sandbox.py", line 141, in resume
six.reraise(type, exc, self._tb)
File "/home/jamfer/work/sandy2714/lib/python2.7/site-packages/setuptools/sandbox.py", line 154, in save_modules
yield saved
File "/home/jamfer/work/sandy2714/lib/python2.7/site-packages/setuptools/sandbox.py", line 195, in setup_context
yield
File "/home/jamfer/work/sandy2714/lib/python2.7/site-packages/setuptools/sandbox.py", line 250, in run_setup
_execfile(setup_script, ns)
File "/home/jamfer/work/sandy2714/lib/python2.7/site-packages/setuptools/sandbox.py", line 45, in _execfile
exec(code, globals, locals)
File "/tmp/easy_install-24Uv/pandas-0.23.4/temp/easy_install-eSXFWu/numpy-1.17.0/setup.py", line 31, in
url='https://github.com/dieterich-lab/DCC',
RuntimeError: Python version >= 3.5 required.

@Psy-Fer
Copy link
Author

Psy-Fer commented Aug 23, 2019

Hmm, it seems installing FUCHS on the same environment first, solves the issue. Though I imagine this isn't the intended method.

@Psy-Fer
Copy link
Author

Psy-Fer commented Aug 23, 2019

Also, while trying to use python scripts/DCC

I get the following error

python scripts/DCC -h
Traceback (most recent call last):
File "DCC", line 5, in
DCC.main.main()
AttributeError: 'function' object has no attribute 'main'

I changed DCC to the following, and it works fine

#!/usr/bin/env python2

import DCC.main

DCC.main()

@Psy-Fer
Copy link
Author

Psy-Fer commented Aug 23, 2019

same goes for FUCHS, the script tries to open main, but there is no main in the FUCHS directory, only FUCHS.py, which has a main() function.

changed it to

#!/usr/bin/env python

import FUCHS.FUCHS as fu

fu.main()

as no FUCHS given

@tjakobi tjakobi self-assigned this Aug 23, 2019
@tjakobi tjakobi added the bug label Aug 23, 2019
@tjakobi
Copy link
Contributor

tjakobi commented Aug 26, 2019

Hi @Psy-Fer,

I am wondering why DCC tries to install numpy 1.17.0. The setup files specifically lists < 1.17.0 as requirement. It is in the master branch, therefore git you do a git clone, that change should already be in there. Seems to be pulled in by pandas?

Could you start with a clean venv and install 1) only DCC and then 2) in another new venv just FUCHS to be able to see where these issues arise?

Cheers,
Tobias

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants