LitStudy包装安装Python

发布于 2025-01-28 13:26:04 字数 1402 浏览 1 评论 0原文

我正在尝试进行共同引用网络分析,并且必须在Python中安装称为“ Litstudy”的软件包,但是我在Jupyter和Python中安装它的错误

是Litstudy Package

​strong>

c:\\ program文件(x86)\\ Microsoft Visual Studio \\ 2022 \\ buildTools \\ VC \\ VC \\工具\\工具\\ msvc \\ 14.32.31326 \\ bin \\ bin \\ bin \\ hostx86 cl.exe'因退出代码2 [输出的结尾]失败。注意:此错误源自子过程,可能不是PIP的问题。 旧版安装范围

它被安装在jupyter中

 import litstudy   
 Traceback (most recent call last):

 File "C:\Users\vibhu\AppData\Local\Programs\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\IPython\core\interactiveshell.py", line 3437, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)

File "<ipython-input-2-b5a65b8eaed7>", line 1, in <module>
import litstudy

File "C:\Users\vibhu\AppData\Local\Programs\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\litstudy\__init__.py", line 1, in <module>
from .sources import *  # noqa: F403,F401


  File "C:\Users\vibhu\AppData\Local\Programs\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\litstudy\sources\__init__.py", line 1, in <module>
from .scopus import search_scopus, refine_scopus, fetch_scopus

 File "C:\Users\vibhu\AppData\Local\Programs\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\litstudy\sources\scopus.py", line 236
if doi := id.doi:

错误: 对于一天的Amost,需要开始进行网络分析,或者您是否有其他解决方案进行引用网络

I am Trying to do Co-Citation Network analysis and have to install package called "litstudy" in Python but I am getting an Error installing it in Jupyter and Python 3.10

Link for litstudy package https://nlesc.github.io/litstudy/index.html

In Python 3.10 while installing from Command Prompt getting Error

C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.32.31326\\bin\\HostX86\\x64\\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: legacy-install-failure

It Gets installed in Jupyter but when I import the package I get error

 import litstudy   
 Traceback (most recent call last):

 File "C:\Users\vibhu\AppData\Local\Programs\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\IPython\core\interactiveshell.py", line 3437, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)

File "<ipython-input-2-b5a65b8eaed7>", line 1, in <module>
import litstudy

File "C:\Users\vibhu\AppData\Local\Programs\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\litstudy\__init__.py", line 1, in <module>
from .sources import *  # noqa: F403,F401


  File "C:\Users\vibhu\AppData\Local\Programs\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\litstudy\sources\__init__.py", line 1, in <module>
from .scopus import search_scopus, refine_scopus, fetch_scopus

 File "C:\Users\vibhu\AppData\Local\Programs\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\litstudy\sources\scopus.py", line 236
if doi := id.doi:

If anyone can Solve this for me i will be really grateful I'm stuck on this for amost a day and need to get started with networking analysis or if you have any other solution like this for Citation Networking

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

下壹個目標 2025-02-04 13:26:04

LitStudy软件包的TL; DR

  • 依赖关系与Python 3.10不兼容,您必须
  • 使用Conda降级到3.9安装包装,因此您不必编译它们。

长篇小说

litstudy软件包具有大量依赖关系,其中一些需要编译。您收到的错误消息表示某些人的编译失败了。

依赖项WordCloudfa2当我运行pip pip install litstudy时,我的计算机上有问题以重现您的问题。

对于WordCloud,它存在于conda-forge的预编译的conda捆绑包中。我建议使用conda(anaconda3或miniconda3,要么可以使用)。

这适用于WordCloud,按照自己的 readme

conda install -c conda-forge wordcloud

fa2 ,有一个问题:当我运行conda install -c conda -forge fa2时,我收到了此消息:

UnsatisfiableError: The following specifications were found
to be incompatible with the existing python installation in your environment:

Specifications:

  - fa2 -> python[version='>=3.6,<3.7.0a0|>=3.7,<3.8.0a0|>=3.8,<3.9.0a0|>=3.9,<3.10.0a0']

Your python: python==3.10.4

基本上说fa2不兼容(但是)与python 3.10。因此,您必须降级到3.9.x版本的Python才能使用此软件包。

因此,要安装litstudy及其依赖关系,我刚刚使用conda创建了一个python 3.9.12环境,然后我能够安装所有内容。

安装miniconda3 3之后,剪切和稳定的解决方案

将其整合在一起,这对我有用:

conda create -n py39 python==3.9.12
conda activate py39
conda install -c conda-forge fa2 wordcloud
pip install litstudy

在这种环境中,导入litstudy正常工作。

TL;DR

  • Dependencies of the litstudy package are not compatible with Python 3.10, you will have to downgrade to 3.9
  • Install packages from conda-forge, using conda, so you don't have to compile them.

The long story

The litstudy package has a huge number of dependencies, several of which need to be compiled. The error message you got indicates that compilation failed for some one them.

The dependencies wordcloud and fa2 where a problem on my computer when I ran pip install litstudy to reproduce your problem.

For wordcloud, the exists a pre-compiled Conda bundle for it, available from conda-forge. I recommend using conda (Anaconda3 or Miniconda3, either will do).

This worked for wordcloud, as recommended by its own readme:

conda install -c conda-forge wordcloud

For fa2, there was a second problem: when I ran conda install -c conda-forge fa2, I got this message:

UnsatisfiableError: The following specifications were found
to be incompatible with the existing python installation in your environment:

Specifications:

  - fa2 -> python[version='>=3.6,<3.7.0a0|>=3.7,<3.8.0a0|>=3.8,<3.9.0a0|>=3.9,<3.10.0a0']

Your python: python==3.10.4

which basically says fa2 is not compatible (yet) with Python 3.10. So, you will have to downgrade to a 3.9.x version of Python to use this package.

So to install litstudy and its dependencies, I just created a Python 3.9.12 environment using conda, and then I was able to install everything.

The cut-and-pastable solution

Putting it all together, this worked for me, after installing Miniconda3:

conda create -n py39 python==3.9.12
conda activate py39
conda install -c conda-forge fa2 wordcloud
pip install litstudy

In that environment, import litstudy works fine.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文