Can't seem to run Anaconda on Heroku - heroku

I've followed the official guidelines from Heroku on how to set up an Anaconda buildpack from
https://elements.heroku.com/buildpacks/conda/conda-buildpack
Including copying the
environment.yml
file as is from the page, but when I test which Python am I running on, I see that I am not running on Anaconda as the tutorial suggests:
Running python on guarded-cove-86401... up, run.5833 (Free)
Python 2.7.6 (default, Oct 26 2016, 20:30:19)
[GCC 4.8.4] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Please advise

Related

Installing Jupyter Notebook upgrades my python version

I need to user Jupyter Notebook with python version 3.5.
When I create a new environment,with a specific version of python, it works properly
conda create -n newenv python=3.5
If I type pythonin the prompt, I have the proper version
C:\Users\Arthur>python
Python 3.5.6 |Anaconda, Inc.| (default, Aug 26 2018, 16:05:27) [MSC v.1900 64 bit (AMD64)] on win32
However, if I install jupyter notebook in the conda GUI, it will automatically switch my python version to the last one
(newenv) C:\Users\Arthur>python
Python 3.7.2 (default, Jan 2 2019, 17:07:39) [MSC v.1915 64 bit (AMD64)] :: Anaconda, Inc. on win32
How can I prevent this ?

How to start Spyder in macOS?

I've installed python3.6 as below but unsure how to access Spyder. Most of what I have read is unclear, i.e. saying if should already have Spyder? I have completed my set-up using Learn Python the Hard Way on a Macbook Pro.
Install instruction: Gotohttps://www.python.org/downloads/release/python-360/anddownloadthe”macOS64-bit/32- bit installer”. Install it like you would any other software.
Terminal > Python version:
Python 3.6.0 (v3.6.0:41df79263a11, Dec 22 2016, 17:23:13)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
Any help appreciated.
Steve
(Spyder maintainer here) Using Spyder is very simple, but not the way you're trying to do it.
Please remove what you've installed so far. Then simply download and install Anaconda. After that, look for an application called Anaconda Navigator with Spotlight and finally start Spyder from it.
Note: The way you're trying to install Spyder (by using pip on a Python version you downloaded from Python.org) is only recommended to very knowledgeable people because it's really hard to get all Spyder dependencies installed correctly and without problems. That's why we recommend to use Anaconda instead, which is way easier and safer.

pip install cx_Freeze-5.0.2-cp36-cp36m-win_amd64.whl to my window 10 machine

Tryng to pip install cx_Freeze using:
python -m pip install c:\Users\yosief\Downloads\cx_Freeze-5.0.2-cp36-cp36m-win_amd64.whl
on Window 10 based laptop and I end up with an error
cx_Freeze-5.0.2-cp36-cp36m-win_amd64.whl is not a supported wheel on this platform
There are several reasons why you may not be able to install cx_Freeze but luckily it is generally easy to correct.
You should just be able to install cx_Freeze with pip install cx_Freeze. No need to download the wheel.
However if you want to use the wheel file. You should know have downloaded the x64 version for Python 3.6. Your Python installation must be an x64 build and the Python version 3.6.
Check the Python version and build by opening the Python interpreter. The version will be displayed at the top as well as the build.
For example on my PC the interpreter reads:
Python 3.6.3 (v3.6.3:2c5fed8, Oct 3 2017, 17:26:49) [MSC v.1900 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
So I know the version is 3.6.3 and is 32 bit (MSC v.1900 32 bit). Take no notice of on win32 it does not give you the right windows build in some cases.
If the build or version is different from what you have downloaded then you must re download the wheel to match the Python build and version.
Then install the wheel file as you did above.

xlwings 0.6.1 Import error on Mac OS X with python 3.5

When importing xlwings 0.6.1 in Python 3.5 on a Mac, I'm getting the following error message:
Python 3.5.0 (default, Nov 8 2015, 20:38:08)
[GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.1.76)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
import xlwings
Traceback (most recent call last):
File "", line 1, in
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/xlwings/init.py", line 22, in
from . import _xlmac as xlplatform
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/xlwings/_xlmac.py", line 5, in
from appscript import app, mactypes
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/aeosa/appscript/init.py", line 8, in
from aem.findapp import ApplicationNotFoundError
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/aeosa/aem/init.py", line 5, in
import ae, kae, findapp, mactypes, aemconnect
ImportError: No module named 'ae'
Has anyone encountered this error with the recent release of xlwings 0.6.1?
Something seems to have gone wrong with the installation of the appscript package, a dependency of xlwings. Try to reinstall that. But generally speaking, I would suggest to open an issue on GitHub for these kind of questions since there is usually something very specific going on. For ease of installation, I recommend to use the Anaconda distribution.

pymssql on mac os x mountain lion 10.9.2

Recently discovered pymssql and got it working on a windows machine (python 3.4). However when I try to run the script on my mac (10.9.2), I get an error when I 'import pymssql'. Note both on the windows box and on the mac, I installed via 'pip3.4 install pymssql'. Installation concluded with no errors in both cases.
This is what I get when I try to import pymssql on the mac :
Python 3.4.0 (v3.4.0:04f714765c13, Mar 15 2014, 23:02:41)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
import pymssql
Traceback (most recent call last):
File "", line 1, in
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pymssql.so, 2): Library not loaded: /usr/local/lib/libsybdb.5.dylib
Referenced from: /Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pymssql.so
Reason: image not found
Note pip3.4 search pymssql results in :
pymssql - DB-API interface to Microsoft SQL Server for
Python. (new Cython-based version)
INSTALLED: 2.1.0 (latest)
Note further that /usr/local/lib/libsybdb.5.dylib does NOT exist, but then again, I couldn't find in on the windows box either (searched the C drive for libsybdb)
How do I get around this?
You need to install freetds library to talk to Microsoft SQL Server
brew install freetds

Resources