Python Forum
Procedure Entry Point could not be located - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Data Science (https://python-forum.io/forum-44.html)
+--- Thread: Procedure Entry Point could not be located (/thread-9010.html)



Procedure Entry Point could not be located - ZedsDead - Mar-17-2018

Hi, I am using Spyder through the Anaconda installation on Windows 10.

Every time I open up Spyder I will get an error message saying:

[Image: qfpnAoK]

I click ok and I can still run my code, which is:

# -*- coding: utf-8 -*-
"""
Created on Tue Mar  6 18:11:38 2018

@author: Zac
"""

#%% DEFINES BLOCKS OF CODE
import numpy as np # math library
import scipy # scientific library
import pylab as pl # plotting library
#%% this will output some wisdom
print('Python and Calcium Imaging, a marriage made in heaven')
#%% this creates a random vector
a = np.random.random([10,10])
print(a)
#%% this will plot something
pl.imshow(a)
The problem is I cannot get a plot to work. Whether I use the above code or something else such as:

# -*- coding: utf-8 -*-
"""
Created on Wed Feb 21 19:26:46 2018

@author: Zac
"""

import numpy as np
from sklearn.datasets import load_iris
from sklearn import tree



# 1. Import Dataset
iris = load_iris()
#print(iris.feature_names)
#print(iris.target_names)
#print(iris.data[0])
#print(iris.target[51])
#for i in range(len(iris.target)):
#    print("Example %d: Label %s, Features %s" % (i, iris.target[i], iris.data[i]))

# 2. Train a Classifier
# 2.1 Testing Data = examples used to test the classifier's accuracy, not part of the training data
    # remove 3 entries from the data and target variables of the original dataset, to use as testing data
test_idx = [0, 50, 100]

# training data:
train_target = np.delete(iris.target, test_idx)
train_data = np.delete(iris.data, test_idx, axis=0)

#testing data
test_target = iris.target[test_idx]
test_data = iris.data[test_idx]

clf = tree.DecisionTreeClassifier()
clf.fit(train_data, train_target)

#3. predict label for new flower
print(test_target)
print(clf.predict(test_data))

#4 visualise the tree
import graphviz 
dot_data = tree.export_graphviz(clf, out_file=None) 
graph = graphviz.Source(dot_data) 
graph.render("iris") 

dot_data = tree.export_graphviz(clf, out_file=None, 
                         feature_names=iris.feature_names,  
                         class_names=iris.target_names,  
                         filled=True, rounded=True,  
                         special_characters=True)  
graph = graphviz.Source(dot_data)  
graph 
It will run everything until it reaches the plot code and will not plot anything.

Any help with this is really appreciated. I am in dire need to fix this issue for getting started with Python for University and at the moment am behind due to these issues.

Cheers,


RE: Procedure Entry Point could not be located - Larz60+ - Mar-17-2018

Quote:error message saying:
image
that doesn't sound verbatim!
what's the entire unaltered error message?


RE: Procedure Entry Point could not be located - ZedsDead - Mar-17-2018

(Mar-17-2018, 07:10 AM)Larz60+ Wrote:
Quote:error message saying:
image
that doesn't sound verbatim!
what's the entire unaltered error message?

If you double click the image url you will see the error message.