Anaconda Terminal error pywin32_bootstrap - python-3.x

I got this error in my Anaconda Navigator base Terminal:
Traceback (most recent call last):
File "C:\Users\myusername\AppData\Local\Continuum\anaconda3\lib\site.py", line 168, in addpackage
exec(line)
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'pywin32_bootstrap'
Remainder of file ignored
How can i fix this?

I got the same error during pip install, and I solved it by installing build 225 of pywin32 instead of the latest version:
pip install pywin32==225

I followed soberWolf's suggestion, but needed to add the --user switch as the permissions seem a little off, so pip install --ignore-installed pywin32 --user

try pip install --ignore-installed pywin32 to reinstall pywin32
quote: How to fix 'ImportError: DLL load failed while importing win32api'

Related

Spyder won't start in cmd

When I try to run spyder (any version of spyder) in cmd I get the error below.
Traceback (most recent call last):
File "C:\Users\bjwil\Anaconda3\Scripts\spyder-script.py", line 10, in <module>
sys.exit(main())
File "C:\Users\bjwil\Anaconda3\Lib\site-packages\spyder\app\start.py", line 186, in main
from spyder.app import mainwindow
File "C:\Users\bjwil\Anaconda3\Lib\site-packages\spyder\app\mainwindow.py", line 87, in <module>
from qtpy import QtSvg # analysis:ignore
File "C:\Users\bjwil\Anaconda3\Lib\site-packages\qtpy\QtSvg.py", line 14, in <module>
from PyQt5.QtSvg import *
ImportError: DLL load failed: The specified procedure could not be found.
I do not get this error when run spyder in MinGW Git for Windows. I have looked for a few hours but cannot seem to find answer to why. I have the python3.dll and python36.dll extension from Anaconda3 in the Anaconda3 folder. I also cannot uninstall PyQt5 (getting PackagesNotFoundError: The following packages are missing from the target environment:
- pyqt5) and reinstall using either conda install -c dsdale24 pyqt5 or conda install --channel https://conda.anaconda.org/bpentz pyqt5. I get:
Collecting package metadata: done
Solving environment: failed
UnsatisfiableError: The following specifications were found to be in conflict:
- conda[version='>=4.6.7']
- pyqt5
Use "conda search <package> --info" to see the dependencies for each package.
conda update --all fixed the same issue for me.
There may different reason for this problem. Sometimes it is because you forget to install spyder in the anaconda environment.
You can install Spyder from anaconda prompt by running
conda install spyder
Also, you can install spyder by going to the anaconda navigator.

Problems installing twill on python 3 on windows.

I'm trying to use pip to install twill. I do the following.
C:\Users\mjpvanzuijlen\Python\python3.exe -m pip install twill
Which gives me the following result:
Collecting twill
Using cached https://files.pythonhosted.org/packages/2f/7e/ce3e6d72efe66530e131454f63c456b9f088435daaa99ae37b53ceafd32b/twill-1.8.0.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\MJPVAN~1\AppData\Local\Temp\pip-install-h1xg__n6\twill\setup.py", line 6
print '(WARNING: importing distutils, not setuptools!)'
^
SyntaxError: invalid syntax
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\MJPVAN~1\AppData\Local\Temp\pip-install-h1xg__n6\twill\
I found some github posts saying that this might be caused by setupttools, and upgrading it should fix it. I tried this, but it didn't work.
I'm not quite sure what's going wrong, but the print statement appears to be for python2? Could it be that python3 is running a pip version running python2? I'm clueless.
There is a different pip for python version3
python3.exe -m pip install twill3
Try this

Python 3 pip upgrade from 7.1.2 to 8.0.1 fails

pip says that I shall consider an upgrade. When I'm doing so and using
python -m pip install --upgrade pip
I get the following UnicodeDecode error message:
C:\Users\Sören>python -m pip install --upgrade pip
Collecting pip
Using cached pip-8.0.1-py2.py3-none-any.whl
Installing collected packages: pip
Found existing installation: pip 7.1.2
Exception:
Traceback (most recent call last):
File "C:\Users\Sören\AppData\Local\Programs\Python\Python35-32\lib\site-packages\pip\basecommand.py", line 211, in main
status = self.run(options, args)
File "C:\Users\Sören\AppData\Local\Programs\Python\Python35-32\lib\site-packages\pip\commands\install.py", line 311, in run
root=options.root_path,
File "C:\Users\Sören\AppData\Local\Programs\Python\Python35-32\lib\site-packages\pip\req\req_set.py", line 640, in install
requirement.uninstall(auto_confirm=True)
File "C:\Users\Sören\AppData\Local\Programs\Python\Python35-32\lib\site-packages\pip\req\req_install.py", line 673, in uninstall
for path in pip.wheel.uninstallation_paths(dist):
File "C:\Users\Sören\AppData\Local\Programs\Python\Python35-32\lib\site-packages\pip\wheel.py", line 512, in unique
for item in fn(*args, **kw):
File "C:\Users\Sören\AppData\Local\Programs\Python\Python35-32\lib\site-packages\pip\wheel.py", line 531, in uninstallation_paths
r = csv.reader(FakeFile(dist.get_metadata_lines('RECORD')))
File "C:\Users\Sören\AppData\Local\Programs\Python\Python35-32\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 1619, in get_metadata_lines
return yield_lines(self.get_metadata(name))
File "C:\Users\Sören\AppData\Local\Programs\Python\Python35-32\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 1616, in get_metadata
return self._get(self._fn(self.egg_info, name)).decode("utf-8")
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf6 in position 22366: invalid start byte
You are using pip version 7.1.2, however version 8.0.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
I'm running Python 3 in the 32-bit version on a Windows 10 machine. I don't know if that has anything to do with it, but I had VisualStudio, version 10, installed on my system. Now it is removed.
Kind regards
John
Thanks blackpingus, your answer helped me to find the problem.
The problem was the 'ö' character, which is the name, I am using on Windows. Because of that, this name is also placed in the system path.
A workaround for that problem is to install the package using another user account, which has not any 'umlaute' in his name.
To install updated pip
From start, find the "Command Prompt
Right click on "Command Prompt"
Run as Administrator
Provide the user name and the password if prompted
Now you can upgrade pip: python -m pip install --upgrade pip

Issues installing Tweepy on Ubuntu

I'm trying to install Tweepy on an Ubuntu VM and I'm running into way more issues than I should be. My first step was to successfully get pip installed. After that I tried:
pip install tweepy
which returns:
Traceback (most recent call last):
File "/usr/local/bin/pip", line 5, in <module>
from pkg_resources import load_entry_point
File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 3020, in <module>
File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 616, in _build_master
File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 629, in _build_from_requirements
File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 807, in resolve
pkg_resources.DistributionNotFound: pip==1.5.4
The most that I can gather from that error message is that it can't find pip version 1.5.4. However, if I ask it whereis pip it returns:
pip: /usr/local/bin/pip2.7 /usr/local/bin/pip /usr/share/man/man1/pip.1.gz
So I know pip is installed. I decided to try the other method listed and do
git clone https://github.com/tweepy/tweepy.git
cd tweepy
python setup.py install
But that only seems to partially install with error messages returning. Trying whereis tweepy after that method returns nothing.
Can anyone make sense of why this simple install isn't working for me?
This issue was resolved by using another fresh Ubuntu VM install and once again trying the manual installation by using
git clone https://github.com/tweepy/tweepy.git
cd tweepy
python setup.py install
For whatever reason, it now works. The answer is officially voodoo.

Creating new virtualenv with python3.4

I'm getting the following error when trying to set up a new virtualenv with python3.4 (I'm running this command: virtualenv –p /usr/bin/python /tmp/djangodev):
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site- packages/pkg_resources.py", line 2697, in <module>
working_set.require(__requires__)
File "/System/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pkg_resources.py", line 669, in require
needed = self.resolve(parse_requirements(requirements))
File "/System/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pkg_resources.py", line 576, in resolve
raise VersionConflict(dist,req) # XXX put more info here
pkg_resources.VersionConflict: (virtualenv 1.11.6 (/System/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages),
Requirement.parse('virtualenv==1.7.2'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/bin/virtualenv", line 5, in <module>
from pkg_resources import load_entry_point
File "/System/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pkg_resources.py", line 2701, in <module>
parse_requirements(__requires__), Environment()
File "/System/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pkg_resources.py", line 572, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: virtualenv==1.7.2
I first downloaded virtualenv1.7.2 and after getting this error updated it by running: pip install virtualenv. Here is the successful installation message from this:
Downloading/unpacking virtualenv
Downloading virtualenv-1.11.6-py2.py3-none-any.whl (1.6MB): 1.6MB downloaded
Installing collected packages: virtualenv
Successfully installed virtualenv
Cleaning up...
Can someone please help me resolve the above error?
Thanks #MattDMo for cluing me in.
I indeed have multiple virtualenvs installed so I ran sudo pip uninstall virtualenv and then sudo pip install virtualenv and this resolved the above error.

Resources