Code Monkey home page Code Monkey logo

Comments (5)

 avatar commented on August 27, 2024

Python 2 --> 3: https://docs.python.org/2/howto/cporting.html

Python 2.7 'distutils' requires Visual Studio on Windows (for Python 3.3, jpy uses the Windows SDK 7.1):

  • Visual Studio 2011: SET VS90COMNTOOLS=%VS100COMNTOOLS%
  • Visual Studio 2012: SET VS90COMNTOOLS=%VS110COMNTOOLS%

--> As we use MS Visual Studio Express we can only compile for 32-bit target platforms

from jpy.

 avatar commented on August 27, 2024

Here are the used functions that are either missing or incompatible in Python 2.7

  • PyModule_Create() named Py_InitModule() with different parameters, easily fixed
  • PyUnicode_AsUTF8(), PyUnicode_FromKindAndData(), PyUnicode_AsWideCharString() missing, must code a replacement which is not straight forward due to uncicode conversion
  • Buffer.releasebufferproc() has different parameters, not checked effort yet

from jpy.

forman avatar forman commented on August 27, 2024

Done for 0.7.2

from jpy.

bulli92 avatar bulli92 commented on August 27, 2024

Hi Norman,

thanks a lot for the fast implementation. The installation is however not working properly for me jet. I installed all required dependencies.

If I then say

python setup.py install

I get:
(ipythondev)m300028@alexnotebook:jpy$ python setup.py install
Building a 64-bit library for a Linux system
Traceback (most recent call last):
File "setup.py", line 84, in
libraries = ['jvm', 'python' + sysconfig.get_config_var('VERSION') + sys.abiflags]
AttributeError: 'module' object has no attribute 'abiflags'

My understanding is that the 'abiflags' attribute is specific to python3.

However, if I do

sudo python setup.py install

I get ...
(ipythondev)m300028@alexnotebook:jpy$ sudo python setup.py install
[sudo] password for m300028:
Error: Environment variable "JDK_HOME" must be set to a JDK (>= v1.6) installation directory
(ipythondev)m300028@alexnotebook:jpy$ sudo python setup.py install
Error: Environment variable "JDK_HOME" must be set to a JDK (>= v1.6) installation directory

which is weird, as I have installed the most recent JDK and JDK_HOME is pointing to it ...

(ipythondev)m300028@alexnotebook:jpy$ echo $JDK_HOME
/usr/local/bin/jdk1.8.0_05

Any ideas?

Best,
Alex

from jpy.

forman avatar forman commented on August 27, 2024

Yes, the attribute sys.abiflags is a Python 3 feature. Fixed.

However, if you sudo, you loose your environment settings and this is why you don't have "JDK_HOME" anymore.

from jpy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.