-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #66 from BradyAJohnston/bug-fixes
Multiple Bug Fixes
- Loading branch information
Showing
3 changed files
with
22 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
from logging import error | ||
import sys | ||
import os | ||
import site | ||
import importlib.util\ | ||
|
||
# refreshes the MDAnalysis path and checks if it is installed & importable | ||
# path to python.exe | ||
python_exe = os.path.realpath(sys.executable) | ||
|
||
|
||
def verify_user_sitepackages(package_location): | ||
if os.path.exists(package_location) and package_location not in sys.path: | ||
sys.path.append(package_location) | ||
|
||
|
||
verify_user_sitepackages(site.getusersitepackages()) | ||
verify_user_sitepackages(mda_dir_location) | ||
|
||
mda_available = importlib.util.find_spec('MDAnalysis') | ||
if not mda_available: | ||
error('MDAnalysis is not installed, or not detectable.') |