Unable to install MOSAIC on windows or Mac OS - python

I am trying to download and run some software I need to look at for my bachelor assignment.
However, the instructions on the website (https://pages.nist.gov/mosaic/html/doc/InstallWindows.html#id19) make me use my terminal. I have no experience using the terminal and am having issues.
The instructions made me install anaconda_ .
When installing the dependencies I found that even after adding the installation source (conda-forge) some dependencies are not found. I tried to install from a downloaded source distribution.
I put the unpacked zip in my MOSAIC folder but I am now getting an error when running the line:
$ python setup.py mosaic_deps
This results in:
traceback (most recent call last):
File "setup.py", line 2, in <module>
I have no idea how to fix this problem. If someone could have a look at it and explain that would really help me out.

Related

Biopython - very basic questions about how to install

I'm trying to install Biopython but I've had some trouble. I've looked for an answer on the README, PDF manual and in other people's questions but they focus on more advanced problems while I'm still stuck at level 0.
I am a complete n00b so please, bear with me.
I have downloaded python3 and installed it on my Mac.
python3 --version
Python 3.7.3
pip3 --version
pip 19.2.3 from /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pip (python 3.8)
I have then gone and downloaded biopython-1.77.tar.gz and uncompressed on my desktop.
From the biopython-1.77 folder, I did
python3 setup.py build
which I think worked OK (things moved on the screen). It was followed by
sudo python3 setup.py install
Likewise, I think this too worked.
Now, to test if the installation worked and if I'm ready to use Biopython I tried
python3
[>>>import Bio
but I get the error:
/Users/user/Desktop/biopython-1.77/Bio/__init__.py:126: BiopythonWarning: You may be importing Biopython from inside the source tree. This is bad practice and might lead to downstream issues. In particular, you might encounter ImportErrors due to missing compiled C extensions. We recommend that you try running your code from outside the source tree. If you are outside the source tree then you have a setup.py file in an unexpected directory: /Users/user/Desktop/biopython-1.77
BiopythonWarning,
I then tried to do this from elsewhere and I changed directory to the Python3.8 folder and tried
python3
[>>> import Bio
but I get the error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'Bio'
I've also tried to specify the path to Bio within biopython-1.77 but I get a SyntaxError: invalid syntax on the first "/" within the path.
Any help to install Biopython will be much appreciated.

Trouble installing Adafruit's DHT11 Python library

I followed these instructions to install the Adafruit DHT11 library (https://github.com/adafruit/Adafruit_Python_DHT):
git clone https://github.com/adafruit/Adafruit_Python_DHT.git
cd Adafruit_Python_DHT
sudo apt-get install build-essential python-dev
sudo python setup.py install
And I found the library installed under /home/pi (I'm working with a Raspberry Pi 3). The file I want to fun is in /home/pi/Desktop so I move the library into that directory. However, I still can't run my python file properly. This is the error I'm getting:
Traceback (most recent call last):
File "sensorRead.py", line 4, in <module>
import Adafruit_DHT
ImportError: No module named 'Adafruit_DHT'
How do I get rid of this error? And where should I move my file (or the library) so the library will work? Thank you.
I fixed it. I moved my file into Adafruit_Python_DHT/examples and ran it with the python sensorRead.py command. To be honest, I don't know why it works when I put it into examples, but it does.

Installing PIP Python 3.6.3 Ubuntu 16.04 Zlib Not Available, But It's Installed

I'm trying to follow this tutorial on installing Python 3.6.3 and PIP with virtual environments, but when I get to sudo python3.6 get-pip.py I get the error
Traceback (most recent call last):
File "get-pip.py", line 20061, in <module>
main()
File "get-pip.py", line 194, in main
bootstrap(tmpdir=tmpdir)
File "get-pip.py", line 82, in bootstrap
import pip
zipimport.ZipImportError: can't decompress data; zlib not available
but I have zlib1g-dev installed and don't know how to fix this problem. I've googled a lot and tried reinstalling, but haven't had any success.
Sorry to start a new question, but I did not have enough Karma to comment on the other one. Any help would be greatly appreciated.
Update: I ended up installing everything from source instead of using any packages and it seems to be working. I was not able to solve the problem, but found an alternative way to get things working.
For pip to work, Python needs to be linked to the zlib library when Python itself is installed. It appears that either zlib was not installed when you installed Python, or at least that the Python installer couldn't locate it. To help it along, you may issue the following before installing Python. In bash syntax,
zlib_lib="/usr/lib32"
zlib_inc="/usr/include"
export CPPFLAGS="-I${zlib_inc} ${CPPFLAGS}"
export LD_LIBRARY_PATH="${zlib_lib}:${LD_LIBRARY_PATH}"
export LDFLAGS="-L${zlib_lib} -Wl,-rpath=${zlib_lib} ${LDFLAGS}"
Here I've assumed that zlib is installed under /usr/lib32 and /usr/include/. To check this, look for the libz.so.1 file in the "lib" directory and the zlib.h file in the "inc" directory. If you find them somewhere else, simply change zlib_lib and zlib_inc accordingly.
IF you have different versions of Python installed it is likely the install is on another version. for example. I have pyperclip in 3.6.3 32bit version, but I an not access it in 3.6.3 64bit or 3.7.2dev.

Not able to install the python-module numpy

After hours of trying I'm still not able to install numpy. I READ LOTS OF HINTS, ANSWERS USW. BUT IT DOESN'T HELP.
Furthermore I have windows 7, 32 bit, Python 27.
What I did:
download numpy-1.10.2.zip:
http://sourceforge.net/projects/numpy/files/
unzip it
start the windows command prompt and input:
cd C:\Users\myname\Desktop\numpy-1.10.2
now it appears:
C:\Users\myname\Desktop\numpy-1.10.2>
I input:
python setup.py install
and there appears an error:
Running from numpy source directory.
Traceback (most recent call last):
File "setup.py", line 263, in <module>
setup_package()
File "setup.py", line 246, in setup_pa
import setuptools
ImportError: No module named setuptools
I hope somebody can help me or even better IS THERE NOT EASIER WAY TO INSTALL NUMPY OR OTHER MODULES??
Building numpy from source on windows is non-trivial. Best use official binaries (http://sourceforge.net/projects/numpy/files/NumPy/1.10.2/) or Gohlke binaries (http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy) or a distribution like Anaconda or Canopy or WinPython.
You need to install the setuptools package as well. See here.
A more easy way to install python packages is using pip, which resolves package dependencies automatically. See here. Pip should be included in your python installation if you use a recent version.
You should succeed by calling pip install numpy.

ImportError for perl in python terminal

I have Perl v5.10.1 installed on my CentOS 6 linux box. However, when I try to import perl in the python terminal, I get an ImportError.
>>>import perl
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named perl
I had a similar issue earlier with Gnuplot, but that was resolved by simply installing another package.
ImportError for Gnuplot in python terminal
I cannot figure out what is wrong.
Please help. Thanks.
First you have to download pyperl package and then install it.
Download link http://www.felix-schwarz.name/files/opensource/pyperl/
Download the package
unzip it if it is zipped
open cmd and cd into the directory containing setup.py
type in python setup.py install

Categories

Resources