I had an attempt at multithreading and it caused Spyder to crash. I tried the following command to reset Spyder and it successfully did that, however Spyder does't run.
python -c "from spyderlib.spyder import main; main()" --reset
And when I try to run it again, it gives me the following error AGAIN:
Any idea how to fix this? I'm running Anaconda 32 bit on Windows 7 OS
Uninstalled Anaconda.
Removed everything from user/.spyder.
Removed everything spyder related.
Removed the code that caused the error.
Reinstalled Anaconda.
All works fine now.
Checked on Spyder's GitHub issue but there was no answer for it.
Related
I think this question has been asked before on the internet, but the proposed solutions have so far not worked.
I am trying to run a script that imports numpy and pandas. When I run using the Python Console in my IDE (PyCharm), everything works fine. However, when I run the script from the command line, the following error is displayed:
DLL load failed: The specified module could not be found.
and
Unable to import required dependencies
I am using Anaconda Navigator. There my Pandas and Numpy are listed. I tried to uninstall them via the conda shell (conda uninstall numpy, conda uninstall pandas) and then install them again, but without result.
Hope anyone can help.
If you haven't already call this (no quotes)
conda activate "name of environment that has your modules installed"
After trial and error, I de-installed Anaconda and installed pip instead. Then I installed the modules using pip, and it worked like a charm.
(Not the most elegant answer since it does not explain why things went wrong in the first place, but it offered a workable solution at least.)
To start out I had a anaconda installation with python 3.5.2. After doing a pip tensorflow installation I got an error something like "nosetest...". I searched stackoverflow and got a suggestion to move to python 3.6.
So I uninstalled the whole of anaconda and python. Then did complete fresh install of anaconda with python 3.6.10. Did a pip install of tensforflow. launched spyder and jupyter and could not import tensorflow. However, when I issue commands from python command prompt things work fine.
So can't seem to get tensorflow to import in spypder or jupyter.
Lastly following another suggest I ran the c:/from/my/anaconda/Scripts/activate base. But that also didn't work in spyder. However in jupyter it seemed to import but then crashed on tf.version
with access violation.
Can you please help, I've tried many things and suggestions, can't seem to get tensorflow to work with python 3.5 or 3.6.
Thanks.
P.S. I remember using python3.5.2 sometime ago with the then tensorflow, I think version 1.1x and everything went smoothly, everything installed and imported worked beautifully.
Mine is Anaconda 5.3.0
When I run .py in PyCharm 2018.2.4, why it shows that:
ImportError:
DLL load failed: The specified module could not be found.
ImportError:
Importing the multiarray numpy extension module failed. Most
likely you are trying to import a failed build of numpy.
If you're working with a numpy git repo, try `git clean -xdf` (removes all
files not under version control). Otherwise reinstall numpy.
Original error was: DLL load failed: The specified module could not be found.
It seems that PyCharm 2018.2.4 cannot import numpy??
Does anyone see this problem too? How to fix it? Thank you very much.
You can set the Python interpreter path on PyCharm to the Anaconda one (something like ~/anaconda3/bin/python).
Todo do so, open the Settings dialog >> Project: [ProjName] in the left panel >> Project Interpreter. Now you can add to the list paths to local Python interpreters, or virtual environments in the project folder or in a folder specified in the WORKON_HOME.
More instructions here and here.
I believe I have useful information if not the solution.
I too received the error using python to import numpy from the windows command prompt. Then I realized I could succeed if I used the Anaconda prompt. Curious about the difference, I exited python and examined the PATH environment variable. As I had hoped, it contained Anaconda references that did not exist in the Windows PATH. At the command prompt I typed: path > p.txt and hit enter to create a file since the string was so long. When I opened the file in notepad I copied the Anaconda references to the clipboard (C:\Users\laptop\Anaconda3;C:\Users\laptop\Anaconda3\Library\mingw-w64\bin;C:\Users\laptop\Anaconda3\Library\usr\bin;C:\Users\laptop\Anaconda3\Library\bin;C:\Users\laptop\Anaconda3\Scripts;C:\Users\laptop\Anaconda3\bin;) then used the Advanced Settings under the System Control Panel to Edit the Environment Variable and paste it on the beginning of PATH. The problem seems to have gone away, both in the Windows shell and in Pycharm.
First, try to delete .git file from project folder and re-enable vcs. Then uninstall numpy by:
pip3 uninstall numpy
After that, go to pycharm and open File > settings > Project Intepreter get the python location url ex: usr/bin/python3. Copy that path and open terminal and type:
usr/bin/python3 install numpy. Wait for pycharm indexing and try to run project again
I don't think it's an issue with PyCharm.
I got Anaconda 5.3 today and use PyCharm Pro 2018.2.4. Unfortunately, I got the same error as you do. However, if you go to powershell (if you are on Windows like me), type in python and import numpy you still got the same error.
Not sure why yet but uninstall & reinstall didn't help (and tbh I don't get why this might help in any sense though).
So my current solution is:
Roll back to Anaconda 5.2 with Python 3.6 and everything gets back to working.
I have the same thing, pychrm 2018.2 & Anaconda3 (64-bit) 5.3 on win10
I think the issue is about Anaconda, I have uninstalled the Anaconda 5.3 and installed Anaconda 5.2, then everything is ok
Pic 1
Pic 2
Pic 3
Pic 4
This has been happening to me ever since i installed anaconda . I tried spyder --reset, I've tried installing pyqt5.
Nothing worked for me.
Its an Ubuntu18.10 machine. I happened to recently have a fresh install of the OS too and the problem started. It used to run without any error till the last day though upon same configurations. I've already updated my OS with recent updates too.
(Spyder maintainer here) To fix this problem you need to open a system terminal (xterm, konsole, gnome-terminal, etc) and run there
conda install pyopengl
Note: This problem will be solved in our next version (Spyder 3.3.0) to be released in June/2018.
For the Encoding categorical data data section, the first time I ran it, I got an error because I didn't have sklearn installed. After I installed it and re-run, I got In [ * ]. No matter how many times I run it, it's not executing. Basically, after an error is made, all lines can't be executed again.
One thing I found out is that this Jupyter Notebook is under tensorflow environment. This is what I did from the beginning:
1.Create tensorflow environment, then install tensorflow
2.Import the libraries, it didn't work because matplotlib not installed by default
3.Then install matplotlib
From my own troubleshooting, this is where the problem begins. So I tried to uninstall matplotlib, it's fine again as shown.
Now even there's an error, I can still re-run the line and the execution is fine because the number will be updated instead of [ * ].
Then the problem arises again because if I keep running it, it will turn into [*] again after maybe 3rd or 4th times. The thing is if I do the same thing with Jupyter notebook under root environment(no tensorflow installed, matplotlib is installed), I can keep re-running it for as many times and there's no problem(the number will be changed). So what's wrong with it?
It seems the problem came from tensorflow python 3.6. I tried many different methods to troubleshoot. Lastly I removed tensorflow environment, and reinstalled as python 3.5, Jupyter notebook is working fine now. It won't stop executing. Does 3.6 have to be fixed?