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.
Related
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'
I'm new to both python and linux. I have python 3.4 on a Uberstudent linux distribution(based on Ubuntu 14.04).
I'm trying to get a progress bar for scripts in python. So I run
pip install progressbar
in the command line. Then I get the error
Command python setup.py egg_info failed with error code 1
After searching for a while I find that this is because pip, setuptools and wheel are not up to date. So I run
python3 -m pip install --upgrade pip setuptools wheel
and I get the output
Downloading/unpacking pip from https://pypi.python.org/packages/b6/ac/7015eb97dc749283ffdec1c3a88ddb8ae03b8fad0f0e611408f196358da3/pip-9.0.1-py2.py3-none-any.whl#md5=297dbd16ef53bcef0447d245815f5144
Downloading pip-9.0.1-py2.py3-none-any.whl (1.3MB): 1.3MB downloaded
Downloading/unpacking setuptools from https://pypi.python.org/packages/43/41/033a273f9a25cb63050a390ee8397acbc7eae2159195d85f06f17e7be45a/setuptools-38.5.1-py2.py3-none-any.whl#md5=908b8b5e50bf429e520b2b5fa1b350e5
Downloading setuptools-38.5.1-py2.py3-none-any.whl (489kB): 489kB downloaded
Requirement already up-to-date: wheel in /usr/local/lib/python3.4/dist-packages
Installing collected packages: pip, setuptools
Found existing installation: pip 1.5.4
Not uninstalling pip at /usr/lib/python3/dist-packages, owned by OS
Can't roll back pip; was not uninstalled
Cleaning up...
Exception:
Traceback (most recent call last):
File "/usr/lib/python3.4/shutil.py", line 523, in move
os.rename(src, real_dst)
PermissionError: [Errno 13] Permission denied: '/tmp/pip_build_martin/pip/pip-9.0.1.dist-info/WHEEL' -> '/usr/local/lib/python3.4/dist-packages/pip-9.0.1.dist-info/WHEEL'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/usr/lib/python3/dist-packages/pip/commands/install.py", line 283, in run
requirement_set.install(install_options, global_options, root=options.root_path)
File "/usr/lib/python3/dist-packages/pip/req.py", line 1436, in install
requirement.install(install_options, global_options, *args, **kwargs)
File "/usr/lib/python3/dist-packages/pip/req.py", line 672, in install
self.move_wheel_files(self.source_dir, root=root)
File "/usr/lib/python3/dist-packages/pip/req.py", line 902, in move_wheel_files
pycompile=self.pycompile,
File "/usr/lib/python3/dist-packages/pip/wheel.py", line 206, in move_wheel_files
clobber(source, lib_dir, True)
File "/usr/lib/python3/dist-packages/pip/wheel.py", line 200, in clobber
shutil.move(srcfile, destfile)
File "/usr/lib/python3.4/shutil.py", line 535, in move
copy2(src, real_dst)
File "/usr/lib/python3.4/shutil.py", line 245, in copy2
copyfile(src, dst, follow_symlinks=follow_symlinks)
File "/usr/lib/python3.4/shutil.py", line 109, in copyfile
with open(dst, 'wb') as fdst:
PermissionError: [Errno 13] Permission denied: '/usr/local/lib/python3.4/dist-packages/pip-9.0.1.dist-info/WHEEL'
Storing debug log for failure in /home/martin/.pip/pip.log
After some further digging I find that i should try to uninstall it and install it again. But this gives the same permission denied error. And using get-pip.py also gives the same error.
I have no idea what any of this means or why I don't have permission to upgrade pip.
please help me
Try using virtualenv, maybe already installed, so skip the first 2 lines :
$ sudo apt update
$ sudo apt-get install python-virtualenv
$ mkdir test_virtualenv
$ cd test_virtualenv
$ virtualenv .
$ bin/pip install foobar
I have installed PyQt5 in my Ubuntu 14.04.04 LTS by using the following command:
sudo apt-get install python3-pyqt5
But when I run the following statement in python IDLE, I got errors. How to solve it?
>>> from PyQt5.QtQuick import QQuickView, QQuickItem
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named 'PyQt5.QtQuick'
For this kind of error I have found a solution from the above comment. Just install relevant package with apt-get:
sudo apt-get install python3-pyqt5.qtquick
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.
i use kali linux and i need sqlite3 driver for python3.4.2 i tried
the pysqlite install, but get an erorr. pls help me how to correct the
erorr thanks in advance
root#thinkpad:~# python --version
Python 3.4.2
root#thinkpad:~# pip --version
pip 1.5.6 from /usr/local/lib/python3.4/site-packages (python 3.4)
root#thinkpad:~# pip install pysqlite
Downloading/unpacking pysqlite
Downloading pysqlite-2.6.3.tar.gz (76kB): 76kB downloaded
Running setup.py (path:/tmp/pip_build_root/pysqlite/setup.py) egg_info for package pysqlite
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/tmp/pip_build_root/pysqlite/setup.py", line 85
print "Is sphinx installed? If not, try 'sudo easy_install sphinx'."
^
SyntaxError: Missing parentheses in call to 'print'
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/tmp/pip_build_root/pysqlite/setup.py", line 85
print "Is sphinx installed? If not, try 'sudo easy_install sphinx'."
^
SyntaxError: Missing parentheses in call to 'print'
----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_root/pysqlite
Storing debug log for failure in /root/.pip/pip.log