Closed Pistorius closed 7 years ago
any trace?
ignore my previous commemt is the python in you path? or you can try specify the full path for rubypython.start
This is my PATH
C:\Users\prodriguezl\AppData\Local\Programs\Python\Launcher\;C:\RailsInstaller\Git\cmd;C:\RailsInstaller\Ruby2.3.0\bin
did you try full path of python.exe?
Sry about my poor experience but, how it would be?
That depends where you installed your python, take my windows as example, the full path of python.exe is C:\Python27\python.exe
Ok, i tried with the full path of python.exe:
C:\Users\prodriguezl\AppData\Local\Programs\Python\Python36-32\python.exe
And the result is the same
Can you paste you code here?
There's not much code to show. I want to use a few lines of python to open and save a .xlsx file after to edit it with other gem. All of this in a ruby class. I'll use this:
...some ruby code...
RubyPython.start
openpyxl = RubyPython.import "openpyxl"
wb = openpyxl.load_workbook('my_path')
wb.save('my_path')
RubyPython.stop
... more ruby code...
I dont know what else I can add here to help with my Issue. I installed python-3.6.2
wich is located in the path mentioned before in my Windows 7 Proffesional 64 bits. And my Gemfile.rb got gem 'rubypython', '~> 0.6.3'
changing RubyPython.start
to RubyPython.start(:python_exe => "C:\\Users\\prodriguezl\\AppData\\Local\\Programs\\Python\\Python36-32\\python.exe")
would probably work for working around the current exception.
But I am afford that currently support for python 3 is still in progress.
Thanks Peter
Thanks a lot @peter-wangxu, but im still getting the same error. I'll try installing python 2.
I installed Python 2.7.13 and i have the same result after try every step mentioned before.
try to resolve issue from python side...
are you able to enter python console? try to install python in the same path as mine.
Hi @peter-wangxu, Im able to use python console and its installed in C:\Python27 as you want :) What i should to do here? Thanks a lot again for your amability
I solve this, thank for the help :) Finally I installed the libraries jdcal and at_xmlfile manually in python and then all works fine.
@Pistorius Awesome!
I did not know of the jdcal
and at_xmlfile
, can you elaborate it here? that may help others with same environment as you.
Third party libraries should not cause the exception you mentioned in this issue I thought.
Sure!
I thought the same as you, Im not sure why this solved with that.
Anyway, when i tried to import openpyxl
with from openpyxl import load_workbook
(or load Workbook
) in python console it said I need jdcal
and et_xmfile
so I just download manually both libraries; jdcal
and et_xmlfile
(its was 'et', not 'at' as I mencioned before, my apologies). That is because as I read openpyxl
depends upon them. I extracted the files into C:\Python27\Lib
and when I did the same import
all works fine :). Finally in ruby i can now do RubyPython.start
:D
GOOD, enjoy the rubypython. I am closing this issue.
Thanks Peter
For other people like me that are looking for this as well.
I add to install libpython
:
sudo apt-get install libpython2.7
I installed correctly
rubypython
in my ruby project on Windows 7 Profesional. When i try to runRubyPython.start
i getRubyPython::InvalidInterpreter: An invalid interpreter was specified.
Some advise here?