Comments (9)
I assume python2.7 -c 'import pysam'
is successful on your system?
from pyvcf.
Ooh, sorry about that!
What happens if you 'pip install pyvcf'? Do you get the same error?
The only obvious thing is that I do a try/import
pysam/except/pysam=None. If pysam is in some semi installed state,
this could cause problems.
Can you try installing pysam and then rerunning python setup.py
develop/install. I would guess that would be a workaround.
Given the mess that is python packaging, a 'python setup install'
could be doing several things. Which setup function are you importing
and running?
On Wed, Mar 14, 2012 at 2:31 AM, Aaron Quinlan
[email protected]
wrote:
This is likely owing to my naivete, but I am working on another tool that depends upon PyVcf. As such, in my
setup.py
I have:install_requires=['numpy', 'pyparsing', 'pysam', 'pyvcf>=0.4.0'],
When running setup.py develop/install, this causes the script to search PyPI for the latest version of PyPI. It succeeds in finding it, but when trying to install it, I get the following error. I am really, really new to setuptools, so I don't have many ideas here, but it looks like there is a problem compiling the pysam or tabix Extension module. Any ideas?
Processing dependencies for pop==0.1.0
Searching for pyvcf>=0.4.0
Reading http://pypi.python.org/simple/pyvcf/
Reading https://github.com/jamescasbon/PyVCF
Best match: PyVCF 0.4.0
Downloading http://pypi.python.org/packages/source/P/PyVCF/PyVCF-0.4.0.tar.gz#md5=165224e91a38f5a6c0fa3d63b8258b58
Processing PyVCF-0.4.0.tar.gz
Running PyVCF-0.4.0/setup.py -q bdist_egg --dist-dir /var/folders/tO/tOq24FDAF-WH1NXQLRXlhk+++TM/-Tmp-/easy_install-kE7hJH/PyVCF-0.4.0/egg-dist-tmp-1zQvoE
Traceback (most recent call last):
File "setup.py", line 45, in
'Topic :: Scientific/Engineering :: Bio-Informatics']
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 152, in setup
dist.run_commands()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "build/bdist.linux-i686/egg/setuptools/command/develop.py", line 27, in run
File "build/bdist.linux-i686/egg/setuptools/command/develop.py", line 102, in install_for_development
File "build/bdist.linux-i686/egg/setuptools/command/easy_install.py", line 519, in process_distribution
File "build/bdist.linux-i686/egg/pkg_resources.py", line 563, in resolve
File "build/bdist.linux-i686/egg/pkg_resources.py", line 799, in best_match
File "build/bdist.linux-i686/egg/pkg_resources.py", line 811, in obtain
File "build/bdist.linux-i686/egg/setuptools/command/easy_install.py", line 446, in easy_install
File "build/bdist.linux-i686/egg/setuptools/command/easy_install.py", line 476, in install_item
File "build/bdist.linux-i686/egg/setuptools/command/easy_install.py", line 655, in install_eggs
File "build/bdist.linux-i686/egg/setuptools/command/easy_install.py", line 930, in build_and_install
File "build/bdist.linux-i686/egg/setuptools/command/easy_install.py", line 919, in run_setup
File "build/bdist.linux-i686/egg/setuptools/sandbox.py", line 62, in run_setup
File "build/bdist.linux-i686/egg/setuptools/sandbox.py", line 105, in run
File "build/bdist.linux-i686/egg/setuptools/sandbox.py", line 64, in
File "setup.py", line 12, in
m.Extension.dict = m._Extension.dict
File "/var/folders/tO/tOq24FDAF-WH1NXQLRXlhk+++TM/-Tmp-/easy_install-kE7hJH/PyVCF-0.4.0/vcf/init.py", line 166, in
File "/var/folders/tO/tOq24FDAF-WH1NXQLRXlhk+++TM/-Tmp-/easy_install-kE7hJH/PyVCF-0.4.0/vcf/parser.py", line 10, in
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pysam-0.6-py2.7-macosx-10.6-intel.egg/pysam/init.py", line 1, in
from csamtools import *
File "csamtools.pxd", line 60, in init csamtools (pysam/csamtools.c:32571)
TypeError: builtin.file is not a type object
Reply to this email directly or view it on GitHub:
#32
James Casbon
Population Genetics - http://www.populationgenetics.com/
[email protected]
+44 (0)1223 497353
from pyvcf.
I already have pysam installed, so:
@martijnvermaat python2.7 -c 'import pysam'
is successful, yes.
@jamescasbon yes, pip install --upgrade pyvcf
works.
@jamescasbon I am new to this so I am just learning how messy this is. Here is my setup.py:
https://gist.github.com/2035775
Thanks for the help all!t
from pyvcf.
As an additional datapoint, I can replicate this with:
easy_install -U pyvcf
with pysam-0.6 installed on Ubuntu 11.10. pip does work cleanly.
The Biopython setup avoids doing an import to get the version, presumably for this reason, and just parses it out:
https://github.com/biopython/biopython/blob/master/setup.py#L397
from pyvcf.
Thanks, @chapmanb for the tip.
I just released 0.4.1 on pypi which avoids import during setup. Can you good people try installing that and see if it is fixed?
from pyvcf.
@jamescasbon it finds 0.4.1 just fine but I get the following error when running either develop
or build
. This might this be specific to me...
Searching for pyvcf>=0.4.1
Reading http://pypi.python.org/simple/pyvcf/
Reading https://github.com/jamescasbon/PyVCF
Best match: PyVCF 0.4.1
Downloading http://pypi.python.org/packages/source/P/PyVCF/PyVCF-0.4.1.tar.gz#md5=48cb5f4c9821d7e573f0377ae5d1c7b2
Processing PyVCF-0.4.1.tar.gz
Running PyVCF-0.4.1/setup.py -q bdist_egg --dist-dir /var/folders/tO/tOq24FDAF-WH1NXQLRXlhk+++TM/-Tmp-/easy_install-2BBNI6/PyVCF-0.4.1/egg-dist-tmp-nrk278
error: SandboxViolation: file('/tmp/ds', 'w') {}
The package setup script has attempted to modify files on your system
that are not within the EasyInstall build area, and has been aborted.
This package cannot be safely installed by EasyInstall, and may not
support alternate installation locations even if you run its setup
script by hand. Please inform the package's author and the EasyInstall
maintainers to find out if a fix or workaround is available.
from pyvcf.
I'm an idiot and left in debugging statement 0.4.2 should fix that,
just released.
Apologies all for doing this via releases, I couldn't replicate the
problem here.
On Wed, Mar 14, 2012 at 1:35 PM, Aaron Quinlan
[email protected]
wrote:
@jamescasbon it finds 0.4.1 just fine but I get the following error when running either
develop
orbuild
. This might this be specific to me...Searching for pyvcf>=0.4.1
Reading http://pypi.python.org/simple/pyvcf/
Reading https://github.com/jamescasbon/PyVCF
Best match: PyVCF 0.4.1
Downloading http://pypi.python.org/packages/source/P/PyVCF/PyVCF-0.4.1.tar.gz#md5=48cb5f4c9821d7e573f0377ae5d1c7b2
Processing PyVCF-0.4.1.tar.gz
Running PyVCF-0.4.1/setup.py -q bdist_egg --dist-dir /var/folders/tO/tOq24FDAF-WH1NXQLRXlhk+++TM/-Tmp-/easy_install-2BBNI6/PyVCF-0.4.1/egg-dist-tmp-nrk278
error: SandboxViolation: file('/tmp/ds', 'w') {}The package setup script has attempted to modify files on your system
that are not within the EasyInstall build area, and has been aborted.This package cannot be safely installed by EasyInstall, and may not
support alternate installation locations even if you run its setup
script by hand. Please inform the package's author and the EasyInstall
maintainers to find out if a fix or workaround is available.
Reply to this email directly or view it on GitHub:
#32 (comment)
James Casbon
Population Genetics - http://www.populationgenetics.com/
[email protected]
+44 (0)1223 497353
from pyvcf.
Works like a charm! Thanks for working with me on this all.
No back to fixing a list of 20-odd bugs...
from pyvcf.
James;
Awesome, thanks. 0.4.2 works cleanly for me.
from pyvcf.
Related Issues (20)
- VCF Filtration doesn't work with uncompressed, or UTF-8 HOT 1
- ValueError: could not convert string to float: 'NA' HOT 5
- Filtering REF column of VCF file
- Is the project dead ? HOT 1
- Single threaded but uses pysam, so not single threaded
- Getting an OSError when trying vcf.fetch()
- Pandas dataframe integration
- Custom section delimited by ";" and not ":" HOT 2
- vcf_filter.py python3 error with --output
- Resource warning while using the library due to file not being closed in parser.py HOT 3
- parsing converts QUAL == zero to period, inconsistent numeric type breaks downstream filtering HOT 1
- VCF reader.fetch
- install fails if setuptools >= 58 HOT 1
- Write --output HOT 1
- error in PyVCF setup command: use_2to3 is invalid HOT 10
- ===> PyVCF3 <<=== HOT 9
- Cannot use import vfc HOT 1
- FILTER line is malformed HOT 2
- import error
- AttributeError: 'MyReader' object has no attribute 'info' for vcf file
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyvcf.