Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mcsolver使用问题 #21

Open
Chris317 opened this issue Oct 20, 2022 · 3 comments
Open

mcsolver使用问题 #21

Chris317 opened this issue Oct 20, 2022 · 3 comments

Comments

@Chris317
Copy link

作者您好!
我在我们课题组服务器的CentOS Linux release 7.9.2009系统上使用anaconda环境用pip show mcsolver安装mcsolver后算官网给的例题算了5个多小时都没出数据,请问是我安装的mcsolver版本与例题对应的版本不相符还是我系统的问题?

例题网站
https://github.com/golddoushi/mcsolver/tree/master/samples

版本信息
(base) [chris@node05 sim_XY]$ pip show mcsolver
Name: mcsolver
Version: 2.3.0
Summary: A user friendly program to do Monte Carlo sims for magnetic systems
Home-page: https://github.com/golddoushi/mcsolver
Author: Liang Liu
Author-email: [email protected]
License: UNKNOWN
Location: /home/chris/anaconda3/lib/python3.9/site-packages
Requires:
Required-by:

@Chris317
Copy link
Author

今天又试了一遍,还是不行,我估计是用pip install mcsolver安装的是windows版本的,今天用官网推荐的python setup.py installa安装了,但import mcsolver的时候就报错了

In [1]: import mcsolver

FileNotFoundError Traceback (most recent call last)
Input In [1], in <cell line: 1>()
----> 1 import mcsolver

File ~/bin/mcsolver/mcsolver/init.py:6, in
3 import os
5 libpath=os.path.join(os.path.dirname(file),'lib')
----> 6 for lib in os.listdir(libpath):
7 if 'ising' in lib:
8 isingLibPath=os.path.join(libpath,lib)

FileNotFoundError: [Errno 2] No such file or directory: '/home/chris/bin/mcsolver/mcsolver/lib'

@golddoushi
Copy link
Owner

您可能得离开安装文件夹,然后再import mcsolver

@Chris317
Copy link
Author

谢谢老师,已经可以正常import mcsolver
但还有一个问题,就是我在ipython环境下看的版本和用pip show mcsolver看的版本不一样?
In [1]: import mcsolver
In [2]: mcsolver.version
Out[2]: '1.2.2'
In [3]: exit()

(base) [chris@node05 ~]$ pip show mcsolver
Name: mcsolver
Version: 2.3.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants