Lỗi phân đoạn zsh python test py

Vì vậy, gần đây tôi đã cài đặt Psi4 1. 3. 2 cho macOS với Python 3. 7 từ trình cài đặt, nhưng tôi gặp rất nhiều vấn đề. Bây giờ tôi không thể nói rằng tôi đã cài đặt Psi4 chính xác như hướng dẫn tại , thay vào đó tôi đã tải xuống tệp, sau đó chạy

zsh Psi4conda-1.3.2-py37-MacOSX-x86_64.sh -b -p /usr/local/psi4/psi4conda

Sau đó, tôi đã kết thúc việc làm theo hướng dẫn tại thay vào đó, và đặt

 ============================================== test session starts ==============================================
 platform darwin -- Python 3.7.3, pytest-4.5.0, py-1.8.0, pluggy-0.11.0 -- /usr/local/psi4/psi4conda/bin/python
 cachedir: .pytest_cache
 rootdir: /usr/local/psi4
collecting .. zsh: segmentation fault  psi4 --test
0 vào
 ============================================== test session starts ==============================================
 platform darwin -- Python 3.7.3, pytest-4.5.0, py-1.8.0, pluggy-0.11.0 -- /usr/local/psi4/psi4conda/bin/python
 cachedir: .pytest_cache
 rootdir: /usr/local/psi4
collecting .. zsh: segmentation fault  psi4 --test
1 của tôi và khởi động lại trình bao

Tôi đã chạy

 ============================================== test session starts ==============================================
 platform darwin -- Python 3.7.3, pytest-4.5.0, py-1.8.0, pluggy-0.11.0 -- /usr/local/psi4/psi4conda/bin/python
 cachedir: .pytest_cache
 rootdir: /usr/local/psi4
collecting .. zsh: segmentation fault  psi4 --test
2, nhưng điều này luôn đưa ra kết quả

 ============================================== test session starts ==============================================
 platform darwin -- Python 3.7.3, pytest-4.5.0, py-1.8.0, pluggy-0.11.0 -- /usr/local/psi4/psi4conda/bin/python
 cachedir: .pytest_cache
 rootdir: /usr/local/psi4
collecting .. zsh: segmentation fault  psi4 --test

Hy vọng sửa lỗi của mình, tôi đã chạy dòng từ trang tải xuống

echo $'. usr/local/psi4conda/etc/profile.d/conda.sh\nconda activate' >> ~/.zprofile

Điều này ban đầu gây ra rất nhiều vấn đề, tôi nghĩ vì tôi đã quên

 ============================================== test session starts ==============================================
 platform darwin -- Python 3.7.3, pytest-4.5.0, py-1.8.0, pluggy-0.11.0 -- /usr/local/psi4/psi4conda/bin/python
 cachedir: .pytest_cache
 rootdir: /usr/local/psi4
collecting .. zsh: segmentation fault  psi4 --test
3 đầu tiên trong
 ============================================== test session starts ==============================================
 platform darwin -- Python 3.7.3, pytest-4.5.0, py-1.8.0, pluggy-0.11.0 -- /usr/local/psi4/psi4conda/bin/python
 cachedir: .pytest_cache
 rootdir: /usr/local/psi4
collecting .. zsh: segmentation fault  psi4 --test
4, mà tôi đã sửa lại từ đó, nhưng tôi sẽ bao gồm đầu ra khi tôi khởi động lại trình bao

________số 8_______

Và vì vậy tôi đã chạy

 ============================================== test session starts ==============================================
 platform darwin -- Python 3.7.3, pytest-4.5.0, py-1.8.0, pluggy-0.11.0 -- /usr/local/psi4/psi4conda/bin/python
 cachedir: .pytest_cache
 rootdir: /usr/local/psi4
collecting .. zsh: segmentation fault  psi4 --test
5, nó đã làm như sau

no change     /usr/local/psi4/psi4conda/condabin/conda
no change     /usr/local/psi4/psi4conda/bin/conda
no change     /usr/local/psi4/psi4conda/bin/conda-env
no change     /usr/local/psi4/psi4conda/bin/activate
no change     /usr/local/psi4/psi4conda/bin/deactivate
no change     /usr/local/psi4/psi4conda/etc/profile.d/conda.sh
no change     /usr/local/psi4/psi4conda/etc/fish/conf.d/conda.fish
no change     /usr/local/psi4/psi4conda/shell/condabin/Conda.psm1
no change     /usr/local/psi4/psi4conda/shell/condabin/conda-hook.ps1
no change     /usr/local/psi4/psi4conda/lib/python3.7/site-packages/xonsh/conda.xsh
no change     /usr/local/psi4/psi4conda/etc/profile.d/conda.csh
modified      /Users/wane/.zshrc

==> For changes to take effect, close and re-open your current shell. <==

và nó đặt phần sau vào

 ============================================== test session starts ==============================================
 platform darwin -- Python 3.7.3, pytest-4.5.0, py-1.8.0, pluggy-0.11.0 -- /usr/local/psi4/psi4conda/bin/python
 cachedir: .pytest_cache
 rootdir: /usr/local/psi4
collecting .. zsh: segmentation fault  psi4 --test
6 (trước đây không tồn tại vì tôi thích
 ============================================== test session starts ==============================================
 platform darwin -- Python 3.7.3, pytest-4.5.0, py-1.8.0, pluggy-0.11.0 -- /usr/local/psi4/psi4conda/bin/python
 cachedir: .pytest_cache
 rootdir: /usr/local/psi4
collecting .. zsh: segmentation fault  psi4 --test
1 hơn)

# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/usr/local/psi4/psi4conda/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
    eval "$__conda_setup"
else
    if [ -f "/usr/local/psi4/psi4conda/etc/profile.d/conda.sh" ]; then
        . "/usr/local/psi4/psi4conda/etc/profile.d/conda.sh"
    else
        export PATH="/usr/local/psi4/psi4conda/bin:$PATH"
    fi
fi
unset __conda_setup
# <<< conda initialize <<<

Điều này ít nhiều giống với những gì tôi đã có trong

 ============================================== test session starts ==============================================
 platform darwin -- Python 3.7.3, pytest-4.5.0, py-1.8.0, pluggy-0.11.0 -- /usr/local/psi4/psi4conda/bin/python
 cachedir: .pytest_cache
 rootdir: /usr/local/psi4
collecting .. zsh: segmentation fault  psi4 --test
1 của mình. Sau khi tôi khởi động lại shell của mình, dấu nhắc đầu cuối đã thay đổi

Nó trước đây đã nói

 ============================================== test session starts ==============================================
 platform darwin -- Python 3.7.3, pytest-4.5.0, py-1.8.0, pluggy-0.11.0 -- /usr/local/psi4/psi4conda/bin/python
 cachedir: .pytest_cache
 rootdir: /usr/local/psi4
collecting .. zsh: segmentation fault  psi4 --test
9,
nhưng bây giờ nó nói
echo $'. usr/local/psi4conda/etc/profile.d/conda.sh\nconda activate' >> ~/.zprofile
0

Cuối cùng,

 ============================================== test session starts ==============================================
 platform darwin -- Python 3.7.3, pytest-4.5.0, py-1.8.0, pluggy-0.11.0 -- /usr/local/psi4/psi4conda/bin/python
 cachedir: .pytest_cache
 rootdir: /usr/local/psi4
collecting .. zsh: segmentation fault  psi4 --test
2 vẫn đưa ra lỗi tương tự

===================================================== test session starts ======================================================
platform darwin -- Python 3.7.3, pytest-4.5.0, py-1.8.0, pluggy-0.11.0 -- /usr/local/psi4/psi4conda/bin/python
cachedir: .pytest_cache
rootdir: /usr/local/psi4
collecting .. zsh: segmentation fault  psi4 --test

Xin lỗi vì điều này quá dài, có ai biết điều gì đã xảy ra không?

CHỈNH SỬA

Một số thông tin bổ sung (có khả năng hữu ích?)

Tôi đã chạy

echo $'. usr/local/psi4conda/etc/profile.d/conda.sh\nconda activate' >> ~/.zprofile
2, và kết quả là, tốt, dài. Nếu ai đó muốn phiên bản đầy đủ chỉ cần hỏi, nhưng đây là một vài dòng cuối cùng của đầu ra

+(eval):1> PS1='(base) %n@%m %1~ %# ' 
+(eval):2> export PATH=/usr/local/psi4/psi4conda/bin:/usr/local/orca/orca:/usr/local/psi4/psi4conda/bin:/usr/local/orca/orca:/usr/local/psi4/psi4conda/bin:/usr/local/psi4/psi4conda/condabin:/usr/local/psi4/psi4conda/bin:/usr/local/orca/orca:/usr/local/psi4/psi4conda/bin:/usr/local/orca/orca:/usr/local/orca/orca:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
+(eval):3> export CONDA_SHLVL=1
+(eval):4> export CONDA_PROMPT_MODIFIER='(base) '
+__conda_activate:16> __conda_hashr
+__conda_hashr:1> [ -n x ']'
+__conda_hashr:2> rehash
+/Users/wane/.zshrc:14> unset __conda_setup
+zsh:1> psi4
Traceback (most recent call last):
  File "/usr/local/psi4/psi4conda/bin/psi4", line 211, in <module>
    raise KeyError("The file %s does not exist." % args["input"])
KeyError: 'The file input.dat does not exist.'

Tôi đã làm những gì có thể để xóa phiên bản cuối cùng của conda và psi4 mà tôi có. đã xóa thư mục psi4 của tôi cũng như

echo $'. usr/local/psi4conda/etc/profile.d/conda.sh\nconda activate' >> ~/.zprofile
3 và nội dung psi4 trong
echo $'. usr/local/psi4conda/etc/profile.d/conda.sh\nconda activate' >> ~/.zprofile
4 và khởi động lại trình bao. Có bất cứ nơi nào khác tôi nên kiểm tra?

Tôi đã cài đặt miniconda và điều đó có vẻ ổn, nhưng khi tôi chạy

echo $'. usr/local/psi4conda/etc/profile.d/conda.sh\nconda activate' >> ~/.zprofile
5, conda đã báo rất nhiều lỗi

Tại sao tôi gặp lỗi phân đoạn trong Python?

Mẹo. Lỗi phân đoạn (còn được gọi là lỗi segfault) là một tình trạng phổ biến khiến các chương trình gặp sự cố; . typically caused by a program trying to read from or write to an illegal memory location, that is, part of the memory to which the program is not supposed to have access.

Điều gì gây ra lỗi phân đoạn zsh?

Lỗi phân đoạn (còn gọi là lỗi segfault) là tình trạng phổ biến khiến các chương trình gặp sự cố; . Segfaults là do một chương trình cố đọc hoặc ghi một vị trí bộ nhớ không hợp lệ .

lỗi phân đoạn zsh là gì?

Lỗi phân đoạn hoặc segfault là lỗi bộ nhớ trong đó chương trình cố gắng truy cập địa chỉ bộ nhớ không tồn tại hoặc chương trình không có quyền truy cập. Đó là một lỗi phổ biến trong các chương trình C và C++ được viết kém

Điều gì gây ra lỗi phân đoạn Coredump?

Lỗi Core Dump/Segmentation là một loại lỗi cụ thể do truy cập vào bộ nhớ “không thuộc về bạn. ” Khi một đoạn mã cố thực hiện thao tác đọc và ghi ở vị trí chỉ đọc trong bộ nhớ hoặc khối bộ nhớ được giải phóng, nó được gọi là kết xuất lõi. Đó là một lỗi cho biết bộ nhớ bị hỏng.