When you try to open a Word document on Mac document, Word stops opening. If you are faced with this issue and are willing to solve it, then follow the 3 solutions. If you have data loss problem after fixing the Word not opening issue, EaseUS Data Recovery Wizard for Mac can do you a favor.
- Mac Cannot Run App Error Is A Directory Word
- Mac Cannot Run App Error Is A Directory Using
- Mac Cannot Run App Error Is A Directory Number
On this page, we have collected three practical solutions that can help fix the 'Word Not Opening' error on Mac. And if you mistakenly removed a Word file on Mac, let reliable Mac file recovery software as recommended here for help. Check out how to fix the not opening Word file to accessible again:
Mac App Store: The Mac will only run apps downloaded from the Mac App Store. Mac App Store and identified developers: When you try to open a new app and it’s not on the list of identified. In the Terminal app on your Mac, in the window running the shell process you want to quit, type exit, then press Return. This ensures that commands actively running in the shell are closed. If anything’s still in progress, a dialog appears. If you want to change the shell. How to fix app is damaged and cant be opened, move to trash? Problem solved fast and easy 2018! - duration: 5:02. Celest 18,086 views. As annoying as it seems, this is an easily solvable problem as long as you find its root cause. Here, follow the instructions below and you can easily fix this app can't open. Safe Fix Cannot Run App in Windows 10. Of the various solutions to fix the issue when Windows 10 cannot run an app, we have summarized the top 10 for you. Can't be opened'. I also enabled the 'Allow Apps from everywhere' option in the settings pane. The weird thing is, that I can open the application on another mac within my home network, if I set up a 'File-Sharing' and share the folder where the app is located in and open it from there on my other mac.
Workable Solutions | Step-by-step Troubleshooting |
---|---|
Fix 1. Repair Disk | Open Disk Utility > Select the primary hard disk on Mac and select 'First Aid' > Click 'Run'..Full steps |
Fix 2. Remove Word Preference | Open 'Library' > Open 'Preferences' > Copy com.microsoft.Word.plist file to desktop..Full steps |
Fix 3. Open and Repair Word | Start Word > Click 'Open' on the File menu > Click 'Repair' on the Open button..Full steps |
Fix 4. Recover Lost Word | Run EaseUS Mac file recovery software > Scan mac drive > Restore lost Mac word file..Full steps |
'Word 2016 on my Mac won't open. It flashes immediately by double-clicking and then closes unexpectedly. I didn't do anything or any change. How to fix it if Microsoft Word won't open at all?'
In addition to this situation, most users are also faced with these errors:
- The application Microsoft Word quit unexpectedly
- Microsoft Word cannot be opened because of a problem. Check with the developer to make sure Microsoft Word works with this version of Mac OS X
As Microsoft Word is widely used among people, owning some basic Word troubleshooting is recognized as an essential skill. Today you're going to learn three tricks in solving Word not opening on Mac. The given workarounds are applicable to all Word editions such as 2003, 2007, 2010, 2013 2016.
1. Run Repair Disk Permissions
How to use mac mail app. Step 1: On the 'Go' menu, click 'Utilities'. Start the Disk Utility program.
Step 2: Choose the primary hard disk drive for your computer. Then, click the 'First Aid' tab.
Step 3: Click 'Run' to repair the disk volume errors and permissions. When it finishes, click 'Done'.
Mac Cannot Run App Error Is A Directory Word
2. Remove Word Preferences
Step 1: Open 'Library'. Usually, click 'GO' > 'Go to the folder', then type ~/Library
Step 2: Locate a file named as 'Preferences'.
Step 3: Find a file named com.microsoft.Word.plist. Move the file to the desktop.
Start Word, and check whether the problem still occurs.
If the problem still occurs, exit Microsoft Word, and then restore the 'com.microsoft.word.prefs.plist' file to its original location. Then, go to Step 4.
If the problem seems to be resolved, you can move the file to the trash.
Note: If you do not locate the file, the program is using the default preferences.
Step 4: Exit all Microsoft Office for Mac programs. Then, Click the Word icon. On the left, click 'Preferences'.
Step 5: Click 'File Locations'.
Step 6: Select 'User templates'.
Step 7: Locate the file that is named Normal, and move the file to the desktop.
You can also find the file named as Normal through this way: 'Library' > 'Application Support' > 'Microsoft' > 'Office' > 'User Templates' > 'Normal'
Start Word, and check whether the problem still occurs. If the problem seems to be resolved, you can move the 'Normal' file to the trash.
3. Try to Open and Repair Word
Step 1: Start Word. On the File menu, click 'Open'.
Step 2: In the Open dialog box, select the file that you want to open. Click the down arrow on the Open button, click 'Open' > 'Repair'.
Recover Deleted and Missing Word on Mac
Do not worry if the 'Word not opening' issue causes data loss disaster, you can recover unsaved Word document on Mac from its Temporary folder and AutoRecovery save. While for a deleted Word document on Mac, the easiest way of recovery is using a third-party Mac data recovery software.
EaseUS Data Recovery Wizard for Mac also recovers Word document that is missing, deleted or lost due to formatting, virus infection and other misoperation, and the best part of using the software to recover Word is being able to preview the file entirety.
Step 1. Select the location where your important Word documents were lost and click Scan button.
Step 2. EaseUS Data Recovery Wizard for Mac will start immediately a quick scan as well as a deep scan on your selected disk volume. Meanwhile, the scanning results will be presented in the left pane.
Step 3. By Path and Type, you can quickly filter the Word files you've lost earlier. Select the target files and click Recover Now button to get them back at once.
The information above covers most normal uses of PyInstaller.However, the variations of Python and third-party libraries areendless and unpredictable.It may happen that when you attempt to bundle your app eitherPyInstaller itself, or your bundled app, terminates with a Python traceback.Then please consider the following actions in sequence, beforeasking for technical help.
Recipes and Examples for Specific Problems¶
The PyInstallerFAQ page has work-arounds for some common problems.Code examples for some advanced uses and some commonproblems are available on our PyInstaller Recipes page.Some of the recipes there include:
- A more sophisticated way of collecting data filesthan the one shown above (Adding Files to the Bundle).
- Bundling a typical Django app.
- A use of a run-time hook to set the PyQt4 API level.
- A workaround for a multiprocessing constraint under Windows.
and others.Many of these Recipes were contributed by users.Please feel free to contribute more recipes!
Finding out What Went Wrong¶
Build-time Messages¶
When the
Analysis
step runs, it produces error and warning messages.These display after the command line if the --log-level
option allows it.Analysis also puts messages in a warnings filenamed build/name/warn-name.txt
in thework-path=
directory.Analysis creates a message when it detects an importand the module it names cannot be found.A message may also be produced when a class or function is declared ina package (an
__init__.py
module), and the import specifiespackage.name
. In this case, the analysis can’t tell if name is supposed torefer to a submodule or package.The “module not found” messages are not classed as errors becausetypically there are many of them.For example, many standard modulesconditionally import modules for different platforms that may or maynot be present.
All “module not found” messages are written to the
build/name/warn-name.txt
file.They are not displayed to standard output because there are many of them.Examine the warning file; often there will be dozens of modules not found,but their absence has no effect.When you run the bundled app and it terminates with an ImportError,that is the time to examine the warning file.Then see Helping PyInstaller Find Modules below for how to proceed.
Build-Time Dependency Graph¶
On each run PyInstaller writes a cross-referencing file about dependenciesinto the build folder:
build/name/xref-name.html
in thework-path=
directory is an HTML file that lists the fullcontents of the import graph, showing which modules are importedby which ones.You can open it in any web browser.Find a module name, then keep clicking the “imported by” linksuntil you find the top-level import that causes that module to be included.If you specify
--log-level=DEBUG
to the pyinstaller
command,PyInstaller additionally generates a GraphViz input file representing thedependency graph.The file is build/name/graph-name.dot
in thework-path=
directory.You can process it with any GraphViz command, e.g. dot,to producea graphical display of the import dependencies.These files are very large because even the simplest “hello world”Python program ends up including a large number of standard modules.For this reason the graph file is not very useful in this release.
Build-Time Python Errors¶
PyInstaller sometimes terminates by raising a Python exception.In most cases the reason is clear from the exception message,for example “Your system is not supported”, or “Pyinstallerrequires at least Python 3.5”.Others clearly indicate a bug that should be reported.
One of these errors can be puzzling, however:
IOError('Pythonlibrarynotfound!')
PyInstaller needs to bundle the Python library, which is themain part of the Python interpreter, linked as a dynamic load library.The name and location of this file varies depending on the platform in use.Some Python installations do not include a dynamic Python libraryby default (a static-linked one may be present but cannot be used).You may need to install a development package of some kind.Or, the library may exist but is not in a folder where PyInstalleris searching.The places where PyInstaller looks for the python library aredifferent in different operating systems, but
/lib
and /usr/lib
are checked in most systems.If you cannot put the python library there,try setting the correct path in the environment variableLD_LIBRARY_PATH
in GNU/Linux orDYLD_LIBRARY_PATH
in OS X.Mac Cannot Run App Error Is A Directory Using
Getting Debug Messages¶
The
--debug=all
option (and its choices) provides asignficiant amount of diagnostic information.This can be useful during development of a complex package,or when your app doesn’t seem to be starting,or just to learn how the runtime works.Normally the debug progress messages go to standard output.If the
--windowed
option is used when bundling a Windows app,they are sent to any attached debugger. If you are not using a debugger(or don’t have one), the DebugView the free (beer) tool can be used todisplay such messages. It has to be started before running the bundledapplication.For a
--windowed
Mac OS app they are not displayed.Consider bundling without
--debug
for your production version.Debugging messages require system calls and have an impact on performance.Getting Python’s Verbose Imports¶
You can build the app with the
--debug=imports
option(see Getting Debug Messages above),which will pass the -v
(verbose imports) flagto the embedded Python interpreter.This can be extremely useful.It can be informative even with apps that are apparently working,to make sure that they are getting all imports from the bundle,and not leaking out to the local installed Python.Python verbose and warning messages always go to standard outputand are not visible when the
--windowed
option is used.Remember to not use this for your production version.Figuring Out Why Your GUI Application Won’t Start¶
If you are using the
--windowed
option,your bundled application ay fail to start with an error message likeFailedtoexecutescriptmy_gui
.In this case, you will want to get more verbose output to find outwhat is going on.- For Mac OS, you can run your application on the command line,i.e.``./dist/my_gui``in Terminal instead of clicking on
my_gui.app
. - For Windows, you will need to re-bundle your application without the
--windowed
option.Then you can run the resulting executable from the command line,i.e.:my_gui.exe
. - For Unix and GNU/Linux there in no
--windowed
option.Anyway, if a your GUI application fails,you can run your application on the command line,i.e../dist/my_gui
.
This should give you the relevant error that is preventing yourapplication from initializing, and you can then move on to otherdebugging steps.
Operation not permitted error¶
If you use the –onefile and it fails to run you program with error like:
This can be caused by wrong permissions for the /tmp directory(e.g. the filesystem is mounted with
noexec
flags).https://connectortree467.weebly.com/blog/app-to-run-java-code-mac. A simple way to solve this issue is to set,in the environment variable TMPDIR,a path to a directory in a filesystem mounted without
noexec
flags, e.g.:Helping PyInstaller Find Modules¶
Extending the Path¶
If Analysis recognizes that a module is needed, but cannot find that module,it is often because the script is manipulating
sys.path
.The easiest thing to do in this case is to use the --paths=
optionto list all the other places that the script might be searching for imports:These paths will be noted in the spec file.They will be added to the current
sys.path
during analysis.Listing Hidden Imports¶
If Analysis thinks it has found all the imports,but the app fails with an import error,the problem is a hidden import; that is, an import that is notvisible to the analysis phase.
Hidden imports can occur when the code is using
__import__
,imp.find_module()
or perhaps exec
or eval
.Hidden imports can also occur when an extension module uses thePython/C API to do an import.When this occurs, Analysis can detect nothing.There will be no warnings, only an ImportError at run-time.To find these hidden imports,build the app with the
--debug=imports
flag(see Getting Python’s Verbose Imports above)and run it.Once you know what modules are needed, you add the needed modulesto the bundle using the
--hidden-import=
command option,or by editing the spec file,or with a hook file (see Understanding PyInstaller Hooks below).Mac Cannot Run App Error Is A Directory Number
Extending a Package’s __path__
¶
Python allows a script to extend the search path used for importsthrough the
__path__
mechanism.Normally, the __path__
of an imported module has only one entry,the directory in which the __init__.py
was found.But __init__.py
is free to extend its __path__
to include other directories.For example, the win32com.shell.shell
module actually resolves towin32com/win32comext/shell/shell.pyd
.This is because win32com/__init__.py
appends ./win32comext
to its __path__
.Because the
__init__.py
of an imported moduleis not actually executed during analysis,changes it makes to __path__
are not seen by PyInstaller.We fix the problem with the same hook mechanism we use for hidden imports,with some additional logic; see Understanding PyInstaller Hooks below.Note that manipulations of
__path__
hooked in this way apply onlyto the Analysis.At runtime all imports are intercepted and satisfied from within thebundle. win32com.shell
is resolved the sameway as win32com.anythingelse
, and win32com.__path__
knows nothing of ./win32comext
.Once in a while, that’s not enough.
Changing Runtime Behavior¶
![Mac Cannot Run App Error Is A Directory Mac Cannot Run App Error Is A Directory](/uploads/1/3/3/8/133867747/339436514.jpg)
More bizarre situations can be accomodated with runtime hooks.These are small scripts that manipulate the environment before your main script runs,effectively providing additional top-level code to your script.
There are two ways of providing runtime hooks.You can name them with the option
--runtime-hook=
path-to-script.Second, some runtime hooks are provided.At the end of an analysis,the names in the module list produced by the Analysis phase are looked up in
loader/rthooks.dat
in the PyInstaller install folder.This text file is the string representation of aPython dictionary. The key is the module name, and the value is a listof hook-script pathnames.If there is a match, those scripts are included in the bundled appand will be called before your main script starts.Hooks you name with the option are executedin the order given, and before any installed runtime hooks.If you specify
--runtime-hook=file1.py--runtime-hook=file2.py
then the execution order at runtime will be:- Code of
file1.py
. - Code of
file2.py
. - Any hook specified for an included module that is foundin
rthooks/rthooks.dat
. - Your main script.
Hooks called in this way, while they need to be careful of what they import,are free to do almost anything.One reason to write a run-time hook is tooverride some functions or variables from some modules.A good example of this is the Django runtimehook (see
loader/rthooks/pyi_rth_django.py
in thePyInstaller folder).Django imports some modules dynamically and it is lookingfor some .py
files.However .py
files are not available in the one-file bundle.We need to override the functiondjango.core.management.find_commands
in a way that will just return a list of values.The runtime hook does this as follows:Getting the Latest Version¶
If you have some reason to think you have found a bug in PyInstalleryou can try downloading the latest development version.This version might have fixes or features that are not yet at PyPI.You can download the latest stable version and the latest developmentversion from the PyInstaller Downloads page.
You can also install the latest version of PyInstaller directlyusing pip:
Asking for Help¶
When none of the above suggestions help,do ask for assistance on the PyInstaller Email List.
Then, if you think it likely that you see a bug in PyInstaller,refer to the How to Report Bugs page.