安装JPype1 但我一直收到这个:

error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.38.33130\\bin\\HostX86\\x86\\cl.exe' failed with exit code 2
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for JPype1
Failed to build JPype1
ERROR: Could not build wheels for JPype1, which is required to install pyproject.toml-based projects

我运行的是Python3.12.0

Visual Studio 2022开发人员命令提示符v17.8.3

和PIP 23.3.1

请帮助:(我需要它的一个任务

我试着用

pip install --upgrade pip setuptools

结果是:

WARNING: The scripts pip.exe, pip3.12.exe and pip3.exe are installed in 'C:\Users\xxx\AppData\Roaming\Python\Python312\Scripts' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed pip-23.3.2 setuptools-69.0.2

我再次try 下载JPype1,结果是:

Defaulting to user installation because normal site-packages is not writeable
Collecting JPype1
  Using cached JPype1-1.4.1.tar.gz (797 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: packaging in c:\users\xxx\appdata\roaming\python\python312\site-packages (from JPype1) (23.2)
Building wheels for collected packages: JPype1
  Building wheel for JPype1 (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for JPype1 (pyproject.toml) did not run successfully.

推荐答案

不幸的是,jype1只支持到python 3.10.

https://pypi.org/project/JPype1/#:~:text=JPype%20is%20a%20Python%20module,scientific%20computing%2C%20and%20much%20more.

你需要把你的Python 降级到3.10或更低.

enter image description here

Python相关问答推荐

将numpy数组与空数组相加

Pandas read_jsonfuture 警告:解析字符串时,to_datetime与单位的行为已被反对

绘制系列时如何反转轴?

pyramid 内部数组中的连续序列-两极

Python无法在已导入的目录中看到新模块

处理(潜在)不断增长的任务队列的并行/并行方法

可变参数数量的重载类型(args或kwargs)

从numpy数组和参数创建收件箱

2D空间中的反旋算法

在Python中管理打开对话框

NP.round解算数据后NP.unique

Polars:用氨纶的其他部分替换氨纶的部分

Pandas计数符合某些条件的特定列的数量

根据列值添加时区

有没有一种ONE—LINER的方法给一个框架的每一行一个由整数和字符串组成的唯一id?

什么是最好的方法来切割一个相框到一个面具的第一个实例?

Django—cte给出:QuerySet对象没有属性with_cte''''

基于行条件计算(pandas)

跳过嵌套JSON中的级别并转换为Pandas Rame

OpenCV轮廓.很难找到给定图像的所需轮廓