I an now setting up a work environment on some open source project I just cloned from GitHub,
after running
pip install -U -r requirements.txt
in a virtualenv of course, I was trying to run fab sanity as this projects uses fabric, and I am getting the following error:
(openmuni)oleg#oleg-Lenovo-G580:~/dev/openmuni-budgets$ fab sanity
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/fabric/main.py", line 637, in main
docstring, callables, default = load_fabfile(fabfile)
File "/usr/lib/python2.7/dist-packages/fabric/main.py", line 164, in load_fabfile
imported = importer(os.path.splitext(fabfile)[0])
File "/home/oleg/dev/openmuni-budgets/fabfile/__init__.py", line 1, in <module>
from quilt import *
ImportError: No module named quilt
The most trivial 2 solutions didn't work unfortunately:
(openmuni)oleg#oleg-Lenovo-G580:~/dev/openmuni-budgets$ pip install quilt
Requirement already satisfied (use --upgrade to upgrade): quilt in /home/oleg/.virtualenvs/openmuni/lib/python2.7/site-packages
Requirement already satisfied (use --upgrade to upgrade): Fabric>=1.8.0 in /home/oleg/.virtualenvs/openmuni/lib/python2.7/site-packages (from quilt)
Requirement already satisfied (use --upgrade to upgrade): cuisine>=0.6.5 in /home/oleg/.virtualenvs/openmuni/lib/python2.7/site-packages (from quilt)
Requirement already satisfied (use --upgrade to upgrade): paramiko>=1.10.0 in /home/oleg/.virtualenvs/openmuni/lib/python2.7/site-packages (from Fabric>=1.8.0->quilt)
Requirement already satisfied (use --upgrade to upgrade): pycrypto>=2.1,!=2.4 in /home/oleg/.virtualenvs/openmuni/lib/python2.7/site-packages (from paramiko>=1.10.0->Fabric>=1.8.0->quilt)
Requirement already satisfied (use --upgrade to upgrade): ecdsa in /home/oleg/.virtualenvs/openmuni/lib/python2.7/site-packages (from paramiko>=1.10.0->Fabric>=1.8.0->quilt)
Cleaning up...
(openmuni)oleg#oleg-Lenovo-G580:~/dev/openmuni-budgets$ pip install python-quilt
Requirement already satisfied (use --upgrade to upgrade): python-quilt in /home/oleg/.virtualenvs/openmuni/lib/python2.7/site-packages
Cleaning up...
Running:
deavtivate
and then
pip install python-quilt solved it, but that means that quilt is now global and installed outside of the virtualenv, a bit of a hack.
Related
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
In a Python package I have, in setup.py I modified the dependencies by removing the condition on the version number:
setup(
name='MyTool',
version='0.1.5',
author='myname',
author_email='myname#myname.com',
packages=['mytool'],
scripts=['bin/my_tool.py'],
url='https://pypi.python.org/pypi/mytool',
license='LICENSE.txt',
description='This is my tool.',
long_description=open('README.txt').read(),
install_requires=[
"scipy",
"numpy",
"prettytable"
],
)
I ran:
$ python setup.py sdist
$ python setup.py sdist upload
But when I run pip, it refers to the previous requirements:
$ sudo pip install MyTool
Requirement already satisfied (use --upgrade to upgrade): MyTool in /usr/local/lib/python2.7/dist-packages
Requirement already satisfied (use --upgrade to upgrade): scipy>=0.7.0 in /usr/local/lib/python2.7/dist-packages (from MyTool)
Requirement already satisfied (use --upgrade to upgrade): numpy in /usr/local/lib/python2.7/dist-packages (from MyTool)
Requirement already satisfied (use --upgrade to upgrade): prettytable>=0.7.2 in /usr/local/lib/python2.7/dist-packages (from MyTool)
Cleaning up...
What did I do wrong?
That means you have already installed package MyTool.
If you want to install the latest version (the uploaded version just now), try:
sudo pip install -U MyTool
I'm trying to set setup Python-Eve.
Python-Eve Installation Guide
I've finished these steps:
C:\Users\Ari\Desktop\rizzla>python -m pip install eve
Requirement already satisfied (use --upgrade to upgrade): eve in c:\python34\lib
\site-packages
Requirement already satisfied (use --upgrade to upgrade): cerberus<0.9,>=0.8 in
c:\python34\lib\site-packages (from eve)
Requirement already satisfied (use --upgrade to upgrade): events<0.3,>=0.2.1 in
c:\python34\lib\site-packages (from eve)
Requirement already satisfied (use --upgrade to upgrade): simplejson<4.0,>=3.3.0
in c:\python34\lib\site-packages (from eve)
Requirement already satisfied (use --upgrade to upgrade): werkzeug<0.10,>=0.9.4
in c:\python34\lib\site-packages (from eve)
Requirement already satisfied (use --upgrade to upgrade): markupsafe<1.0,>=0.23
in c:\python34\lib\site-packages (from eve)
Requirement already satisfied (use --upgrade to upgrade): jinja2<3.0,>=2.7.2 in
c:\python34\lib\site-packages (from eve)
Requirement already satisfied (use --upgrade to upgrade): itsdangerous<1.0,>=0.2
2 in c:\python34\lib\site-packages (from eve)
Requirement already satisfied (use --upgrade to upgrade): flask<0.11,>=0.10.1 in
c:\python34\lib\site-packages (from eve)
Requirement already satisfied (use --upgrade to upgrade): pymongo<3.0,>=2.7.1 in
c:\python34\lib\site-packages (from eve)
Requirement already satisfied (use --upgrade to upgrade): flask- pymongo<0.4,>=0.
3.0 in c:\python34\lib\site-packages (from eve)
But when trying to run the code on Quick Start Guide I get
Traceback (most recent call last):
File "run.py", line 1, in <module>
from eve import Eve
File "C:\Users\Ari\Desktop\rizzla\eve.py", line 1, in <module>
from eve import Eve
ImportError: cannot import name 'Eve'
My code is here:
from eve import Eve
app = Eve()
if __name__ == '__main__':
app.run()
Your script name is eve; same as the module you want to import. Rename your script name to other name to prevent the conflict.
Remove eve.pyc in the directory if there is.
The following are output of trace when I have tried to install ldap with pip.
[root#reports-hammer-local tests]# pip install simpleldap
Requirement already satisfied (use --upgrade to upgrade): simpleldap in /usr/local/lib/python2.7/site-packages
Requirement already satisfied (use --upgrade to upgrade): python-ldap in /usr/local/lib/python2.7/site-packages (from simpleldap)
Requirement already satisfied (use --upgrade to upgrade): setuptools in /usr/local/lib/python2.7/site-packages/setuptools-1.4.2-py2.7.egg (from python-ldap->simpleldap)
Cleaning up...
[root#reports-hammer-local tests]# python tests.py
Traceback (most recent call last):
File "tests.py", line 7, in `
import simpleldap`
ImportError: No module named simpleldap
I can't run the test because of missing module issues. can you please hep me to fix this.
I've recently transitioned to an Anaconda environment on RHEL6, but I need a module not in the conda repository. So I install it with pip:
(gt_keys)[user#server gtkey]$ which pip
/srv/home/shared/anaconda/envs/gt_keys/bin/pip
(gt_keys)[user#server gtkey]$ pip install owslib
Downloading/unpacking owslib
Downloading OWSLib-0.8.3.tar.gz (97kB): 97kB downloaded
Running setup.py egg_info for package owslib
Requirement already satisfied (use --upgrade to upgrade): python-dateutil>=1.5 in /srv/home/shared/anaconda/lib/python2.7/site-packages (from owslib)
Requirement already satisfied (use --upgrade to upgrade): pytz in /srv/home/shared/anaconda/lib/python2.7/site-packages (from owslib)
Requirement already satisfied (use --upgrade to upgrade): pytest in /srv/home/shared/anaconda/lib/python2.7/site-packages (from owslib)
Requirement already satisfied (use --upgrade to upgrade): pytest-cov in /srv/home/shared/anaconda/lib/python2.7/site-packages (from owslib)
Requirement already satisfied (use --upgrade to upgrade): PIL in /srv/home/shared/anaconda/lib/python2.7/site-packages/PIL (from owslib)
Requirement already satisfied (use --upgrade to upgrade): cov-core>=1.6 in /srv/home/shared/anaconda/lib/python2.7/site-packages (from pytest-cov->owslib)
Requirement already satisfied (use --upgrade to upgrade): coverage>=3.4 in /srv/home/shared/anaconda/lib/python2.7/site-packages (from cov-core>=1.6->pytest-cov->owslib)
Installing collected packages: owslib
Running setup.py install for owslib
Successfully installed owslib
Cleaning up...
But it doesn't work in my environment:
(gt_keys)[user#server gtkey]$ which python
/srv/home/shared/anaconda/envs/gt_keys/bin/python
(gt_keys)[user#server gtkey]$ python -c 'import owslib'
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named owslib
owslib only made it to the base Ananaconda install:
sh-4.1$ which python
/srv/home/shared/anaconda/bin/python
sh-4.1$ python -c 'import owslib'
What am I doing wrong?
I don't know why, but this time it worked:
pip install owslib --allow-external PIL --allow-unverified PIL
I would be interested, still, in any comments on my process. Something strange was happening that was resolved when I reconnected to the server this morning after failing last night. Must be something with the path.