qid int64 46k 74.7M | question stringlengths 54 37.8k | date stringlengths 10 10 | metadata listlengths 3 3 | response_j stringlengths 17 26k | response_k stringlengths 26 26k |
|---|---|---|---|---|---|
245,465 | How do you connect to a remote server via IP address in the manner that TOAD, SqlDeveloper, are able to connect to databases with just the ip address, username, SID and password?
Whenever I try to specify and IP address, it seems to be taking it locally.
In other words, how should the string for cx\_Oracle.connect() ... | 2008/10/29 | [
"https://Stackoverflow.com/questions/245465",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | I like to do it this way:
```
ip = '192.168.0.1'
port = 1521
SID = 'YOURSIDHERE'
dsn_tns = cx_Oracle.makedsn(ip, port, SID)
db = cx_Oracle.connect('username', 'password', dsn_tns)
```
One of the main reasons I like this method is that I usually have a TNSNAMES.ORA file lying around someplace, and I can check that t... | ```py
import cx_Oracle
dsn = cx_Oracle.makedsn(host='127.0.0.1', port=1521, sid='your_sid')
conn = cx_Oracle.connect(user='your_username', password='your_password', dsn=dsn)
conn.close()
``` |
245,465 | How do you connect to a remote server via IP address in the manner that TOAD, SqlDeveloper, are able to connect to databases with just the ip address, username, SID and password?
Whenever I try to specify and IP address, it seems to be taking it locally.
In other words, how should the string for cx\_Oracle.connect() ... | 2008/10/29 | [
"https://Stackoverflow.com/questions/245465",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | I like to do it this way:
```
ip = '192.168.0.1'
port = 1521
SID = 'YOURSIDHERE'
dsn_tns = cx_Oracle.makedsn(ip, port, SID)
db = cx_Oracle.connect('username', 'password', dsn_tns)
```
One of the main reasons I like this method is that I usually have a TNSNAMES.ORA file lying around someplace, and I can check that t... | ```
import cx_Oracle
CONN_INFO = {
'host': 'xxx.xx.xxx.x',
'port': 12345,
'user': 'user_name',
'psw': 'your_password',
'service': 'abc.xyz.com',
}
CONN_STR = '{user}/{psw}@{host}:{port}/{service}'.format(**CONN_INFO)
connection = cx_Oracle.connect(CONN_STR)
``` |
245,465 | How do you connect to a remote server via IP address in the manner that TOAD, SqlDeveloper, are able to connect to databases with just the ip address, username, SID and password?
Whenever I try to specify and IP address, it seems to be taking it locally.
In other words, how should the string for cx\_Oracle.connect() ... | 2008/10/29 | [
"https://Stackoverflow.com/questions/245465",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | You can specify the server in the connection string, e.g.:
```
import cx_Oracle
connstr = 'scott/tiger@server:1521/orcl'
conn = cx_Oracle.connect(connstr)
```
* "server" is the server, or the IP address if you want.
* "1521" is the port that the database is listening on.
* "orcl" is the name of the instance (or data... | ```
import cx_Oracle
CONN_INFO = {
'host': 'xxx.xx.xxx.x',
'port': 12345,
'user': 'user_name',
'psw': 'your_password',
'service': 'abc.xyz.com',
}
CONN_STR = '{user}/{psw}@{host}:{port}/{service}'.format(**CONN_INFO)
connection = cx_Oracle.connect(CONN_STR)
``` |
245,465 | How do you connect to a remote server via IP address in the manner that TOAD, SqlDeveloper, are able to connect to databases with just the ip address, username, SID and password?
Whenever I try to specify and IP address, it seems to be taking it locally.
In other words, how should the string for cx\_Oracle.connect() ... | 2008/10/29 | [
"https://Stackoverflow.com/questions/245465",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | You can specify the server in the connection string, e.g.:
```
import cx_Oracle
connstr = 'scott/tiger@server:1521/orcl'
conn = cx_Oracle.connect(connstr)
```
* "server" is the server, or the IP address if you want.
* "1521" is the port that the database is listening on.
* "orcl" is the name of the instance (or data... | ```py
import cx_Oracle
dsn = cx_Oracle.makedsn(host='127.0.0.1', port=1521, sid='your_sid')
conn = cx_Oracle.connect(user='your_username', password='your_password', dsn=dsn)
conn.close()
``` |
245,465 | How do you connect to a remote server via IP address in the manner that TOAD, SqlDeveloper, are able to connect to databases with just the ip address, username, SID and password?
Whenever I try to specify and IP address, it seems to be taking it locally.
In other words, how should the string for cx\_Oracle.connect() ... | 2008/10/29 | [
"https://Stackoverflow.com/questions/245465",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | I like to do it this way:
```
ip = '192.168.0.1'
port = 1521
SID = 'YOURSIDHERE'
dsn_tns = cx_Oracle.makedsn(ip, port, SID)
db = cx_Oracle.connect('username', 'password', dsn_tns)
```
One of the main reasons I like this method is that I usually have a TNSNAMES.ORA file lying around someplace, and I can check that t... | ```
import cx_Oracle
ip = '172.30.1.234'
port = 1524
SID = 'dev3'
dsn_tns = cx_Oracle.makedsn(ip, port, SID)
conn = cx_Oracle.connect('dbmylike', 'pass', dsn_tns)
print conn.version
conn.close()
``` |
69,111,185 | I'm trying to convert the command line return of `docker container ls -q` into a python list using the os.system library and method.
Is there a way to do this using the os library?
Essentially I'm trying to check if there are any running containers before I proceed through my code.
Thanks in advance! | 2021/09/09 | [
"https://Stackoverflow.com/questions/69111185",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12706523/"
] | Using `src` in the `img` tag to render image
```
<img className="icon" key={item.weather[0].icon} src={`https://openweathermap.org/img/w/${item.weather[0].icon}.png`} />
```
And put the key in `div` instead in the children. | Not sure why you are doing it, but setting JSX in your state seems strange.
Try something like this, assuming `res2.data.list` has the list of values.
```
<div className="five_day_forecast">
<div className="temp_body">
// Display here with Date/Time & Main Temp.
<p>
{res2.data.... |
69,111,185 | I'm trying to convert the command line return of `docker container ls -q` into a python list using the os.system library and method.
Is there a way to do this using the os library?
Essentially I'm trying to check if there are any running containers before I proceed through my code.
Thanks in advance! | 2021/09/09 | [
"https://Stackoverflow.com/questions/69111185",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12706523/"
] | Using `src` in the `img` tag to render image
```
<img className="icon" key={item.weather[0].icon} src={`https://openweathermap.org/img/w/${item.weather[0].icon}.png`} />
```
And put the key in `div` instead in the children. | Putting markup in state is a weird anti-pattern. State is really there to just store *data* not markup. You can use a function to create the JSX from `map`ping over the data.
You should be adding the source of the image to the `src` attribute of the `img` element.
Keys should be added to parent elements.
```
const i... |
56,272,161 | I'm trying to set up travis build with JDK13, using for it two ways
- by setting `jdk` parameter to `openjdkea`
- by downloading jdk and setting env variables (installation tested locally),
And still `java --version` is 1.8 and it is used in runtime, even maven uses jdk13 for build.
Here is my `travis.yml`:
```
la... | 2019/05/23 | [
"https://Stackoverflow.com/questions/56272161",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5427344/"
] | As loadChildren:string is deprecated in angular 8 Change your loadChildren declarations
From
```
loadChildren: './production/production.module#ProductionModule'
```
To
```
loadChildren: () => import('./production/production.module').then(m => m.ProductionModule)
```
For more you can ref angular official [git li... | Apparently, it's not the entire `"loadChildren" : ...` which is deprecated. It just will no longer accept strings. Instead you have to specify a function now.
The documentation is already available [here](https://fireship.io/snippets/lazy-loaded-routes-angular-v8-ivy/).
It comes down to:
```
const routes = [
{
... |
11,980,524 | Within brackets, python's slice shorthand auto-generates tuples of slice objects:
```
class Foo(object):
def __getitem__(self, key):
print key
Foo()[1::, 2:20:5]
```
This prints `(slice(1, None, None), slice(2, 20, 5))`. As far as I can tell, however, this shorthand doesn't work outside brackets.
Is t... | 2012/08/16 | [
"https://Stackoverflow.com/questions/11980524",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1332492/"
] | NumPy has an [`s_`](http://docs.scipy.org/doc/numpy/reference/generated/numpy.s_.html) object that will do this for you:
```none
>>> np.s_[2::2]
slice(2, None, 2)
```
You can easily make your own version of this simply by setting `s_ = Foo()` and then using `s_` whenever you want to create a slice easily. | What you see printed out is actually a good clue. You can create slice objects directly through the slice() global function. These can then be passed used to index from lists.
```
s = slice(1, 10, 2)
numbers = list(range(20))
print numbers[s]
print numbers[1:10:2]
```
This will print the same result twice, [1, 3, 5,... |
24,743,805 | In Ruby one can inspect a variable (object) by `p my_obj` so it'll print it as "deep" and in detail as possible. It's useful for logging and debugging. In python I thought it was `print my_obj`, only it didn't print much but `<requests.sessions.Session object at 0x7febcb29b390>` which wasn't useful at all.
How do I do... | 2014/07/14 | [
"https://Stackoverflow.com/questions/24743805",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | `dir()` will probably give you what you want:
```
for key in dir(my_obj):
print('{}: {}'.format(key, getattr(my_obj, key)))
```
There's a lot more information there that you're expecting though, if I had to guess :) | That is the most universal way to "print" an object, it's just that not every object will have a very useful printout; most probably don't, in fact.
If you're working with an object someone else created, you'll often want to look at the documentation to find out how to look at its variables and whatnot. That will ofte... |
24,743,805 | In Ruby one can inspect a variable (object) by `p my_obj` so it'll print it as "deep" and in detail as possible. It's useful for logging and debugging. In python I thought it was `print my_obj`, only it didn't print much but `<requests.sessions.Session object at 0x7febcb29b390>` which wasn't useful at all.
How do I do... | 2014/07/14 | [
"https://Stackoverflow.com/questions/24743805",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | That is the most universal way to "print" an object, it's just that not every object will have a very useful printout; most probably don't, in fact.
If you're working with an object someone else created, you'll often want to look at the documentation to find out how to look at its variables and whatnot. That will ofte... | If you want complete control over printing for the object, define the `__repr__` and `__str__` functions for your class.
```
class Node(object):
""" A node object with an index"""
def __init__(self,index = 0):
self.index = index
def __repr__(self):
print "Node %s" % self.index
def __s... |
24,743,805 | In Ruby one can inspect a variable (object) by `p my_obj` so it'll print it as "deep" and in detail as possible. It's useful for logging and debugging. In python I thought it was `print my_obj`, only it didn't print much but `<requests.sessions.Session object at 0x7febcb29b390>` which wasn't useful at all.
How do I do... | 2014/07/14 | [
"https://Stackoverflow.com/questions/24743805",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | `dir()` will probably give you what you want:
```
for key in dir(my_obj):
print('{}: {}'.format(key, getattr(my_obj, key)))
```
There's a lot more information there that you're expecting though, if I had to guess :) | If you want complete control over printing for the object, define the `__repr__` and `__str__` functions for your class.
```
class Node(object):
""" A node object with an index"""
def __init__(self,index = 0):
self.index = index
def __repr__(self):
print "Node %s" % self.index
def __s... |
24,743,805 | In Ruby one can inspect a variable (object) by `p my_obj` so it'll print it as "deep" and in detail as possible. It's useful for logging and debugging. In python I thought it was `print my_obj`, only it didn't print much but `<requests.sessions.Session object at 0x7febcb29b390>` which wasn't useful at all.
How do I do... | 2014/07/14 | [
"https://Stackoverflow.com/questions/24743805",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | `dir()` will probably give you what you want:
```
for key in dir(my_obj):
print('{}: {}'.format(key, getattr(my_obj, key)))
```
There's a lot more information there that you're expecting though, if I had to guess :) | You can use [`vars`](https://docs.python.org/2/library/functions.html#vars) builtin method to get a dictionary of the object's attributes:
```
>>> import requests
>>> r = requests.Session()
>>> vars(r)
{'cookies': <<class 'requests.cookies.RequestsCookieJar'>[]>, 'stream': False, 'hooks': {'response': []}, 'auth': Non... |
24,743,805 | In Ruby one can inspect a variable (object) by `p my_obj` so it'll print it as "deep" and in detail as possible. It's useful for logging and debugging. In python I thought it was `print my_obj`, only it didn't print much but `<requests.sessions.Session object at 0x7febcb29b390>` which wasn't useful at all.
How do I do... | 2014/07/14 | [
"https://Stackoverflow.com/questions/24743805",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | `dir()` will probably give you what you want:
```
for key in dir(my_obj):
print('{}: {}'.format(key, getattr(my_obj, key)))
```
There's a lot more information there that you're expecting though, if I had to guess :) | I'd recommend the `inspect` module:
```
import inspect
print inspect.getmembers(my_obj)
```
This includes the `__dict__` but also includes details about all methods on the object, which can be very useful. |
24,743,805 | In Ruby one can inspect a variable (object) by `p my_obj` so it'll print it as "deep" and in detail as possible. It's useful for logging and debugging. In python I thought it was `print my_obj`, only it didn't print much but `<requests.sessions.Session object at 0x7febcb29b390>` which wasn't useful at all.
How do I do... | 2014/07/14 | [
"https://Stackoverflow.com/questions/24743805",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | You can use [`vars`](https://docs.python.org/2/library/functions.html#vars) builtin method to get a dictionary of the object's attributes:
```
>>> import requests
>>> r = requests.Session()
>>> vars(r)
{'cookies': <<class 'requests.cookies.RequestsCookieJar'>[]>, 'stream': False, 'hooks': {'response': []}, 'auth': Non... | If you want complete control over printing for the object, define the `__repr__` and `__str__` functions for your class.
```
class Node(object):
""" A node object with an index"""
def __init__(self,index = 0):
self.index = index
def __repr__(self):
print "Node %s" % self.index
def __s... |
24,743,805 | In Ruby one can inspect a variable (object) by `p my_obj` so it'll print it as "deep" and in detail as possible. It's useful for logging and debugging. In python I thought it was `print my_obj`, only it didn't print much but `<requests.sessions.Session object at 0x7febcb29b390>` which wasn't useful at all.
How do I do... | 2014/07/14 | [
"https://Stackoverflow.com/questions/24743805",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | I'd recommend the `inspect` module:
```
import inspect
print inspect.getmembers(my_obj)
```
This includes the `__dict__` but also includes details about all methods on the object, which can be very useful. | If you want complete control over printing for the object, define the `__repr__` and `__str__` functions for your class.
```
class Node(object):
""" A node object with an index"""
def __init__(self,index = 0):
self.index = index
def __repr__(self):
print "Node %s" % self.index
def __s... |
46,019,965 | I'm trying to access data on IBM COS from Data Science Experience based on this [blog post](https://www.ibm.com/blogs/bluemix/2017/06/access-analyze-data-ibm-cross-region-cloud-object-storage/).
First, I select 1.0.8 version of stocator ...
```
!pip install --user --upgrade pixiedust
import pixiedust
pixiedust.instal... | 2017/09/03 | [
"https://Stackoverflow.com/questions/46019965",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1033422/"
] | No need to install stocator it is already there. As Roland mentioned, new installation most likely would collide with the pre-installed one and cause conflicts.
Try ibmos2spark:
<https://stackoverflow.com/a/46035893/8558372>
Let me know if you still facing problems. | Chris, I usually don't use the 'http://' in the endpoint and that works for me. Not sure if that is the problem here.
Here is how I access the COS objects from DSX notebooks
```
endpoint = "s3-api.dal-us-geo.objectstorage.softlayer.net"
hconf = sc._jsc.hadoopConfiguration()
hconf.set("fs.s3d.service.endpoint",endpoi... |
46,019,965 | I'm trying to access data on IBM COS from Data Science Experience based on this [blog post](https://www.ibm.com/blogs/bluemix/2017/06/access-analyze-data-ibm-cross-region-cloud-object-storage/).
First, I select 1.0.8 version of stocator ...
```
!pip install --user --upgrade pixiedust
import pixiedust
pixiedust.instal... | 2017/09/03 | [
"https://Stackoverflow.com/questions/46019965",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1033422/"
] | Don't force-install a new Stocator unless you have a really good reason.
I highly recommend the Spark aaS documentation at:
<https://console.bluemix.net/docs/services/AnalyticsforApacheSpark/index-gentopic1.html#genTopProcId2>
Please choose the correct COS endpoints from:
<https://ibm-public-cos.github.io/crs-docs/... | Chris, I usually don't use the 'http://' in the endpoint and that works for me. Not sure if that is the problem here.
Here is how I access the COS objects from DSX notebooks
```
endpoint = "s3-api.dal-us-geo.objectstorage.softlayer.net"
hconf = sc._jsc.hadoopConfiguration()
hconf.set("fs.s3d.service.endpoint",endpoi... |
46,019,965 | I'm trying to access data on IBM COS from Data Science Experience based on this [blog post](https://www.ibm.com/blogs/bluemix/2017/06/access-analyze-data-ibm-cross-region-cloud-object-storage/).
First, I select 1.0.8 version of stocator ...
```
!pip install --user --upgrade pixiedust
import pixiedust
pixiedust.instal... | 2017/09/03 | [
"https://Stackoverflow.com/questions/46019965",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1033422/"
] | No need to install stocator it is already there. As Roland mentioned, new installation most likely would collide with the pre-installed one and cause conflicts.
Try ibmos2spark:
<https://stackoverflow.com/a/46035893/8558372>
Let me know if you still facing problems. | DSX has a version of stocator on the classpath for Spark 2.0 and Spark 2.1 kernels. The one you installed in your instance is likely to get into conflict with the pre-installed version. |
46,019,965 | I'm trying to access data on IBM COS from Data Science Experience based on this [blog post](https://www.ibm.com/blogs/bluemix/2017/06/access-analyze-data-ibm-cross-region-cloud-object-storage/).
First, I select 1.0.8 version of stocator ...
```
!pip install --user --upgrade pixiedust
import pixiedust
pixiedust.instal... | 2017/09/03 | [
"https://Stackoverflow.com/questions/46019965",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1033422/"
] | Don't force-install a new Stocator unless you have a really good reason.
I highly recommend the Spark aaS documentation at:
<https://console.bluemix.net/docs/services/AnalyticsforApacheSpark/index-gentopic1.html#genTopProcId2>
Please choose the correct COS endpoints from:
<https://ibm-public-cos.github.io/crs-docs/... | DSX has a version of stocator on the classpath for Spark 2.0 and Spark 2.1 kernels. The one you installed in your instance is likely to get into conflict with the pre-installed version. |
50,340,906 | I kind of know why when I do `migrate` it gives me the message of `no migrations to apply` but I just don't know how to fix it
This is what happens.
I added a new field named `update` into my model fields.
I did a `migration` which created a file called `0003_xxxxx.py` then I did a `migrate` now this worked fine.
Bu... | 2018/05/15 | [
"https://Stackoverflow.com/questions/50340906",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2128414/"
] | django keep records of current `migrations` log by table `django_migrations` in your db.
something like:
[](https://i.stack.imgur.com/4iFvO.jpg)
The migrations is a chain structure,it's depend on the parent node.By this table django can know which m... | Or even simply just delete the last migration row from your database you can try the following
First, check which row you want to remove
```
SELECT * FROM "public"."django_migrations";
```
Now pick the last `id` from the above query and execute
```
DELETE FROM "public"."django_migrations" WHERE "id"=replace with ... |
50,340,906 | I kind of know why when I do `migrate` it gives me the message of `no migrations to apply` but I just don't know how to fix it
This is what happens.
I added a new field named `update` into my model fields.
I did a `migration` which created a file called `0003_xxxxx.py` then I did a `migrate` now this worked fine.
Bu... | 2018/05/15 | [
"https://Stackoverflow.com/questions/50340906",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2128414/"
] | django keep records of current `migrations` log by table `django_migrations` in your db.
something like:
[](https://i.stack.imgur.com/4iFvO.jpg)
The migrations is a chain structure,it's depend on the parent node.By this table django can know which m... | just run:
```
python manage.py run --run-syncdb
``` |
50,340,906 | I kind of know why when I do `migrate` it gives me the message of `no migrations to apply` but I just don't know how to fix it
This is what happens.
I added a new field named `update` into my model fields.
I did a `migration` which created a file called `0003_xxxxx.py` then I did a `migrate` now this worked fine.
Bu... | 2018/05/15 | [
"https://Stackoverflow.com/questions/50340906",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2128414/"
] | Or even simply just delete the last migration row from your database you can try the following
First, check which row you want to remove
```
SELECT * FROM "public"."django_migrations";
```
Now pick the last `id` from the above query and execute
```
DELETE FROM "public"."django_migrations" WHERE "id"=replace with ... | just run:
```
python manage.py run --run-syncdb
``` |
44,504,899 | I'm getting something like this. Can anyone please tell me how to fix this.
```
C:\Users\krush\Documents\ML using Python>pip install pocketsphinx
Collecting pocketsphinx
Using cached pocketsphinx-0.1.3.zip
Building wheels for collected packages: pocketsphinx
Running setup.py bdist_wheel for pocketsphinx: started
... | 2017/06/12 | [
"https://Stackoverflow.com/questions/44504899",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4813058/"
] | Instead of copying Swig files to the Python folder, you can simply add Swig`s location to the environment variables:
1. Press `Ctrl+S`
2. Type `env` and press `Enter`
3. Double click on `Path`
4. Add the *path-to-Swig* to the last blank line
5. Click `OK` and restart your PC | I was also getting same error, while installing in ubuntu 16.04, I executed following commands:
```
sudo apt-get install -y python python-dev python-pip build-essential swig git libpulse-dev
sudo pip install pocketsphinx
```
source: [pocketsphinx-python](https://github.com/cmusphinx/pocketsphinx-python) |
44,504,899 | I'm getting something like this. Can anyone please tell me how to fix this.
```
C:\Users\krush\Documents\ML using Python>pip install pocketsphinx
Collecting pocketsphinx
Using cached pocketsphinx-0.1.3.zip
Building wheels for collected packages: pocketsphinx
Running setup.py bdist_wheel for pocketsphinx: started
... | 2017/06/12 | [
"https://Stackoverflow.com/questions/44504899",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4813058/"
] | ```
conda install swig
pip install pocketsphinx
```
I didn't want to do all that setup other people are suggesting so I tried this and it worked.
This probably only works if you are using Anaconada though. | I know I am late, but what worked for me was to download the pre-built wheel file and install it manually (tested on Windows. I am pretty sure it will only work on Windows).
[https://www.lfd.uci.edu/~gohlke/pythonlibs/#pocketsphinx](https://www.lfd.uci.edu/%7Egohlke/pythonlibs/#pocketsphinx)
Just grab the right one (... |
44,504,899 | I'm getting something like this. Can anyone please tell me how to fix this.
```
C:\Users\krush\Documents\ML using Python>pip install pocketsphinx
Collecting pocketsphinx
Using cached pocketsphinx-0.1.3.zip
Building wheels for collected packages: pocketsphinx
Running setup.py bdist_wheel for pocketsphinx: started
... | 2017/06/12 | [
"https://Stackoverflow.com/questions/44504899",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4813058/"
] | I was also getting same error, while installing in ubuntu 16.04, I executed following commands:
```
sudo apt-get install -y python python-dev python-pip build-essential swig git libpulse-dev
sudo pip install pocketsphinx
```
source: [pocketsphinx-python](https://github.com/cmusphinx/pocketsphinx-python) | what works for me is installing swing from conda and
```
conda install swig
```
if installed search where it is installed
```
where swig
```
[](https://i.stack.imgur.com/yVQdB.png)
then add that path to your environment variable |
44,504,899 | I'm getting something like this. Can anyone please tell me how to fix this.
```
C:\Users\krush\Documents\ML using Python>pip install pocketsphinx
Collecting pocketsphinx
Using cached pocketsphinx-0.1.3.zip
Building wheels for collected packages: pocketsphinx
Running setup.py bdist_wheel for pocketsphinx: started
... | 2017/06/12 | [
"https://Stackoverflow.com/questions/44504899",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4813058/"
] | ```
conda install swig
pip install pocketsphinx
```
I didn't want to do all that setup other people are suggesting so I tried this and it worked.
This probably only works if you are using Anaconada though. | In case you are working on anaconda navigator.
Just go to environment.
Search swig, your package will be displayed. Select the package and click on apply button.
It will also give a prompt list of other dependencies, which need to be installed with swig.
So just select all and click on apply button.
All th... |
44,504,899 | I'm getting something like this. Can anyone please tell me how to fix this.
```
C:\Users\krush\Documents\ML using Python>pip install pocketsphinx
Collecting pocketsphinx
Using cached pocketsphinx-0.1.3.zip
Building wheels for collected packages: pocketsphinx
Running setup.py bdist_wheel for pocketsphinx: started
... | 2017/06/12 | [
"https://Stackoverflow.com/questions/44504899",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4813058/"
] | To fix the problem, I downloaded [swig for windows](https://netix.dl.sourceforge.net/project/swig/swigwin/swigwin-3.0.12/swigwin-3.0.12.zip) at the time of writing this answer it was 3.0.12
[For the latest swig windows version follow this link](http://www.swig.org/download.html)
1. Copy swig.exe to the python instal... | ```
conda install swig
pip install pocketsphinx
```
I didn't want to do all that setup other people are suggesting so I tried this and it worked.
This probably only works if you are using Anaconada though. |
44,504,899 | I'm getting something like this. Can anyone please tell me how to fix this.
```
C:\Users\krush\Documents\ML using Python>pip install pocketsphinx
Collecting pocketsphinx
Using cached pocketsphinx-0.1.3.zip
Building wheels for collected packages: pocketsphinx
Running setup.py bdist_wheel for pocketsphinx: started
... | 2017/06/12 | [
"https://Stackoverflow.com/questions/44504899",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4813058/"
] | To fix the problem, I downloaded [swig for windows](https://netix.dl.sourceforge.net/project/swig/swigwin/swigwin-3.0.12/swigwin-3.0.12.zip) at the time of writing this answer it was 3.0.12
[For the latest swig windows version follow this link](http://www.swig.org/download.html)
1. Copy swig.exe to the python instal... | For a purely pip-based fix (may or not work depending on your exact issue/system):
```
pip install swig
pip install pocketsphinx
pip freeze > requirements.txt
```
Fixed the issue simply for me. With pip freeze, you're likely to not have the issue again if cloning the project in another system (since swig will be ins... |
44,504,899 | I'm getting something like this. Can anyone please tell me how to fix this.
```
C:\Users\krush\Documents\ML using Python>pip install pocketsphinx
Collecting pocketsphinx
Using cached pocketsphinx-0.1.3.zip
Building wheels for collected packages: pocketsphinx
Running setup.py bdist_wheel for pocketsphinx: started
... | 2017/06/12 | [
"https://Stackoverflow.com/questions/44504899",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4813058/"
] | To fix the problem, I downloaded [swig for windows](https://netix.dl.sourceforge.net/project/swig/swigwin/swigwin-3.0.12/swigwin-3.0.12.zip) at the time of writing this answer it was 3.0.12
[For the latest swig windows version follow this link](http://www.swig.org/download.html)
1. Copy swig.exe to the python instal... | I was also getting same error, while installing in ubuntu 16.04, I executed following commands:
```
sudo apt-get install -y python python-dev python-pip build-essential swig git libpulse-dev
sudo pip install pocketsphinx
```
source: [pocketsphinx-python](https://github.com/cmusphinx/pocketsphinx-python) |
44,504,899 | I'm getting something like this. Can anyone please tell me how to fix this.
```
C:\Users\krush\Documents\ML using Python>pip install pocketsphinx
Collecting pocketsphinx
Using cached pocketsphinx-0.1.3.zip
Building wheels for collected packages: pocketsphinx
Running setup.py bdist_wheel for pocketsphinx: started
... | 2017/06/12 | [
"https://Stackoverflow.com/questions/44504899",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4813058/"
] | You try to install `pocketsphinx` with `pip`, that will download and compile this module. It requires some compiling tool like `swig`.
Another solution is to install a binary version of `pocketsphinx`. You can download a binary version [here](http://www.lfd.uci.edu/~gohlke/pythonlibs/#pocketsphinx). You have to select... | There are few set of commands to resolve this. Just execute them:
```
sudo apt-get install -y python3 python3-dev python3-pip build-essential swig git libpulse-dev
sudo apt-get install libasound2-dev
sudo pip install pocketsphinx
``` |
44,504,899 | I'm getting something like this. Can anyone please tell me how to fix this.
```
C:\Users\krush\Documents\ML using Python>pip install pocketsphinx
Collecting pocketsphinx
Using cached pocketsphinx-0.1.3.zip
Building wheels for collected packages: pocketsphinx
Running setup.py bdist_wheel for pocketsphinx: started
... | 2017/06/12 | [
"https://Stackoverflow.com/questions/44504899",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4813058/"
] | There are few set of commands to resolve this. Just execute them:
```
sudo apt-get install -y python3 python3-dev python3-pip build-essential swig git libpulse-dev
sudo apt-get install libasound2-dev
sudo pip install pocketsphinx
``` | ```
pip install pipwin
python -m pipwin install pocketsphinx
```
You can also use pipwin to install pocketsphinx. |
44,504,899 | I'm getting something like this. Can anyone please tell me how to fix this.
```
C:\Users\krush\Documents\ML using Python>pip install pocketsphinx
Collecting pocketsphinx
Using cached pocketsphinx-0.1.3.zip
Building wheels for collected packages: pocketsphinx
Running setup.py bdist_wheel for pocketsphinx: started
... | 2017/06/12 | [
"https://Stackoverflow.com/questions/44504899",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4813058/"
] | I was also getting same error, while installing in ubuntu 16.04, I executed following commands:
```
sudo apt-get install -y python python-dev python-pip build-essential swig git libpulse-dev
sudo pip install pocketsphinx
```
source: [pocketsphinx-python](https://github.com/cmusphinx/pocketsphinx-python) | I know I am late, but what worked for me was to download the pre-built wheel file and install it manually (tested on Windows. I am pretty sure it will only work on Windows).
[https://www.lfd.uci.edu/~gohlke/pythonlibs/#pocketsphinx](https://www.lfd.uci.edu/%7Egohlke/pythonlibs/#pocketsphinx)
Just grab the right one (... |
44,221,225 | In reference to this question:
[python: Two modules and classes with the same name under different packages](https://stackoverflow.com/questions/15720593/python-two-modules-and-classes-with-the-same-name-under-different-packages)
Should all modules in a package be uniquely named, regardless of nesting? PEP8 and PEP... | 2017/05/27 | [
"https://Stackoverflow.com/questions/44221225",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3985089/"
] | No, there is no requirement that names at different levels must be different. Each level is a separate namespace. If `foo.utils` and `foo.bar.utils` make sense in your project, just do so.
For example, the Python standard library has [`email.message`](https://docs.python.org/3/library/email.message.html) and [`email.m... | Since package is based on the filesystem, you can not, in normal circonstance, have the same packages because files/directories have no duplicate.
You can have the same namespace package, of course.
It is also possible to have the same package/module name in different paths. They are searched in order, so the first w... |
26,674,433 | I am using Windows 8.1 64 bit. I have installed canopy with academic license. My laptop has Nvidia GeForce GT750m
I have installed Theano using `python setup.py develop` from Theano's git repository. I have Visual Studio 2013 and Cuda Toolkit 64 bit installed. Cuda samples are working fine.
Theanoarc file:
```
[glob... | 2014/10/31 | [
"https://Stackoverflow.com/questions/26674433",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2399329/"
] | Theano do not support Visual Studio compiler. It is needed for cuda, but not for Theano CPU code. This need g++ compiler.
Is the canopy package for the compiler correctly installed? What did you do to try to compile with microsoft compiler? | Windows Canopy, like all standard CPython 2.7 distributions for Windows, is compiled with Visual C++ 2008, and that is the compiler that you should use for compiling all non-trivial C extensions for it.
The following article includes some links for obtaining this compiler:
<https://support.enthought.com/entries/268643... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.