Issue2477
Created on 2016-02-24.18:29:56 by pekka.klarck, last changed 2016-02-24.19:36:32 by zyasoft.
Messages | |||
---|---|---|---|
msg10782 (view) | Author: Pekka Klärck (pekka.klarck) | Date: 2016-02-24.18:29:56 | |
After a fresh Jython 2.7.1 beta 3 installation with default settings on Windows 7 with Java 1.8.0_73 neither `jython -m pip` nor `pip` work. C:\Users\peke>c:\jython2.7.1b3\bin\jython.exe -m pip install robotframework Traceback (most recent call last): File "C:\jython2.7.1b3\Lib\runpy.py", line 151, in _run_module_as_main mod_name, loader, code, fname = _get_module_details(mod_name) File "C:\jython2.7.1b3\Lib\runpy.py", line 151, in _run_module_as_main mod_name, loader, code, fname = _get_module_details(mod_name) File "C:\jython2.7.1b3\Lib\runpy.py", line 104, in _get_module_details if loader.is_package(mod_name): AttributeError: 'org.python.core.JavaImporter' object has no attribute 'is_package' C:\Users\peke>c:\jython2.7.1b3\bin\pip.exe install robotframework Traceback (most recent call last): File "C:\jython2.7.1b3\Lib\runpy.py", line 161, in _run_module_as_main return _run_code(code, main_globals, None, File "C:\jython2.7.1b3\Lib\runpy.py", line 72, in _run_code exec code in run_globals File "c:\jython2.7.1b3\bin\pip.exe\__main__.py", line 5, in <module> ImportError: cannot import name main |
|||
msg10783 (view) | Author: Jim Baker (zyasoft) | Date: 2016-02-24.18:58:09 | |
On Windows 8.1 and Java 7, both jython.exe -m pip and pip.exe work for me for installing robotframework: c:\jython2.7.1b3>bin\jython.exe Jython 2.7.1b3 (default:df42d5d6be04, Feb 3 2016, 03:22:46) [Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)] on java1.7.0_55 Type "help", "copyright", "credits" or "license" for more information. >>> c:\jython2.7.1b3>bin\jython.exe -m pip install robotframework Collecting robotframework Downloading robotframework-3.0.tar.gz (430kB) ←[K 100% |################################| 434kB 262kB/s ta 0:00:01 ←[?25hInstalling collected packages: robotframework Running setup.py install for robotframework Successfully installed robotframework-3.0 ←[33mYou are using pip version 7.1.2, however version 8.0.2 is available. You should consider upgrading via the 'pip install --upgrade pip' command.←[0m c:\jython2.7.1b3>bin\pip.exe install --force --upgrade robotframework Collecting robotframework Using cached robotframework-3.0.tar.gz Installing collected packages: robotframework Found existing installation: robotframework 3.0 Uninstalling robotframework-3.0: Successfully uninstalled robotframework-3.0 Running setup.py install for robotframework Successfully installed robotframework-3.0 ←[33mYou are using pip version 7.1.2, however version 8.0.2 is available. You should consider upgrading via the 'pip install --upgrade pip' command.←[0m (At some point we should fix the pip tool so as to not try to color output on Windows when run with Jython, to avoid these control characters being output. Another os._name vs os.name issue I'm sure.) |
|||
msg10784 (view) | Author: Pekka Klärck (pekka.klarck) | Date: 2016-02-24.19:28:54 | |
The problem was caused by pip directory in the directory where I executed these commands. Jython apparently imported it as a pip module and that broke everything. I know Jython imports directories without __init__.py as modules to support Java packages, but this wasn't the first time an accidentally matching directory caused problems. Both `jython -m pip` and `pip` worked fine after removing the offending directory. This issue can be closed. Notice that the directory only had an old `pip.log` file. Apparently it was created by some pip version at some point. |
|||
msg10785 (view) | Author: Jim Baker (zyasoft) | Date: 2016-02-24.19:36:06 | |
Ack. And we do have one open bug about Java packages and __init__.py, hopefully this will not have other confounding impacts. Closing out. |
|||
msg10786 (view) | Author: Jim Baker (zyasoft) | Date: 2016-02-24.19:36:31 | |
Bug I mentioned in my previous message: http://bugs.jython.org/issue2455 |
History | |||
---|---|---|---|
Date | User | Action | Args |
2016-02-24 19:36:32 | zyasoft | set | messages: + msg10786 |
2016-02-24 19:36:06 | zyasoft | set | status: open -> closed resolution: invalid messages: + msg10785 |
2016-02-24 19:28:55 | pekka.klarck | set | messages: + msg10784 |
2016-02-24 18:58:10 | zyasoft | set | nosy:
+ zyasoft messages: + msg10783 |
2016-02-24 18:29:56 | pekka.klarck | create |
Supported by Python Software Foundation,
Powered by Roundup