I am trying to install pysam and pybedtools modules on python 3.4. But I got an Error:
Collecting pysam
Using cached pysam-0.9.0.tar.gz
Complete output from command python setup.py egg_info:
'.' is not recognized as an internal or external command,
operable program or batch file.
# pysam: htslib mode is shared
# pysam: htslib configure options: None
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\ikirov.CLO\AppData\Local\Temp\pip-build-_me_xeme\pysam\setup.py", line 212, in <module>
sys.abiflags)]
AttributeError: 'module' object has no attribute 'abiflags'
Could you please help me with it?
Hi I got the same error last year during one of my class.
As I know back then, pysam simply won't work with python3 + windows environment.
See this: https://github.com/pysam-developers/pysam/issues/353 looks like it is still unsolved now.
For my homework, I just used this http://bow.codeplex.com/
And my suggestion, just try to use linux or get a python2. Yes I know the scientific field is the slowest for the 2->3 transition. It sucks.
Related
i've just installed base65536 in python, found Here
As a test to see if it works, i've made this script here:
import base65536
a = base65536.encode("Hello World")
print a
i'm using python2.7. When i run it, i get this error:
Traceback (most recent call last):
File "test.py", line 3, in <module>
a = base65536.encode("Hello World")
File "C:\Python27\lib\site-packages\base65536\core.py", line 118, in encode
stream.write(unichr(code_point))
ValueError: unichr() arg not in range(0x10000) (narrow Python build)
Any idea what to do here?
Python2 has two builds: one "narrow" and one "wide", depending on Unicode support. It looks like that library doesn't support the "narrow" build. You should install a "wide" build or hope the library gets updated. It looks like someone filed an issue on it: https://github.com/Parkayun/base65536/issues/4
Or you can use a recent version of Python3, which doesn't have this problem.
I downloaded this library: https://github.com/bufferapp/buffer-python
Ran the setup.py install, and then tried to run some code using the newly installed library.
What happens though is I get this error:
Traceback (most recent call last):
File "twitter-quote-bot.py", line 14, in <module>
from buffpy.managers.profiles import Profiles
ImportError: No module named managers.profiles
The only way I've found to fix it is to move my program (twitter-quote-bot) into the downloaded folder from Buffer and run it there.
Did I do something wrong in the installation? It seems like I should be able to do these imports globally.
Thanks in advance!
I'm using Python on my Centos machine and when I try to run my program I have this error displayed :
Running setup.py egg_info for package pyepr
Traceback (most recent call last):
File "<string>", line 16, in <module>
File "/tmp/pip-build-root/pyepr/setup.py", line 68, in <module>
print('using EPR C API sources at "{}"'.format(eprsrcdir))
ValueError: zero length field name in format
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 16, in <module>
File "/tmp/pip-build-root/pyepr/setup.py", line 68, in <module>
print('using EPR C API sources at "{}"'.format(eprsrcdir))
ValueError: zero length field name in format
I have already checked the other questions about this subject and I already installed Python 2.7.6 and set it as my default configuration as shown below....
$ python -V
Python 2.7.6
Something must have gone wrong, but I don't know what.
Anybody has an idea?
Thanks
That error can only be raised if you run that code with Python 2.6 or older. In those versions, you must explicitly number the format fields for str.format (starting at 0):
print('using EPR C API sources at "{0}"'.format(eprsrcdir))
Of course, this is only a temporary fix. It would be better to investigate why your code is not being run with Python 2.7 in the first place and then fix that instead.
If you run an install using sudo, you are going to end up using the sudo path's Python interpreter. Not sure if you are using sudo or not for installing, but there is a good chance you are.
I am trying to set up sleepy.mongoose, a mongoDB REST interface using the instructions here.
I am using windows 8, :( ...anyway... I have python 3.3.2 installed and it is accessible from the cmd prompt. I also have pymongo installed, when i enter help('modules') to python, pymongo is on the list of available modules!
But when I try to run python httpd.py from the sleepy.mongoose dir (thanks karthikr), I get an error:
C:\Users\Brook\Desktop\sleepy.mongoose>python httpd.py
Traceback (most recent call last):
File "httpd.py", line 1, in <module>
sleepymongoose/httpd.py
NameError: name 'sleepymongoose' is not defined
Now I tried actually cding into the proper dir, but I get this other error:
C:\Users\Brook\Desktop\sleepy.mongoose\sleepymongoose>python httpd.py
File "httpd.py", line 221
print "\n================================="
^
SyntaxError: invalid syntax
I have had the same problem with Python 2.7 on Windows. Considering 'httpd.py' wich contains only:
sleepymongoose/httpd.py
You need this command line to start it:
python sleepymongoose/httpd.py
You are using python 3 to run python 2 code. The syntax for print amongst other things has changed. Use Python 2 or a server which supports python 3.
I'm trying to port)cwiid from python 2.7 to 3.2.
It uses a lot of deprecated stuff so I have to change a lot of stuff in order to have it work with 3.2. Right now I'm stuck because of a load error. With a python 3.2 environment and the library installed to the package repo I do:
prompt: echo "import cwiid" | python -
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: dynamic module does not define init function (PyInit_cwiid)
Besides blind searching in the source code, where does python expect the PyInit_cwiid method?
In the source code for example there is the py_plugin.c which contains a py_init method.