I tried pip installing spyder terminal in windows and now spyder 4.1.3 won't open - python-3.x

I have used matlab, but I am only 2 weeks into Python. I downloaded anaconda 3.7 and am using spyder 4.1.3. I was following a youtube tutorial on python. I was doing well until the guy access the cmd prompt (I use Windows 10) from within his IDE.
I didn't know how to so I googled it and to do so I found on pypi.org that all I had to do was run pip install spyder-terminal in the cmd prompt. I tried this but at the end it said that I had a permissions error and to try the --user option. I copied and pasted the exact error and saw on git hub, to create an environment or run python -m pip install --user [INSERT PACKAGE NAME].
I don't really understand hat an environment is so I did the second --user way. I ran python -m pip install --user spyder terminal I got an error about a location not being in the path variable, so i just copied the file location that it referenced and copied it the the path. I then went to open up spyder 4.1.3 and i got the error
Traceback (most recent call last):
File "C:\Users\Aaron\anaconda3\lib\site-packages\qtpy\__init__.py", line 204, in
from PySide import __version__ as PYSIDE_VERSION # analysis:ignore
ModuleNotFoundError: No module named 'PySide'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Aaron\anaconda3\Scripts\spyder-script.py", line 10, in
sys.exit(main())
File "C:\Users\Aaron\anaconda3\lib\site-packages\spyder\app\start.py", line 201, in main
from spyder.app import mainwindow
File "C:\Users\Aaron\anaconda3\lib\site-packages\spyder\app\mainwindow.py", line 53, in
requirements.check_qt()
File "C:\Users\Aaron\anaconda3\lib\site-packages\spyder\requirements.py", line 41, in check_qt
import qtpy
File "C:\Users\Aaron\anaconda3\lib\site-packages\qtpy\__init__.py", line 210, in
raise PythonQtError('No Qt bindings could be found')
qtpy.PythonQtError: No Qt bindings could be found"
I tried opening it again and got the same error. I then tried uninstalling an dre-installing spyder in the anaconda navigator and got the same error. I tried removing the location I added to path and running "pip uninstall spyder-terminal", it said it was removed and I go the same error.
If possible, I am seeking specific steps in layman's terms, because all my knowledge thus far has come from the first 2 hours of a "cool things in python" type video.

Related

Pip can't find module pip._internal.utils

I did a fresh install of Python 3.8.3 for Windows 10. I can't get pip to work, it keeps complaining about module pip._internal.utils that can't be found.
When I run pip -v as a regular user, this is what I get:
Traceback (most recent call last):
File "c:\python38\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:\python38\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Python38\Scripts\pip.exe\__main__.py", line 4, in <module>
File "C:\Users\verhager\AppData\Roaming\Python\Python38\site-packages\pip\__init__.py", line 1, in <module>
from pip._internal.utils.typing import MYPY_CHECK_RUNNING
File "C:\Users\verhager\AppData\Roaming\Python\Python38\site-packages\pip\_internal\__init__.py", line 1, in <module>
import pip._internal.utils.inject_securetransport # noqa
ModuleNotFoundError: No module named 'pip._internal.utils'
I have tried reinstalling, rebooting, running as Administrator, reinstalling pip with get_pip.py, but nothing has worked sofar.
When searching, I found several people having similar issues on different OSes. It seems like I've tried all suggested solutions, but nothing has worked for me sofar.
Reinstalling didn't solve my problem. That is, not before I really made sure that nothing was left behind.
My Python install was in C:\Python38\. After uninstalling python, this directory remained and contained some left over modules, like pip. I manually deleted the whole C:\Python38 folder.
Then, I checked my AppData folder in my home dir. Everything in this folder and all subfolders that was related to Python or Python modules, I deleted as well. Keep in mind AppData is a hidden folder, so it you might have to enable showing of hidden files and folders in the explorer first.
Finally, I removed all Python folders from my PATH environment variables (system as well as user).
After that, I did a new install of Python 3.8 and everything works as expected.
What I think the problem was? Some left overs from a previously (broken) installation messed with my environment, causing pip not resolving required modules.
I had the same error as you, with Windows 10. I also investigated and found that the "pip._internal.utils" package was missing. I was able to overcome this issue without an extensive Cleanup/Reinstall of Python.
After ensuring the following
That the Python Binary and Scripts folders were part of %PATH%
That I was on a Console Window with Administrator privileges
I ran the following command
python -m ensurepip --default-pip
With this command the package was installed. I did a general verification of the installation with the following command.
pip --version
Which returned the with specs. This command invokes the missing package.
I faced the same issue and here's how I resolved this error on windows 7 -
Navigate to C:\Users<user-name>\AppData\Roaming\Python\Python38\site-packages
Delete pip folder
This is introduced when I read this messsage
"You should consider upgrading via the 'python -m pip install --upgrade pip' comand." and followed using the same command for upgrading.

Python, pymesh install problem on windows10

Hi I'm a Python newbie trying to program python using pymesh library but I cant get it to install properly.
Accordijng to attached image I have installed it, and the package says its for 3.8.x and I have python 3.8.2 installed.
pymesh installation instructions (https://pymesh.readthedocs.io/en/latest/installation.html) say to run a test after installing the package. The test fails.
(work) (base) D:\Downloads\HoleCutter>python -c "import pymesh; pymesh.test()"
Traceback (most recent call last):
File "<string>", line 1, in <module>
AttributeError: module 'pymesh' has no attribute 'test'
I dont have the resources/capability to 'build packages with cmake'
screen snap from command prompt window
The reason is the PyMesh library isn't kept up to date on PIP, instead you have to use Docker or compile it yourself. This problem is covered by the following issue on Github, however no action has been taken for years: https://github.com/PyMesh/PyMesh/issues/94
Have you tried "pip install pymesh" or "pipx.x install pymesh"?
I think the instructions in the link you provided are for Linux and Mac OS. You can look at this link: ImportError: No module named PyMesh

python module not found error

This question has been asked a few times, but the remedy appears to complicated enough that I'm still searching for a user specific solution.
I recently installed Quandl module using pip command. Even after successful installation my python idle is still showing
Traceback (most recent call last):
File "F:\Python36\Machine Learning\01.py", line 3, in <module>
import Quandl
ModuleNotFoundError: No module named 'Quandl'
I have used import command in my code.
I am using python 3.6.1 version.
I am working on a windows 10 Desktop.
I have also tried re-installation of module.
You can better navigate to your python scripts folder and open a command window there and try pip3 install quandl .Hope this helps.

Error while starting new IPython console in Spyder

While I was training a neural network with Pybrain, my computer crashed and I had to reboot it. Now Spyder, Python, IPython seem to work fine, however, when trying to open a new IPython console in Spyder, I get the following error:
Error in sitecustomize; set PYTHONVERBOSE for traceback:
TypeError: 'NoneType' object is not callable
Traceback (most recent call last):
File "C:\Users\Mi\Anaconda3\lib\site‑packages\spyderlib\widgets\externalshell\start_ipython_kernel.py", line 167, in
from IPython.kernel.zmq.kernelapp import IPKernelApp
File "C:\Users\Mi\Anaconda3\lib\site‑packages\IPython\__init__.py", line 48, in
from .core.application import Application
File "C:\Users\Mi\Anaconda3\lib\site‑packages\IPython\core\application.py", line 22, in
from IPython.config.application import Application, catch_config_error
File "C:\Users\Mi\Anaconda3\lib\site‑packages\IPython\config\__init__.py", line 6, in
from .application import *
File "C:\Users\Mi\Anaconda3\lib\site‑packages\IPython\config\application.py", line 19, in
from IPython.config.configurable import SingletonConfigurable
File "C:\Users\Mi\Anaconda3\lib\site‑packages\IPython\config\configurable.py", line 14, in
from IPython.utils.text import indent, wrap_paragraphs
File "C:\Users\Mi\Anaconda3\lib\site‑packages\IPython\utils\text.py", line 28, in
from IPython.external.path import path
File "C:\Users\Mi\Anaconda3\lib\site‑packages\IPython\external\path\__init__.py", line 2, in
from path import *
File "C:\Users\Mi\Anaconda3\lib\site‑packages\path.py", line 122, in
__version__ = pkg_resources.require('path.py')[0].version
TypeError: 'NoneType' object is not callable
The error does not seem to interfere with the execution of Python scripts however I am wondering if I accidentally messed something up. I searched the internet but found nothing that could explain this error.
I am using Python 3.4.3 64 bit with the Anaconda 2.3.0 distribution.
Either upgrade setuptools or try
pip install --upgrade --force setuptools fixed it. Either one or the other should fix the problem.
The accepted answer is correct in that it is a setup tools problem, but I couldn't use pip install --upgrade --force setuptools, that complained about not being able to find easy-install.pth
Instead I was able to upgrade setuptools using easy-install itself with:
easy_install --upgrade setuptools, hope that helps someone who was stuck like me.
I have the same problem. and setuptools did not fix my error.
finally, run
conda update path.py
fix my error. You could check this link: https://github.com/spyder-ide/spyder/issues/2679
conda update qt pyqt
conda update spyder
pip install -U spyder
This worked for me

Using virtualenv with python3 in openSuSE

I am experiencing a problem when using virtualenv in openSuSE 12.3 with Python3:
I installed the python3 and python3-devel packages.
Then I installed the newest distribute and pip and finally virtualenv using pip.
When I try to create a virtualenv I get the following error:
$ virtualenv-3.3 venv01
Using base prefix '/usr'
New python executable in venv01/bin/python3.3
Also creating executable in venv01/bin/python
Installing distribute.........................................................................................................................................................................................................................................................................................................................................................................................................done.
Installing pip....
Complete output from command /home/user/venv01/bin/python3.3 -x /home/user/venv01/bin/easy_install /usr/local/lib/pytho...ort/pip-1.3.1.tar.gz:
/home/user/venv01/bin/python3.3: can't open file '/home/user/venv01/bin/easy_install': [Errno 2] No such file or directory
----------------------------------------
...Installing pip...done.
Traceback (most recent call last):
File "/usr/local/bin/virtualenv-3.3", line 9, in <module>
load_entry_point('virtualenv==1.9.1', 'console_scripts', 'virtualenv-3.3')()
File "/usr/local/lib/python3.3/site-packages/virtualenv.py", line 979, in main
no_pip=options.no_pip)
File "/usr/local/lib/python3.3/site-packages/virtualenv.py", line 1094, in create_environment
install_pip(py_executable, search_dirs=search_dirs, never_download=never_download)
File "/usr/local/lib/python3.3/site-packages/virtualenv.py", line 667, in install_pip
filter_stdout=_filter_setup)
File "/usr/local/lib/python3.3/site-packages/virtualenv.py", line 1057, in call_subprocess
% (cmd_desc, proc.returncode))
OSError: Command /home/user/venv01/bin/python3.3 -x /home/user/venv01/bin/easy_install /usr/local/lib/pytho...ort/pip-1.3.1.tar.gz failed with error code 2
Running it with -vvv yields some interesting output that shows that distribute
is extracted to <venv>/local/lib/python3.3/site-packages/.
I wonder why distribute is not installed into <venv>/lib/python3.3/site-packages/?
Does anyone have an idea why this happens and how I can use virtualenv in
openSuSE without compiling python3 myself?
[now fixed in latest patches from opensuse]
[oh! i just realised you are the same person as the original link. sorry. but i will leave this as it is a top result for google search on this issue (was searching myself for any update) so it may help others.]
this is a known issue, discussed at https://forums.opensuse.org/english/get-technical-help-here/applications/484475-using-virtualenv-python-3-a.html and with an open bug at https://bugzilla.novell.com/show_bug.cgi?id=809831
the only work-around i know of is to install everything yourself. it's not so hard, and i describe what is necessary at http://www.acooke.org/cute/GettingPyt0.html
basically:
install python 3.3 from source (do an "altinstall" to install as /usr/local/bin/python3.3)
fix the lib issue (link lib_dynload from /usr/local/lib64/python3.3 to /usr/local/lib/python3.3)
install distutils
install virtualenv
then you can use python3.3 and virtual-env-3.3 etc as expected.

Resources