On trying to install ipython for Python3.4 I get a message that it is already installed.
pip3 install ipython
Requirement already satisfied (use --upgrade to upgrade): ipython in /usr/local/lib/python3.4/site-packages
But when I try to run it with ipython3 notebook I get all this:
Traceback (most recent call last):
File "/usr/local/bin/ipython3", line 11, in <module>
sys.exit(start_ipython())
File "/usr/local/lib/python3.4/site-packages/IPython/__init__.py", line 120, in start_ipython
return launch_new_instance(argv=argv, **kwargs)
File "/usr/local/lib/python3.4/site-packages/IPython/config/application.py", line 573, in launch_instance
app.initialize(argv)
File "<string>", line 2, in initialize
File "/usr/local/lib/python3.4/site-packages/IPython/config/application.py", line 75, in catch_config_error
return method(app, *args, **kwargs)
File "/usr/local/lib/python3.4/site-packages/IPython/terminal/ipapp.py", line 321, in initialize
super(TerminalIPythonApp, self).initialize(argv)
File "<string>", line 2, in initialize
File "/usr/local/lib/python3.4/site-packages/IPython/config/application.py", line 75, in catch_config_error
return method(app, *args, **kwargs)
File "/usr/local/lib/python3.4/site-packages/IPython/core/application.py", line 369, in initialize
self.parse_command_line(argv)
File "/usr/local/lib/python3.4/site-packages/IPython/terminal/ipapp.py", line 316, in parse_command_line
return super(TerminalIPythonApp, self).parse_command_line(argv)
File "<string>", line 2, in parse_command_line
File "/usr/local/lib/python3.4/site-packages/IPython/config/application.py", line 75, in catch_config_error
return method(app, *args, **kwargs)
File "/usr/local/lib/python3.4/site-packages/IPython/config/application.py", line 471, in parse_command_line
return self.initialize_subcommand(subc, subargv)
File "<string>", line 2, in initialize_subcommand
File "/usr/local/lib/python3.4/site-packages/IPython/config/application.py", line 75, in catch_config_error
return method(app, *args, **kwargs)
File "/usr/local/lib/python3.4/site-packages/IPython/config/application.py", line 402, in initialize_subcommand
subapp = import_item(subapp)
File "/usr/local/lib/python3.4/site-packages/IPython/utils/importstring.py", line 42, in import_item
module = __import__(package, fromlist=[obj])
File "/usr/local/lib/python3.4/site-packages/IPython/html/notebookapp.py", line 67, in <module>
from .services.sessions.sessionmanager import SessionManager
File "/usr/local/lib/python3.4/site-packages/IPython/html/services/sessions/sessionmanager.py", line 7, in <module>
import sqlite3
File "/usr/local/lib/python3.4/sqlite3/__init__.py", line 23, in <module>
from sqlite3.dbapi2 import *
File "/usr/local/lib/python3.4/sqlite3/dbapi2.py", line 27, in <module>
from _sqlite3 import *
ImportError: No module named '_sqlite3'
Assuming that the last line is the most important
ImportError: No module named '_sqlite3'
I tried to install all sorts of dependencies for it:
apt-get install sqlite3 libsqlite3-dev
When I tried installing Pysqlite via pip3 install pysqlite :
Collecting pysqlite
Using cached pysqlite-2.6.3.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 20, in <module>
File "/tmp/pip-build-ggtq7_wu/pysqlite/setup.py", line 85
print "Is sphinx installed? If not, try 'sudo easy_install sphinx'."
^
SyntaxError: Missing parentheses in call to 'print'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-ggtq7_wu/pysqlite
However Sphinx is already installed. I even reinstalled it.
pip3 install sphinx
Requirement already satisfied (use --upgrade to upgrade): sphinx in /usr/local/lib/python3.4/site-packages
Requirement already satisfied (use --upgrade to upgrade): Jinja2>=2.3 in /usr/local/lib/python3.4/site-packages (from sphinx)
Requirement already satisfied (use --upgrade to upgrade): snowballstemmer>=1.1 in /usr/local/lib/python3.4/site-packages (from sphinx)
Requirement already satisfied (use --upgrade to upgrade): docutils>=0.11 in /usr/local/lib/python3.4/site-packages (from sphinx)
Requirement already satisfied (use --upgrade to upgrade): babel>=1.3 in /usr/local/lib/python3.4/site-packages (from sphinx)
Requirement already satisfied (use --upgrade to upgrade): sphinx-rtd-theme<0.2,>=0.1 in /usr/local/lib/python3.4/site-packages (from sphinx)
Requirement already satisfied (use --upgrade to upgrade): alabaster<0.8,>=0.7 in /usr/local/lib/python3.4/site-packages (from sphinx)
Requirement already satisfied (use --upgrade to upgrade): Pygments>=2.0 in /usr/local/lib/python3.4/site-packages (from sphinx)
Requirement already satisfied (use --upgrade to upgrade): six>=1.4 in /usr/local/lib/python3.4/site-packages (from sphinx)
Requirement already satisfied (use --upgrade to upgrade): markupsafe in /usr/local/lib/python3.4/site-packages (from Jinja2>=2.3->sphinx)
Requirement already satisfied (use --upgrade to upgrade): pytz>=0a in /usr/local/lib/python3.4/site-packages (from babel>=1.3->sphinx)
Hence I have not been able to resolve it because evidently that file _sqlite3.so which should be in /usr/local/lib/python3.4/lib-dynload does not exist and I cannot find a way to install it.
I managed to resolve it thanks to the help I got in the comments.
Just putting it here to make it easy for anyone else who may have the same issue to figure out whats going on.
The issue is in using a self compiled version of Python, before the sql dev files were installed. Hence the bindings did not take.
First I had to use sudo apt-get install sqlite3 libsqlite3-dev to get the relevant sqlite files.
Then I had to recompile the Python by using a Source Tarball and executing the following commands to recompile it.
make clean
./configure
make
make install
I got the same issue on CentOS 6.8 and I installed sqlite-devel and then I re-compiled the python and got the issue fixed:
yum install sqlite-devel
Related
I am currently trying to install kivy to python 3.6, but when i am trying yo install it it throws the following exception:
C:\Users\magshimim\Desktop\notKivy>python -m pip install kivy
Collecting kivy
Using cached
https://files.pythonhosted.org/packages/29/e6/e07f77a8d85a626bb955fe072d41042c4c
ee6deaca61295f1c08e6407097/Kivy-1.10.0-cp36-cp36m-win32.whl Collecting Kivy-Garden>=0.1.4 (from kivy)
Using cached https://files.pythonhosted.org/packages/7d/68/decaee596ff8168a39432eb3949fc7c0be952ebb9467806823bffc165d48/kivy-garden-0.1.4.tar.gz
Requirement already satisfied: docutils in c:\python36\lib\site-packages (from kivy)
Requirement already satisfied: pygments in c:\python36\lib\site-packages (from kivy)
Requirement already satisfied: requests in c:\python36\lib\site-packages (from Kivy-Garden>=0.1.4->kivy)
Exception:
Traceback (most recent call last):
File "C:\Python36\lib\site-packages\pip\basecommand.py", line 215, in main
status = self.run(options, args)
File "C:\Python36\lib\site-packages\pip\commands\install.py", line 335, in run
wb.build(autobuilding=True)
File "C:\Python36\lib\site-packages\pip\wheel.py", line 749, in build
self.requirement_set.prepare_files(self.finder)
File "C:\Python36\lib\site-packages\pip\req\req_set.py", line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "C:\Python36\lib\site-packages\pip\req\req_set.py", line 666, in _prepare_file
check_dist_requires_python(dist)
File "C:\Python36\lib\site-packages\pip\utils\packaging.py", line 48, in check_dist_requires_python
feed_parser.feed(metadata)
File "C:\Python36\lib\email\feedparser.py", line 175, in feed
self._input.push(data)
File "C:\Python36\lib\email\feedparser.py", line 103, in push
self._partial.write(data)
TypeError: string argument expected, got 'NoneType'
Any help?
Try instead:
pip install kivy
Worked for me on my Windows machine. Make sure pip is in the Path enviornment variable on your machine.
I am trying to install numpy, scipy and pandas but getting the following error:
Aleeshas-MacBook-Air:~ aleesha$ pip install numpy scipy pandas
Requirement already satisfied (use --upgrade to upgrade): numpy in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python
Requirement already satisfied (use --upgrade to upgrade): scipy in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python
Collecting pandas
Using cached pandas-0.19.1-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Requirement already satisfied (use --upgrade to upgrade): pytz>=2011k in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from pandas)
Requirement already satisfied (use --upgrade to upgrade): python-dateutil in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from pandas)
Installing collected packages: pandas
Exception:
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/pip-8.1.2-py2.7.egg/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/Library/Python/2.7/site-packages/pip-8.1.2-py2.7.egg/pip/commands/install.py", line 317, in run
prefix=options.prefix_path,
File "/Library/Python/2.7/site-packages/pip-8.1.2-py2.7.egg/pip/req/req_set.py", line 742, in install
**kwargs
File "/Library/Python/2.7/site-packages/pip-8.1.2-py2.7.egg/pip/req/req_install.py", line 831, in install
self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
File "/Library/Python/2.7/site-packages/pip-8.1.2-py2.7.egg/pip/req/req_install.py", line 1032, in move_wheel_files
isolated=self.isolated,
File "/Library/Python/2.7/site-packages/pip-8.1.2-py2.7.egg/pip/wheel.py", line 346, in move_wheel_files
clobber(source, lib_dir, True)
File "/Library/Python/2.7/site-packages/pip-8.1.2-py2.7.egg/pip/wheel.py", line 317, in clobber
ensure_dir(destdir)
File "/Library/Python/2.7/site-packages/pip-8.1.2-py2.7.egg/pip/utils/__init__.py", line 83, in ensure_dir
os.makedirs(path)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 157, in makedirs
mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/pandas'
You are using pip version 8.1.2, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Aleeshas-MacBook-Air:~ aleesha$
I have Python version - Python 3.5.2. Why in the first place is pip trying to install at 2.7?
I suggest you install Anaconda, with it you will solve a lot of issues. It supports the latest 3.5 version, comes equipped with most of the data analitics libraries and the ones you dont have you can get with pip install, which is guaranteed to work since pip get comes with Anaconda as well.
I installed an application with python's "pip":
sudo pip install EasyBlogger
Installation finished without errors:
Collecting EasyBlogger
Using cached EasyBlogger-0.9.0.zip
Requirement already satisfied (use --upgrade to upgrade): pypandoc in /usr/lib/python3.5/site-packages (from EasyBlogger)
Requirement already satisfied (use --upgrade to upgrade): google-api-python-client in /usr/lib/python3.5/site-packages (from EasyBlogger)
Requirement already satisfied (use --upgrade to upgrade): python-gflags in /usr/lib/python3.5/site-packages (from EasyBlogger)
Requirement already satisfied (use --upgrade to upgrade): httplib2 in /usr/lib/python3.5/site-packages (from EasyBlogger)
Requirement already satisfied (use --upgrade to upgrade): setuptools in /usr/lib/python3.5/site-packages (from pypandoc->EasyBlogger)
Requirement already satisfied (use --upgrade to upgrade): oauth2client>=1.4.6 in /usr/lib/python3.5/site-packages (from google-api-python-client->EasyBlogger)
Requirement already satisfied (use --upgrade to upgrade): six>=1.6.1 in /usr/lib/python3.5/site-packages (from google-api-python-client->EasyBlogger)
Requirement already satisfied (use --upgrade to upgrade): uritemplate>=0.6 in /usr/lib/python3.5/site-packages (from google-api-python-client->EasyBlogger)
Requirement already satisfied (use --upgrade to upgrade): pyasn1>=0.1.7 in /usr/lib/python3.5/site-packages (from oauth2client>=1.4.6->google-api-python-client->EasyBlogger)
Requirement already satisfied (use --upgrade to upgrade): pyasn1-modules>=0.0.5 in /usr/lib/python3.5/site-packages (from oauth2client>=1.4.6->google-api-python-client->EasyBlogger)
Requirement already satisfied (use --upgrade to upgrade): rsa>=3.1.4 in /usr/lib/python3.5/site-packages (from oauth2client>=1.4.6->google-api-python-client->EasyBlogger)
Requirement already satisfied (use --upgrade to upgrade): simplejson>=2.5.0 in /usr/lib/python3.5/site-packages (from uritemplate>=0.6->google-api-python-client->EasyBlogger)
Installing collected packages: EasyBlogger
Running setup.py install for EasyBlogger
Successfully installed EasyBlogger-0.9.0
However when I try to run the scipt the following way:
sudo easyblogger --blogid 6852822618950333369 get
I get only error messages:
Traceback (most recent call last):
File "/usr/bin/easyblogger", line 9, in <module>
load_entry_point('EasyBlogger==0.9.0', 'console_scripts', 'easyblogger')()
File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 568, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2720, in load_entry_point
return ep.load()
File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2380, in load
return self.resolve()
File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2386, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/usr/lib/python3.5/site-packages/blogger/__init__.py", line 1, in <module>
from blogger import EasyBlogger, main
ImportError: cannot import name 'EasyBlogger'
The content of /usr/bin/easyblogger is the following:
#!/usr/bin/python3
# EASY-INSTALL-ENTRY-SCRIPT: 'EasyBlogger==0.9.0','console_scripts','easyblogger'
__requires__ = 'EasyBlogger==0.9.0'
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.exit(
load_entry_point('EasyBlogger==0.9.0', 'console_scripts', 'easyblogger')()
)
The error comes from the 9. line load_entry_point. What can I do to make the easyblogger script working? Anyway I am using Arch Linux.
I see you're using Python 3. It appears easyblogger is not compatible, even though it installs using pip3.
To see this, correct __init__.py by adding a period since your are importing from the current folder (new in python 3):
from .blogger import EasyBlogger, main
Now if you run your command, you get the following:
File "/usr/local/lib/python3.4/dist-packages/blogger/blogger.py", line 424
print postId
^
SyntaxError: Missing parentheses in call to 'print'
Now you need to decide whether to fix the package or not! Just to make sure, installing in Python 3:
sudo apt-get -y install python3-setuptools
sudo easy_install3 pip
sudo pip3 install EasyBlogger
Trying to run ipython after installing via pip causes:
$ ipython
-bash: ipython: command not found
Do I need to add a directory to my path? The python installation guide doesn't mention it:
http://ipython.org/install.html
Everything seems to be installed as expected:
$ pip show ipython
---
Metadata-Version: 2.0
Name: ipython
Version: 4.0.0
Summary: IPython: Productive Interactive Computing
Home-page: http://ipython.org
Author: The IPython Development Team
Author-email: ipython-dev#scipy.org
License: BSD
Location: /Library/Python/2.7/site-packages
Requires: traitlets, pickleshare, simplegeneric, decorator, gnureadline, appnope, pexpect
I'm currently using python version 2.7.10 on Mac OS X 10.11
EDIT:
I've tried uninstalling and re-installing and now I'm getting this error:
sudo -H pip install ipython
Collecting ipython
Downloading ipython-4.0.0-py2-none-any.whl (730kB)
100% |████████████████████████████████| 733kB 459kB/s
Requirement already satisfied (use --upgrade to upgrade): traitlets in /Library/Python/2.7/site-packages (from ipython)
Requirement already satisfied (use --upgrade to upgrade): pickleshare in /Library/Python/2.7/site-packages (from ipython)
Requirement already satisfied (use --upgrade to upgrade): simplegeneric>0.8 in /Library/Python/2.7/site-packages (from ipython)
Requirement already satisfied (use --upgrade to upgrade): decorator in /Library/Python/2.7/site-packages (from ipython)
Requirement already satisfied (use --upgrade to upgrade): gnureadline in /Library/Python/2.7/site-packages (from ipython)
Requirement already satisfied (use --upgrade to upgrade): appnope in /Library/Python/2.7/site-packages (from ipython)
Requirement already satisfied (use --upgrade to upgrade): pexpect in /Library/Python/2.7/site-packages (from ipython)
Requirement already satisfied (use --upgrade to upgrade): ipython-genutils in /Library/Python/2.7/site-packages (from traitlets->ipython)
Requirement already satisfied (use --upgrade to upgrade): path.py in /Library/Python/2.7/site-packages (from pickleshare->ipython)
Requirement already satisfied (use --upgrade to upgrade): ptyprocess>=0.5 in /Library/Python/2.7/site-packages (from pexpect->ipython)
Installing collected packages: ipython
Exception:
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/pip-7.1.2-py2.7.egg/pip/basecommand.py", line 211, in main
status = self.run(options, args)
File "/Library/Python/2.7/site-packages/pip-7.1.2-py2.7.egg/pip/commands/install.py", line 311, in run
root=options.root_path,
File "/Library/Python/2.7/site-packages/pip-7.1.2-py2.7.egg/pip/req/req_set.py", line 646, in install
**kwargs
File "/Library/Python/2.7/site-packages/pip-7.1.2-py2.7.egg/pip/req/req_install.py", line 803, in install
self.move_wheel_files(self.source_dir, root=root)
File "/Library/Python/2.7/site-packages/pip-7.1.2-py2.7.egg/pip/req/req_install.py", line 998, in move_wheel_files
isolated=self.isolated,
File "/Library/Python/2.7/site-packages/pip-7.1.2-py2.7.egg/pip/wheel.py", line 371, in move_wheel_files
clobber(source, dest, False, fixer=fixer, filter=filter)
File "/Library/Python/2.7/site-packages/pip-7.1.2-py2.7.egg/pip/wheel.py", line 310, in clobber
ensure_dir(destdir)
File "/Library/Python/2.7/site-packages/pip-7.1.2-py2.7.egg/pip/utils/__init__.py", line 71, in ensure_dir
os.makedirs(path)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 150, in makedirs
makedirs(head, mode)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 150, in makedirs
makedirs(head, mode)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 157, in makedirs
mkdir(name, mode)
OSError: [Errno 1] Operation not permitted: '/System/Library/Frameworks/Python.framework/Versions/2.7/share'
I guess this error may have happened the first time around, as it still thinks it has been installed properly!
I got same problem. When you uninstall and reinstall ipython, the error happens because of permission. You can delete the directory and reinstall by "sudo pip install ipython".
I don't know why but it installs in 'usr/local/bin' instead of 'usr/bin'. I have to use "sudo ipython" to run it.
I'm running python 2.7 on Windows 7, setup via Anaconda. I wanted to update my matplotlib by running pip install matplotlib --upgrade and received the following error message:
C:\Windows\system32>pip install matplotlib Downloading/unpacking
matplotlib Requirement already satisfied (use --upgrade to upgrade):
numpy>=1.6 in c:\anaco nda\lib\site-packages (from matplotlib)
Requirement already satisfied (use --upgrade to upgrade):
pyparsing>=1.5.6 in c: \anaconda\lib\site-packages (from matplotlib)
Requirement already satisfied (use --upgrade to upgrade):
python-dateutil in c:\ anaconda\lib\site-packages (from matplotlib)
Requirement already satisfied (use --upgrade to upgrade): pytz in
c:\anaconda\li b\site-packages (from matplotlib) Requirement already
satisfied (use --upgrade to upgrade): six>=1.4 in c:\anacond
a\lib\site-packages (from matplotlib) Installing collected packages:
matplotlib Cleaning up... Exception: Traceback (most recent call
last): File "C:\Anaconda\lib\site-packages\pip\basecommand.py", line
122, in main
status = self.run(options, args) File "C:\Anaconda\lib\site-packages\pip\commands\install.py", line 283, in
run
requirement_set.install(install_options, global_options, root=options.root_p ath) File
"C:\Anaconda\lib\site-packages\pip\req.py", line 1435, in install
requirement.install(install_options, global_options, *args, **kwargs) File "C:\Anaconda\lib\site-packages\pip\req.py", line 671, in install
self.move_wheel_files(self.source_dir, root=root) File "C:\Anaconda\lib\site-packages\pip\req.py", line 901, in
move_wheel_files
pycompile=self.pycompile, File "C:\Anaconda\lib\site-packages\pip\wheel.py", line 215, in
move_wheel_fil es
clobber(source, lib_dir, True) File "C:\Anaconda\lib\site-packages\pip\wheel.py", line 209, in clobber
shutil.copy2(srcfile, destfile) File "C:\Anaconda\lib\shutil.py", line 130, in copy2
copyfile(src, dst) File "C:\Anaconda\lib\shutil.py", line 83, in copyfile
with open(dst, 'wb') as fdst: IOError: [Errno 13] Permission denied: 'C:\Anaconda\Lib\site-packages\matplo tlib\ft2font.pyd'
I gave myself 'full control' by right clicking on the Anaconda folder, going to the security tab and changing the permissions. I also restarted my command window as an administrator. (The account I use is an administrator, but in light of: What precisely does 'Run as administrator' do? I thought it couldn't hurt)
Despite these two steps I'm still getting an IOError: [Errno13] on the cleaning up step. I can no longer import matplotlib. I have also tried uninstalling and reinstalling matplotlib. I hope to avoid doing that for Anaconda.