spyder-ide / spyder

Official repository for Spyder - The Scientific Python Development Environment
https://www.spyder-ide.org
MIT License
8.38k stars 1.62k forks source link

Encounter to error While installing Spyder #13777

Closed NitinSaini18 closed 4 years ago

NitinSaini18 commented 4 years ago

Description

What steps will reproduce the problem?

I was installing spyder on new environment of python==3.5 and then i installed tensorflow=1.0.0 After when i try to install Spyder using conda install Spyder then it gives me this error conda.core.link:_execute(481): an error occurred while installing package 'defaults::ipykernel-4.10.0-py35_0'. linkerror: post-link script failed for package defaults::ipykernel-4.10.0-py35_0 running your command again with -v will provide additional information please do not tell me to update conda because if i update then my command then I am not able to install tensorflow of specific version 1.0.0 So please tell me other Alternatives please tell me how can I solve this issue

Versions

Dependencies


# Mandatory:
atomicwrites >=1.2.0           :  1.4.0 (OK)
chardet >=2.0.0                :  3.0.4 (OK)
cloudpickle >=0.5.0            :  1.6.0 (OK)
diff_match_patch >=20181111    :  20200713 (OK)
intervaltree                   :  None (OK)
IPython >=4.0                  :  7.16.1 (OK)
jedi =0.17.1                   :  0.17.1 (OK)
nbconvert >=4.0                :  5.6.1 (OK)
numpydoc >=0.6.0               :  1.1.0 (OK)
paramiko >=2.4.0               :  2.7.2 (OK)
parso =0.7.0                   :  0.7.0 (OK)
pexpect >=4.4.0                :  4.8.0 (OK)
pickleshare >=0.4              :  0.7.5 (OK)
psutil >=5.3                   :  5.7.2 (OK)
pygments >=2.0                 :  2.6.1 (OK)
pylint >=1.0                   :  2.6.0 (OK)
pyls >=0.34.0;<1.0.0           :  0.34.1 (OK)
qdarkstyle >=2.8               :  2.8.1 (OK)
qtawesome >=0.5.7              :  0.7.2 (OK)
qtconsole >=4.6.0              :  4.7.6 (OK)
qtpy >=1.5.0                   :  1.9.0 (OK)
rtree >=0.8.3                  :  0.9.4 (OK)
sphinx >=0.6.6                 :  3.2.1 (OK)
spyder_kernels >=1.9.4;<1.10.0 :  1.9.4 (OK)
watchdog                       :  None (OK)
zmq >=17                       :  19.0.1 (OK)

# Optional:
cython >=0.21                  :  None (OK)
matplotlib >=2.0.0             :  None (OK)
numpy >=1.7                    :  1.19.2 (OK)
pandas >=0.13.1                :  None (OK)
scipy >=0.17.0                 :  None (OK)
sympy >=0.7.3                  :  None (OK)
ccordoba12 commented 4 years ago

Closing as a duplicate of #13776

@NitinSaini18, please stop reporting these bugs here and instead report them in the Anaconda repo I told you about

https://github.com/ContinuumIO/anaconda-issues

NitinSaini18 commented 4 years ago

I reported error there also but i do not have any response from there. Please can you suggest me some other solution.

On Mon, 14 Sep 2020 18:23 Carlos Cordoba, notifications@github.com wrote:

Closing as a duplicate of #13776 https://github.com/spyder-ide/spyder/issues/13776

@NitinSaini18 https://github.com/NitinSaini18, please stop reporting these bugs here and instead report them in the Anaconda repo I told you about

https://github.com/ContinuumIO/anaconda-issues

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/spyder-ide/spyder/issues/13777#issuecomment-692031999, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMV6ZXSNW52OBJ5CUFCXSWLSFYG4ZANCNFSM4RLOVLZQ .

ccordoba12 commented 4 years ago

I'm sorry to hear that. Unfortunately, I don't have other suggestions.

NitinSaini18 commented 4 years ago

@ccordoba12 Okay, let me tell you my actual problem : when I create a new environment with python 3.7 and tensorflow 2.3 the spyder install perfectly and runs very smoothly and when run my code of Chatbot.py it gives me error : AttributeError: module 'tensorflow.contrib.seq2seq' has no attribute 'prepare_attention' I know that prepare_attention no longer is available in tensorflow lastest version rather this function only available in tensorflow 1.0.0 version thats why i am installing spyder to new env. But As you read it I am getting error. Can you suggest me alternative of Prepare attention and how can i use it for my lastest version. Here is my part of code:

def decode_training_set(encoder_state, decoder_cell, decoder_embedded_input, sequence_length, decoding_scope,output_function, keep_prob,batch_size): attention_states = tf.zeros([batch_size, 1, decoder_cell.output_size]) attention_keys, attention_values, attention_score_function, attention_construct_function = tf.contrib.seq2seq.prepare_attention(attention_states, attention_option = 'bahdanau', num_units = decoder_cell.output_size) training_decoder_function = tf.contrib.seq2seq.attention_decoder_fn_train(encoder_state[0], attention_values, attention_keys, attention_score_function, attention_construct_function, name = "attn_dec_train") decoder_output, decoder_final_state, decoder_final_context_state = tf.contrib.seq2seq.dynamic_rnn_decode(decoder_cell, training_decoder_function, decoder_embedded_input, sequence_length, scope = decoding_scope) decoder_output_dropout = tf.nn.dropout(decoder_output,keep_prob) return output_function(decoder_output_dropout)

ccordoba12 commented 4 years ago

@NitinSaini18, thanks for the extra details. What you need to do to solve this problem is to create a conda environment with Python, then use pip to install Tensorflow 1.0, spyder-kernels and the other packages you need to run your code. Finally, you need to connect Spyder to the Python interpreter of that environment by going to the menu

Tools > Preferences > Main Interpreter

and selecting it as your custom interpreter.

The second part of our video describes this process in detail, so please take a look at it.

NitinSaini18 commented 4 years ago

@ccordoba12 I was facing this problem from the past 3 days and you are the only one who solved my issue. Thank you so much!!!

ccordoba12 commented 4 years ago

I'm really glad to know @NitinSaini18!