I have a bit of a problem. I am on Debian Squeeze, and I want to install sqlite2. The problem is, when I try with:
# pip install pysqlite2
I get:
Downloading/unpacking pysqlite2
Could not find any downloads that satisfy the requirement pysqlite2
No distributions at all found for pysqlite2
Storing complete log in /root/.pip/pip.log
The same error I get when I try with:
# pip install python-pysqlite2
I also tried with easy_install:
# easy_install pysqlite2
Searching for pysqlite2
Reading http://pypi.python.org/simple/pysqlite2/
Couldn't find index page for 'pysqlite2' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading http://pypi.python.org/simple/
No local packages or download links found for pysqlite2
Best match: None
Traceback (most recent call last):
File "/usr/local/bin/easy_install", line 8, in <module>
load_entry_point('setuptools==0.6c11', 'console_scripts', 'easy_install')()
File "/usr/local/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py", line 1712, in main
File "/usr/local/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py", line 1700, in with_ei_usage
File "/usr/local/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py", line 1716, in <lambda>
File "/usr/local/lib/python2.7/distutils/core.py", line 152, in setup
dist.run_commands()
File "/usr/local/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/usr/local/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/usr/local/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py", line 211, in run
File "/usr/local/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py", line 434, in easy_install
File "/usr/local/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/setuptools/package_index.py", line 475, in fetch_distribution
AttributeError: 'NoneType' object has no attribute 'clone'
I also tried with downloading the pyslite2 package from here, and when I try with:
# dpkg -i python-pysqlite2-dbg_2.6.0-1_amd64.deb
I get the following error:
Selecting previously deselected package python-pysqlite2-dbg.
(Reading database ... 144103 files and directories currently installed.)
Unpacking python-pysqlite2-dbg (from python-pysqlite2-dbg_2.6.0-1_amd64.deb) ...
dpkg: dependency problems prevent configuration of python-pysqlite2-dbg:
python-pysqlite2-dbg depends on python-pysqlite2 (= 2.6.0-1); however:
Package python-pysqlite2 is not configured yet.
python-pysqlite2-dbg depends on python-dbg; however:
Package python-dbg is not installed.
dpkg: error processing python-pysqlite2-dbg (--install):
dependency problems - leaving unconfigured
Errors were encountered while processing:
python-pysqlite2-dbg
I would really appriciate help for this.
Thanks in advance!
Just run apt-get install to install all missing dependencies:
apt-get -f install
Related
I am trying to install pyzmail for Python 3.4. I am using Visual Studio Community Edition (Windows) but have also tried to install using the command line and get the following dump:
----- Installing 'pyzmail' -----
Collecting pyzmail
Using cached pyzmail-1.0.3.tar.gz
Collecting distribute (from pyzmail)
Using cached distribute-0.7.3.zip
Complete output from command python setup.py egg_info:
running egg_info
creating pip-egg-info\distribute.egg-info
writing requirements to pip-egg-info\distribute.egg-info\requires.txt
writing top-level names to pip-egg-info\distribute.egg-info\top_level.txt
writing dependency_links to pip-egg-info\distribute.egg-info\dependency_links.txt
writing pip-egg-info\distribute.egg-info\PKG-INFO
Traceback (most recent call last):
File "C:\Users\user\AppData\Local\Temp\pip-build-v5zvr2p3\distribute\pkg_resources.py", line 2680, in _dep_map
return self.__dep_map
File "C:\Users\user\AppData\Local\Temp\pip-build-v5zvr2p3\distribute\pkg_resources.py", line 2525, in __getattr__
raise AttributeError(attr)
AttributeError: _DistInfoDistribution__dep_map
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\user\AppData\Local\Temp\pip-build-v5zvr2p3\distribute\setup.py", line 58, in <module>
setuptools.setup(**setup_params)
File "C:\Python34\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Python34\lib\distutils\dist.py", line 955, in run_commands
self.run_command(cmd)
File "C:\Python34\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Users\user\AppData\Local\Temp\pip-build-v5zvr2p3\distribute\setuptools\command\egg_info.py", line 177, in run
writer = ep.load(installer=installer)
File "C:\Users\user\AppData\Local\Temp\pip-build-v5zvr2p3\distribute\pkg_resources.py", line 2241, in load
if require: self.require(env, installer)
File "C:\Users\user\AppData\Local\Temp\pip-build-v5zvr2p3\distribute\pkg_resources.py", line 2254, in require
working_set.resolve(self.dist.requires(self.extras),env,installer)))
File "C:\Users\user\AppData\Local\Temp\pip-build-v5zvr2p3\distribute\pkg_resources.py", line 2471, in requires
dm = self._dep_map
File "C:\Users\user\AppData\Local\Temp\pip-build-v5zvr2p3\distribute\pkg_resources.py", line 2682, in _dep_map
self.__dep_map = self._compute_dependencies()
File "C:\Users\user\AppData\Local\Temp\pip-build-v5zvr2p3\distribute\pkg_resources.py", line 2699, in _compute_dependencies
from _markerlib import compile as compile_marker
ImportError: No module named '_markerlib'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\user\AppData\Local\Temp\pip-build-v5zvr2p3\distribute\
----- Failed to install 'pyzmail' -----
After Googling, I checked I had the ez_setup and setuptools modules installed, which I do. Any help would be much appreciated!
I've been able to reproduce your problem, and you're right, using pip install pyzmail wont' be good (pyzmail's installer is buggy) so i've tried this instead:
easy_install pyzmail
And it succeed, then I could just import pyzmail without any problem.
You can also try installing the pyzmail36 fork, which installs the same modules for Python 3.6 and later: pip install pyzmail36 on Windows and pip3 install pyzmail36 on Linux and macOS.
You can try easy_install pyzmail
That worked for me in 2020.
I want to install matplotlib via pip. However, I run into circular issues and at certain point I got stuck. Running pip in the terminal produces:
Traceback (most recent call last):
File "/usr/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 3080, in <module>
File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 3066, in _call_aside
File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 3093, in _initialize_master_working_set
File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 651, in _build_master
File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 952, in require
File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 839, in resolve
pkg_resources.DistributionNotFound: The 'pip==1.5.4' distribution was not found and is required by the application
I tried to fix this with easy_install, but it produced the following error message:
Traceback (most recent call last):
File "/usr/bin/easy_install", line 5, in <module>
from pkg_resources import load_entry_point
File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 3080, in <module>
File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 3066, in _call_aside
File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 3093, in _initialize_master_working_set
File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 653, in _build_master
File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 666, in _build_from_requirements
File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 839, in resolve
pkg_resources.DistributionNotFound: The 'setuptools==3.3' distribution was not found and is required by the application
Running sudo apt-get install python-setuptools says that I already have the newest version.
My OS is Ubuntu 14.04. I have tried many different approaches to fix the issue and probably ended up doing even further harm. I don't recall everything I did and how I ended up at this stage, so unfortunately cannot give further info.
My objective is to have matplotlib installed in the end and have a stable state of all my python related libraries. Any solution will work, so I don't mind reinstalling everything or whatever would fix the issue.
UPDATE
Running sudo apt-get build-dep python-matplotlib produces
Reading package lists... Done
Building dependency tree
Reading state information... Done
Picking 'matplotlib' as source package instead of 'python-matplotlib'
E: Unable to find a source package for matplotlib
Whereas sudo apt-get install python-matplotlib produces
Reading package lists... Done
Building dependency tree
Reading state information... Done
python-matplotlib is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
However, matplotlib is still not found from python.
Try:
sudo apt-get build-dep python-matplotlib
This should install the dependecies that matplotlib needs via the Ubuntu package management system (because a lot of those dependencies are not trivial to install with pip), enabling you to:
pip install matplotlib
Source: Matplotlib documentation
I have used this process on both Ubuntu 14.04 and Kubuntu 15.10 to install the newest, stable matplotlib (in virtual environments, but that shouldn't make a difference).
I updated setuptools using:
easy_install -U setuptool
This ran fine. I then realized I did not want to use the most recent version of setuptools and deleted setuptools-18.3.2-py2.6.egg file from /usr/lib/python2.6/site-packages. After I did this I am getting the following errors when trying to install anything using easy_install shown below.
easy_install ReviewBoard-1.7.6-py2.6
Traceback (most recent call last):
File "/usr/bin/easy_install", line 5, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 2659, in <module>
parse_requirements(__requires__), Environment()
File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 546, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: setuptools>=0.7
Looks like ReviewBoard needs setuptools as a dependency. When you ran easy_install ReviewBoard-1.7.6-py2.6, it would have detected that this dependency is already installed but actually it wasn't.
One reason could be that deleting the .egg file was not the complete process of getting rid of a package installed with easy_install. You also need to remove the corresponding line from site-packages/easy-install.pth. Refer: https://stackoverflow.com/a/1233282/4045754
I tried to install python dateutil for my django tastypie but unsuccessful,
http://labix.org/python-dateutil#head-2f49784d6b27bae60cde1cff6a535663cf87497b
I downloaded the tar file in c:/python27 and unzipped it,
I get the following error msg,
**C:\Python27\Scripts>**easy_install dateutil-1.5
Searching for dateutil-1.5
Reading http://pypi.python.org/simple/dateutil-1.5/
Couldn't find index page for 'dateutil-1.5' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading http://pypi.python.org/simple/
No local packages or download links found for dateutil-1.5
Best match: None
Traceback (most recent call last):
File "C:\Python27\Scripts\easy_install-script.py", line 8, in <module>
load_entry_point('setuptools==0.6c11', 'console_scripts', 'easy_install')()
File "build/bdist.linux-i686/egg/setuptools/command/easy_install.py", line 171
2, in main
File "build/bdist.linux-i686/egg/setuptools/command/easy_install.py", line 170
0, in with_ei_usage
File "build/bdist.linux-i686/egg/setuptools/command/easy_install.py", line 171
6, in <lambda>
File "C:\Python27\lib\distutils\core.py", line 152, in setup
dist.run_commands()
File "C:\Python27\lib\distutils\dist.py", line 953, in run_commands
self.run_command(cmd)
File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "build/bdist.linux-i686/egg/setuptools/command/easy_install.py", line 211
, in run
File "build/bdist.linux-i686/egg/setuptools/command/easy_install.py", line 434
, in easy_install
File "build/bdist.linux-i686/egg/setuptools/package_index.py", line 475, in fe
tch_distribution
AttributeError: 'NoneType' object has no attribute 'clone'
This will install tastypie and its dependencies:
$ easy_install pip
$ pip install django-tastypie
To get only dateutil:
$ pip install python-dateutil
I am not sure if this is different on Windows, but it does not appear you are referencing an actual link (see the Reading line). Instead, try this:
easy_install python-dateutil
That will (hopefully) get the package you need. Also, see this post for what looks like a similar issue.
On Windows:
Simply use following code,
$ pip install python-dateutil
If you want with easy_install try below command,( run Command Prompt CMD as Administrator )
$ easy_install python-dateutil
On Ubuntu:
For Ubuntu OS use following code,
sudo apt-get install python-dateutil
I am trying to install distribute using ActivePython 3.1.2 on Windows.
Running python distribute_setup.py as described on the cheese shop give me:
No setuptools distribution found
running install
Traceback (most recent call last):
File "setup.py", line 177, in
scripts = scripts,
File "C:\Dev\Python_x86\3.1\lib\distutils\core.py", line 149, in setup
dist.run_commands()
File "C:\Dev\Python_x86\3.1\lib\distutils\dist.py", line 919, in run_commands
self.run_command(cmd)
File "C:\Dev\Python_x86\3.1\lib\distutils\dist.py", line 938, in run_command
cmd_obj.run()
File "build\src\setuptools\command\install.py", line 73, in run
self.do_egg_install()
File "build\src\setuptools\command\install.py", line 82, in do_egg_install
easy_install = self.distribution.get_command_class('easy_install')
File "build\src\setuptools\dist.py", line 361, in get_command_class
self.cmdclass[command] = cmdclass = ep.load()
File "build\src\pkg_resources.py", line 1953, in load
entry = import(self.module_name, globals(),globals(), ['name'])
File "build\src\setuptools\command\easy_install.py", line 16, in
from setuptools.sandbox import run_setup
File "build\src\setuptools\sandbox.py", line 164, in
fromlist=['name']).file)
AttributeError: 'module' object has no attribute 'file'
Something went wrong during the installation.
See the error message above.
Is there possibly an unknown dependency that I'm missing?
Downloading the source tarball and executing python setup.py install produces the exact same output.
Edit: Added the full stack trace for running the installer.
So apparently the python.org version of Python3 is different from the ActiveState version of Python3. (You should file a bug to someone (I'm not sure to whom))
The fix I have (I'm not sure of all the repercussions)
Download:
http://pypi.python.org/packages/source/d/distribute/distribute-0.6.12.tar.gz#md5=5a52e961f8d8799d243fe8220f9d760e
and then extracting it and modify:
distribute-0.6.12\setuptools\sandbox.py:165
from:
except ImportError:
to
except (ImportError, AttributeError):
that will silence the error and allow you to run:
python setup.py install
It took me awhile to find a package from http://pypi.python.org/pypi?:action=browse&c=533&show=all that would actually install on either version of Python3. "files" was the first package, and since it installed I am pretty sure that easy_install is working for both copies of Python3.
...hope it works! (That's all I can help you with)
this is a bug with Distribute http://bitbucket.org/tarek/distribute/issue/151 ... it should be fixed by next release (0.6.13). It is only reproducible with PyWin32 installed; and ActivePython comes bundled with PyWin32.