Installing Biopython in new installation of IPython/Python2.7 [closed] - python-2.7

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I have Python2.7 installed and was having some issues with installing scipy. Through some Googling, I figured from a thread here (installing scipy on mac 10.6.8) that it is better to install scipy using MacPorts and IPython.
IPython looked cool and I wanted to try it. So far, too good - I feel great and elated that I could do all this by myself.
Now, I had Biopython installed with my Python2.7 (this version of Python2.7 was installed in a folder /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7).
In my overzealousness to try Ipython, I (think) I re-installed Python2.7, along with IPython, scipy, etc in a new directory /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7.
However, now I don't have Biopython in the new installation of Python2.7. So do I have to re-install Biopython in the new installation of Python2.7?
And if yes, how do I direct the installation to this folder?
Would it be like the following (say I have biopython-1.61.tar.gz in the folder Downloads):
cd Downloads
tar -xzvpf biopython-1.61.tar.gz
cd biopython-1.61
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/python setup.py install
I would like to hear if I am of-base here. Do not want to try and screw-up what I have so far!
I have Mac OS X V10.6.8.

The following worked for me (from MacPorts Python installation on Mac):
Make the Python2.7/iPython2.7 installation I performed using MacPorts the default
$ sudo port select --set python python27
$ sudo port select --set ipython ipython27
Check if Biopython is available through MacPorts
$ port search biopython
Install Biopython
$ sudo port install py27-biopython # install Biopython

One of the toughest things for someone new to Python is figuring out the installation of all of the packages. It's a work in progress that is actively being discussed by the Python community.
I would recommend going with a commercial distribution that gives you everything you want that just works. This way you can start learning to work with Python instead of having to figure out how to get everything working.
I would recommend:
https://www.enthought.com/products/epd/free/

Related

Yum is not working in my Amazon Linux 1 instance [closed]

Closed. This question is not about programming or software development. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 4 days ago.
Improve this question
This is in an EC2 instance with Amazon Linux 1
I'm trying to uninstall php-5.6 due to security concerns, but when I run: yum remove php-5.6 I obtaine:
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:
/usr/lib64/python2.7/dist-packages/pycurl.so: undefined symbol: CRYPTO_num_locks
Please install a package which provides this module, or
verify that the module is installed correctly.
It's possible that the above module doesn't match the
current version of Python, which is:
2.7.18 (default, Feb 18 2021, 06:10:44)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-28)]
If you cannot solve this problem yourself, please go to
the yum faq at:
http://yum.baseurl.org/wiki/Faq
I remember that some time ago I had to update curl libraries using a package that was not included in the repos. Maybe that's related to this issue.
The thing is that I donĀ“t know how to deal with this issue. How could I fix yum or uninstall php-5.6 manually at least.... It would be nice to know if I have installed packages that depend on php-5.6, but that's another yum command that does not work.
I tried to install pycurl using pip, but that does not work:
# pip install pycurl
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Requirement already satisfied: pycurl in /usr/lib64/python2.7/dist-packages (7.19.0)
# pip uninstall pycurl
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Found existing installation: pycurl 7.19.0
ERROR: Cannot uninstall 'pycurl'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
I think I could try to install a RPM package, but I'm not sure about what version should I use.

Cannot install "psycopg2" on Windows 10 with Python 3.8

Yesterday I uninstalled python 3.7 version by mistake. Then I install python again (this time 3.8 version) and again set up my environment. But I could not start my Django project which has Postgres connection. Actually I cannot install "psycopg2" in my environment. I searched for hours and implement every solutions I get from online but it does not work. Let me tell you what I did so far.
First it said to add Postgres in my PATH so I added C:\Program Files\PostgreSQL\12\bin\ in my PATH.
A new problem then arise with a huge ERROR report with 2 vital Error.
ERROR: Failed building wheel for psycopg2
..........................
Running setup.py install for psycopg2 ... error
I try to upgrade wheel but it says,
Requirement already up-to-date
http://initd.org/psycopg/docs/install.html#install-from-source
I learned from this site that psycopg2 requires python2 version. So I installed python 2.7 also.
I reinstalled PostgreSQL but it does not work.
I deleted my virtual environment and create again but it does not work.
Some says they solve this problem by running pip install psycopg2-binary But it does not work for me.
Please help me to get rid of this. I stuck for hours.
When you asked this question, Python 3.8 had been released very recently so there were not any wheels for Python 3.8 yet.
At the time, my suggestion was to install Python 3.7.X and install the binary wheel with:
pip install psycopg2-binary
Since then, binary wheels have been released for Python 3.8, so the above command should work with Python 3.8.X as well.
I wouldn't try to build from source on Windows if it can be avoided.
Finally, you misunderstood the section of the docs about Python 2. You only need Python 2.7 if you are running Python 2. For Python 3, which you should be using for all new projects, it currently supports Python 3.4 to 3.8.
use:
sudo apt install python3-dev libpq-dev
then try doing:
pip3 install psycopg2
Hope it works for you!!
This problem mainly occurs due to this -- " error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/"
Now to install psycopg2, first you need to install visual studio from Microsoft - https://visualstudio.microsoft.com/visual-cpp-build-tools/
now you need to install the c++ desktop development tool with all its default components selected.
After successful visual studio c++ desktop development kit installation, you can now install psycopg2 successfully in your machine.

In Windows 10, pip import error: cannot import name main after installing pipenv

I am trying to use pipenv as well as pip and having some issues. I installed pipenv using pip. I installed pipenv using pip. Then I went back and tried to run pip -v and got the following: ImportError: cannot import name main. I have seen this question answered for Linux and Mac, but I cannot use sudo or which commands; I am on Windows 10 using the CMD console. In my scripts folder, I see pip, pip2.7, and pip2. I cannot remember which one was my system pip. I know I need to maybe uninstall and reinstall (I have already tried to upgrade, but of course, without pip running you can't upgrade pip). I don't want to make more of a mess, so I wanted to ask how to resolve this in the CMD console on Windows.
Apparently, when I installed pipenv, it changed the system pip version that I was previously using. For some reason, all of the answers I found were using Linux or Mac, but here is how I resolved it. Simply open your command prompt and type:
$python -m pip uninstall pip
Then, test that you still have your old version installed by typing:
$pip -V
This showed me that I had gone from using pip version 18 back to using version 8.1.1. You should then be able to proceed to other tasks using pip.

trouble installing biopython

I'm following the directions from the Biopython website (http://biopython.org/wiki/Download) but I keep getting an error during installation. I have python 2.7 installed on my laptop.
python2.7 -m pip install biopython
I just get the error:
No module named pip
I looked up this error and tried something stack overflow suggested:
sudo apt-get install python-pip
But I just got another error:
sudo: apt-get: command not found
As long as you have Python 2.7.9 onwards this should automatically install pip for you:
python -m ensurepip
It would be useful to know what Operating System you have to help improve the instructions here.
Many dependency issues are solved here at Annaconda where you fetch python, lots of nice libs, etc.. Install it accordingly to your platform.. windows, Linux or Mac OS.
Biopython is installed by Annaconda by default (including matplotlib and other dependencies)... if I recall correctly. Otherwise its from commandline conda search biopython and or conda install pip. And then commandline pip install biopython.

Does anybody know of a good all-in-one install to get django up and running on OS X [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 9 years ago.
Improve this question
i.e. something that would install django + mySQL + python-mysql in one package
hoping to make it easy for a friend to get up and running
For the beginner I recommend:
1) MAMP for MySQL + phpMyAdmin
2) Python is pre-installed
3)
easy_install pip
4) (yes, do it manually, it makes sense)
pip install mysql-python django
Use a third-party open source package manager. It can be very difficult to pick and choose components from different sources and get them all to work together. The major package managers available for OS X are Homebrew, MacPorts, and Fink. I prefer MacPorts. Follow the instructions here to download and install the MacPorts base package. Then make sure your shell path includes /opt/local/bin. Then type:
sudo port install py27-django py27-mysql
That will install compatible versions of Python, MySQL client libraries, the Python MySQL database adapter, and Django and will allow you to easily keep everything up-to-date as well.
Install PIP (it will be useful in the future for every python or django package you'll need while developing your project.)
Then, open terminal and write pip install Django. Pip will install django on your machine, solving all dependencies.
Then, after installing mySQL, you can use pip for installing python-mysql.