packaging biom for FreeBSD - python

I'm working on packaging biom (2.1.5) for FreeBSD.
Based on the documentation, I initially had it depending on pynumpy and h5py, but digging I think it should also depend on:
py27-click-6.6
py27-future-0.14.3
py27-pyqi-0.2.0
py27-scipy-0.16.1.
Now I'm at the point where running biom gives the errors below. Do you have
suggestions for debugging? I'm not a python developer, so please be gentle.
Traceback (most recent call last):
File "/usr/local/bin/biom", line 9, in <module>
load_entry_point('biom-format==2.1.5', 'console_scripts', 'biom')()
File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 547, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2720, in load_entry_point
return ep.load()
File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2380, in load
return self.resolve()
File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2386, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/usr/local/lib/python2.7/site-packages/biom/__init__.py", line 51, in <module>
from .table import Table
File "/usr/local/lib/python2.7/site-packages/biom/table.py", line 188, in <module>
from future.utils import string_types
ImportError: cannot import name string_types

In future 0.14.3, there is no string_types in future.utils. (Although it is mentioned in the documentation). Look at the 0.14.x branch of the github repo for future.
At the time of writing the current version of the future module is 0.15.2. So that port needs to be updated before biom will work. I'd suggest to contact the maintainer of that port.

Related

'module not found error' -pbixrefresher utility

I properly installed pbixrefresher from https://github.com/dubravcik/pbixrefresher-python
I get modulenotfound with pbixrefresher.pbixrefresher. Pbixrefresher.exe is installed. I've tried to troubleshoot and research a solution but cannot figure this out. Any help is appreciated!!
Traceback (most recent call last):
File "C:\Users\xxxxxx\AppData\Local\Programs\Python\Python38-32\Scripts\pbixrefresher-script.py", line 11, in <module>
load_entry_point('pbixrefresher==0.1.8', 'console_scripts', 'pbixrefresher')()
File "C:\Users\xxxxxx\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pkg_resources\__init__.py", line 490, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "C:\Users\xxxxxx\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pkg_resources\__init__.py", line 2862, in load_entry_point
return ep.load()
File "C:\Users\xxxxxx\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pkg_resources\__init__.py", line 2462, in load
return self.resolve()
File "C:\Users\xxxxxx\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pkg_resources\__init__.py", line 2468, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
ModuleNotFoundError: No module named 'pbixrefresher.pbixrefresher'
New versions of module(since November 2019) doesn't work correctly. Try to use version older November 2019 using a suitable python version, it should work.

Docker-Cloud CLI Error on Windows

I'm trying to install the Docker-Cloud CLI with pip, and it installs successfully. However, when I check the version (as suggested by the site), I get the error in the paste below. I'm running Windows 10 and Python 3.6.
Traceback (most recent call last):
File "C:\Users\aglas\AppData\Local\Programs\Python\Python36-32\Scripts\docker-cloud-script.py", line 11, in <module>
load_entry_point('docker-cloud==1.0.7', 'console_scripts', 'docker-cloud')()
File "c:\users\aglas\appdata\local\programs\python\python36-32\lib\site-packages\pkg_resources\__init__.py", line 565, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "c:\users\aglas\appdata\local\programs\python\python36-32\lib\site-packages\pkg_resources\__init__.py", line 2631, in load_entry_point
return ep.load()
File "c:\users\aglas\appdata\local\programs\python\python36-32\lib\site-packages\pkg_resources\__init__.py", line 2291, in load
return self.resolve()
File "c:\users\aglas\appdata\local\programs\python\python36-32\lib\site-packages\pkg_resources\__init__.py", line 2297, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "c:\users\aglas\appdata\local\programs\python\python36-32\lib\site-packages\dockercloudcli\cli.py", line 10, in <module>
from dockercloudcli import commands
File "c:\users\aglas\appdata\local\programs\python\python36-32\lib\site-packages\dockercloudcli\commands.py", line 15, in <module>
from dockercloudcli import utils
File "c:\users\aglas\appdata\local\programs\python\python36-32\lib\site-packages\dockercloudcli\utils.py", line 16, in <module>
from exceptions import BadParameter, StreamOutputError
ModuleNotFoundError: No module named 'exceptions'

Getting error while installing scrapy in ubuntu

I want to install scrapy for my project in ubunu. i used pip to install scrapy but i always getting this error while installing.
Traceback (most recent call last):
File "/usr/bin/pip", line 9, in <module>
load_entry_point('pip==1.5.6', 'console_scripts', 'pip')()
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 558, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2682, in load_entry_point
return ep.load()
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2355, in load
return self.resolve()
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2361, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/usr/lib/python2.7/dist-packages/pip/__init__.py", line 74, in <module>
from pip.vcs import git, mercurial, subversion, bazaar # noqa
File "/usr/lib/python2.7/dist-packages/pip/vcs/mercurial.py", line 9, in <module>
from pip.download import path_to_url
File "/usr/lib/python2.7/dist-packages/pip/download.py", line 22, in <module>
import requests, six
File "/usr/lib/python2.7/dist-packages/requests/__init__.py", line 53, in <module>
from .packages.urllib3.contrib import pyopenssl
File "/usr/lib/python2.7/dist-packages/urllib3/contrib/pyopenssl.py", line 53, in <module>
import OpenSSL.SSL
File "/home/karthick/.local/lib/python2.7/site-packages/OpenSSL/__init__.py", line 8, in <module>
from OpenSSL import rand, crypto, SSL
File "/home/karthick/.local/lib/python2.7/site-packages/OpenSSL/SSL.py", line 112, in <module>
if _lib.Cryptography_HAS_SSL_ST:
AttributeError: 'module' object has no attribute 'Cryptography_HAS_SSL_ST'
so how do i get rid of this error and install scrapy
This happened to me (although with Anaconda, not pip).
I tracked it down to updating pyopenssl from 16.0 to 16.2.
My solution was to first reinstall Anaconda (which reverted pyopenssl to 16.0). (You may not need to do this.)
After that, I just ran
sudo apt install python3-openssl
After doing this, my problem seemed to be corrected.
I think you should update your pip first, then try again.
I see pip==1.5.6, omg, it's older than the moon

Python trouble with nose

I am having some trouble with LPTHW on Exercise 46 in which we create a skeleton directory for a future project and install pip among other things. I have having a problem with nosetests. Whenever I run it I get a problem. I have everything set up as he wants me to.
Here is the problem (I am running Ubuntu 12.04)
Traceback (most recent call last):
File "/usr/local/bin/nosetests", line 9, in <module>
load_entry_point('nose==1.3.0', 'console_scripts', 'nosetests')()
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 337, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2279, in load_entry_point
return ep.load()
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1989, in load
entry = __import__(self.module_name, globals(),globals(), ['__name__'])
File "/usr/local/lib/python2.7/dist-packages/nose/__init__.py", line 1, in <module>
from nose.core import collector, main, run, run_exit, runmodule
File "/usr/local/lib/python2.7/dist-packages/nose/core.py", line 11, in <module>
from nose.config import Config, all_config_files
File "/usr/local/lib/python2.7/dist-packages/nose/config.py", line 9, in <module>
from nose.plugins.manager import NoPlugins
File "/usr/local/lib/python2.7/dist-packages/nose/plugins/__init__.py", line 184, in <module>
from nose.plugins.base import Plugin
EOFError: EOF read where object expected
I figured it out. When I installed Nose the first time, I didn't 'sudo' it and it never installed. And I cicked out of terminal before I saw it. At least. that's what I thought happened. I deleted nose and reinstalled it and now it works.
Suddenly get the same error. I fix this by removing --with-id from the argument.
I used it previously.
It works now.

vtk python can't be detected

VTK was working fine until I updated it. I made sure to turn on all the python linking etc.
Now, when I run mayavi2, I receive:
dustin#dustin:~$ mayavi2
Traceback (most recent call last):
File "/usr/local/bin/mayavi2", line 9, in <module>
load_entry_point('mayavi==4.3.0', 'console_scripts', 'mayavi2')()
File "/usr/local/lib/python2.7/dist-packages/pkg_resources.py", line 343, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/local/lib/python2.7/dist-packages/pkg_resources.py", line 2309, in load_entry_point
return ep.load()
File "/usr/local/lib/python2.7/dist-packages/pkg_resources.py", line 2015, in load
entry = __import__(self.module_name, globals(),globals(), ['__name__'])
File "/usr/local/lib/python2.7/dist-packages/mayavi/scripts/mayavi2.py", line 457, in <module>
raise ImportError(msg)
ImportError: libvtkCommonPythonD.so.5.10: cannot open shared object file: No such file or directory
________________________________________________________________________________
Do you have vtk installed properly?
How can I fix this?
I found the file libvtkCommonPythonD.so.5.10 and added it to added to LD Library Path
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/vtk-5.10

Categories

Resources