Error in using 'theano-nose' command - theano

After installing Theano from Enthought Canopy on Windows, following the steps here: http://deeplearning.net/software/theano/install.html#id9 , I tried to execute the command theano-nose from Canopy terminal. I got an error message saying "unable to find theano-nose". Can someone tell me what might be going wrong?

theano-nose is from the command line. But your shell need to be able to find it.
It is highly possible it didn't got installed correctly on Windows or that you need to reboot or log out/log in. I do not remember Windows particularities on that level.
But a simple work around is to start python and run this:
import theano
theano.test()
This is equivalent for what you want to do.

Related

Error--rescode.err_missing_license_file(1008): License cannot be located

I was running a python program which uses CVXPY to solve a optimization problem involving semi-definite constraints. Initially the code ran well when I was using the default solver provided by CVXPY. Then I tried to use MOSEK as the optimization solver. Since it has to be installed, I tried installing it from command prompt using a pip installer. However the installation was interrupted midway (I am unaware of the specific reasons). Now whenever I am trying to run the code, it is prompting an error-
rescode.err_missing_license_file(1008): License cannot be located. The default search path is ';C:\Users\dsouv\mosek\mosek.lic;'.
I can understand that somehow the default search path has been changed due to the failed installation of MOSEK. Even after calling the default solver of CVXPY, I am still getting the same error.
Things I have tried:
Reinstalling CVXPY.
Reinstalling MOSEK from the Anaconda Powershell Prompt.
Even after trying out these, the error still persist. Any suggestions to solve this issue is welcome. Also please me if you need any other informtion.
Thanks
You should install the license file separately. I.e. do step 3 at
https://www.mosek.com/resources/getting-started/

I can't submit my CS50 code solution using terminal on mac

So I am trying to submit my CS50 (https://cs50.harvard.edu/x/2020/tracks/mobile/android/fiftygram/) in my terminal by using submit50 cs50/problems/2020/x/tracks/android/fiftygram. I have installed pip3 and CS50 but I keep getting an error zsh:
command not found: submit50
Please help! How do I solve this?
You also need to install submit50 itself. The instructions are here:
https://cs50.readthedocs.io/submit50/#installation
Edit: given the comment that OP has done this, try updating pip. It may be a version issue after switching to zsh. Alternatively, if you still have another shell use that.
https://unix.stackexchange.com/questions/557185/pip-error-after-changing-from-bash-to-zsh

Pygame/Python/Terminal/Mac related

I'm a beginner, I have really hit a brick wall, and would greatly appreciate any advice someone more advanced can offer.
I have been having a number of extremely frustrating issues the past few days, which I have been round and round google trying to solve, tried all sorts of things to no avail.
Problem 1)
I can't import pygame in Idle with the error:
ModuleNotFoundError: No module named 'pygame' - even though it is definitely installed, as in terminal, if I ask pip3 to install pygame it says:
Requirement already satisfied: pygame in /usr/local/lib/python3.7/site-packages (1.9.4)
I think there may be a problem with several conflicting versions of python on my computer, as when i type sys.path in Idle (which by the way displays Python 3.7.2 ) the following are listed:
'/Users/myname/Documents', '/Library/Frameworks/Python.framework/Versions/3.7/lib/python37.zip', '/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7', '/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/lib-dynload', '/Users/myname/Library/Python/3.7/lib/python/site-packages', '/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages'
So am I right in thinking pygame is in the python3.7/sitepackages version, and this is why idle won't import it? I don't know I'm just trying to make sense of this. I have absoloutely no clue how to solve this,"re-set the path" or whatever. I don't even know how to find all of these versions of python as only one appears in my applications folder, the rest are elsewhere?
Problem 2)
Apparently there should be a python 2.7 system version installed on every mac system which is vital to the running of python regardless of the developing environment you use. Yet all of my versions of python seem to be in the library/downloaded versions. Does this mean my system version of python is gone? I have put the computer in recovery mode today and done a reinstall of the macOS mojave system today, so shouldn't any possible lost version of python 2.7 be back on the system now?
Problem 3)
When I go to terminal, frequently every command I type is 'not found'.
I have sometimes found a temporary solution is typing:
export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
but the problems always return!
As I say I also did a system reinstall today but that has helped none!
Can anybody please help me with these queries? I am really at the end of my tether and quite lost, forgive my programming ignorance please. Many thanks.
Try it with the problem1
I'm not an expert neither, but I think you need to install both in terminal and python in order to use the program.
python -m pip install pygame
You should actually add the export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" to your .bash_profile (if you are using bash). Do this by opening your terminal, verifying that it says "bash" at the top. If it doesn't, you may have a .zprofile instead. Type ls -al and it will list all the invisible files. If you have .bash_profile listed, use that one. If you have .zprofile, use that.
Type nano .bash_profile to open and edit the profile and add the command to the end of it. This will permanently add the path to your profile after you restart the terminal.
Use ^X to exit nano and type Y to save your changes. Then you can check that it works when you try to run the program from IDLE.

Spyder external system terminal does not work (Python3.6)

I am not sure if this is a right place to ask this type of questions. I am a python beginner or programmer overall at this point. I am using Spyder to use python 3.6 (via Anaconda). I wrote a code that works fine when I run it in the current Ipython console. But I really need to run it in an external system terminal. In order to do so, I chose the following path: Run-> configuration per file -> execute in an external system terminal. That has been working fine. But now it refuses to work!
I validated that there is nothing wrong with my code by running something simple and saw that running via external system terminal does not work.
So far I deleted Anaconda and re-installed it. Could someone suggest what I should be looking for to diagnose the problem and fix it?
Thanks!
I had the same problem and noticed that unless the Working directory settings is set to "The directory of the file being executed", it won't work.
You can change it in "Run" > "Run configuration per file".

Python | Python.exe- Entry point not found

I installed (extracted) Kivy (Kivy-1.9.0-py3.4-win32-x86.exe) on my PC (Win7 32bit). Now whenever trying to run a file using kivy-3.4.bat getting an error message within a window...
python.exe- Entry point not found
The procedure entry point inflateReset2 could not be located in the dynamic link library zlib1.dll.
Once click on the "Ok" button I see
[Critical ] [app] unable to get a window, abort
on CMD.
I think this is a problem related to my system and Python more than Kivy. Can anyone tell me what is the problem and how to solve it?
This is amazing!! Even in StackOverFlow no one could give me any solution!!
Yes, I know this post is a bit old, but maybe someone else searches this.
I got the same error. And really, I just tried to start the python script via MS Powershell instead of CMD. I just wanted to use the PS one time.
And it worked, at least for me.
So, if you encounter this error, try to use the Powershell :)
This happened to me because an old zlib1.dll was being loaded from somewhere in my PATH. I copied a new version to system32 and it solved the problem.
It might be worth looking at this page:
http://kivy.org/docs/installation/installation-windows.html#start-a-kivy-application
I have the same issue. Finally I solve it with running command with administrator privilege (when the command === python -m pip install kivy.deps.gstreamer --extra-index-url https://kivy.org/downloads/packages/simple/).

Resources