Anaconda won't activate virtual environment - syntax-error

I know similar problems have already been adressed, but I just couldn't find the solution in the previous answers that were given...
So here's the thing : I created an environment using
conda create -n djangodev pyhton=3.4
I checked, and the folder is created in \Anaconda3\envs but when I want to activate it :
activate djangodev
I get :
File "<ipython-input-71-d6d1f1bb5b1c>", line 1
activate djangodev
^
SyntaxError: invalid syntax
So I really don't know what to do. I tried changing the path but I couldn't find how to do it properly, as all the ways I've tried didn't work.
Could you help me please ?
Thanks !

Related

Using Ansible with Alibaba/Alicloud modules

I am relatively new to Ansible, and completely new to Alicloud. I am trying to figure out how I can use the list of modules found here: http://47.88.222.42:8080/ansible-alicloud/latest/modules/list_of_cloud_modules.html, or if there is, in fact, a way to do it.
Officially, it seems, Ansible supports only two modules of Alicloud (found here: https://docs.ansible.com/ansible/2.9/modules/list_of_cloud_modules.html), but the other modules I've seen on several websites before as part of tutorials, so I assume they are meant to be working. Can someone help me with this? I was specifically looking at this module: http://47.88.222.42:8080/ansible-alicloud/latest/modules/ali_vpc_module.html#ali-vpc-module
My current issue with it is that when running the playbook with the module, it gives me the error
ERROR! couldn't resolve module/action 'ali_vpc'. This often indicates a misspelling, missing collection, or incorrect module path.
Any help is appreciated.
Thanks in advance!
You need to install the modules by doing pip install ansible-alicloud.
Then you will be able to get the ali_vpc module from /home/cheshi/.local/lib/python3.8/site-packages/ansible/modules/cloud/alicloud/ali_vpc.py
https://pypi.org/project/ansible-alicloud/

ModuleNotFoundError: No module named 'telegram'

Trying to run the python-telegram-bot library through Jupyter Notebook I get this question error. I tried many ways to reinstall it, but nothing from answers at any forums helped me. What should be a mistake and how to avoid it while installing?
Do you have a directory with "telegram" name? If you do,rename your directory and try it again to prevent import conflict.
good luck:)

Device Driver, Cannot Remove rmmod: ERROR: module is in use

In attempts to remove a driver (simple_char_driver).., by running
sudo rmmmod simple_char_driver
I receive the following error.
rmmod: ERROR: Module simple_char_driver is in use
After running lsmod... it shows that its already in use by (2)
Module Size Used by
helloModule 16384 0
simple_char_driver 16384 2
I would like to remove this module.
Ive looked online and no solution helps remotely!
I need help! Thank you!
You can use rmmod -f to force the removal. But this is unsafe and can damage other things.
You can use it only if you are sure you module is isolated.
For more info, please read here.

Khan Academy API displayed on Geektool

I have been experimenting with the Khan Academy API found here
http://api-explorer.khanacademy.org/api/v1/user
and tried to find a way to display a user's points (and maybe some other information) on the desktop using geektool. I tried this
stackoverflow.com/questions/12514722/khan-academy-php-oauth-code
and
github.com/Khan/khan-api/
but nothing seems to work. The first link is the khan academy API provided as is. The second is someone with a similar problem who found a solution. He wrote a PHP script according to the temboo library and said to replace a few fields of the PHP and add both the PHP and the Temboo source code to the webroot. So, I added a folder called "php-sdk" into the webroot which is in /Library/WebServer/Documents/ and inside that folder was another folder "src" which contained the Khan Academy API and the Temboo library. Here is what I had.
cl.ly/image/2c2Z1B3T443L
Then I took a look at this and followed the steps until 6:19. Then I started the Apache server by entering this in terminal...
sudo apachectl restart
I opened a web browser, and typed in this...
localhost/php-sdk/src/khanAcademy.php
and I got this...
Warning: require(php-sdk/src/temboo.php): failed to open stream: No such file or directory in /Library/WebServer/Documents/php-sdk/src/khanAcademy.php on line 66
Fatal error: require(): Failed opening required 'php-sdk/src/temboo.php' (include_path='.:') in /Library/WebServer/Documents/php-sdk/src/khanAcademy.php on line 66
any ideas on what this could mean or how I could fix this? I am not advanced in PHP, or python, but I really would love to find a solution to this problem and I am willing to try anything that might work.
This error:
Warning: require(php-sdk/src/temboo.php): failed to open stream: No such file or directory in /Library/WebServer/Documents/php-sdk/src/khanAcademy.php on line 66
indicates that the path you're using for require is likely incorrect. Currently your PHP is trying to find a file called temboo.php here:
/Library/WebServer/Documents/php-sdk/src/php-sdk/src/temboo.php
Note the repeated directory structure. I'll make an assumption that your temboo.php is in the same directory as your khanAcademy.php file. In that case, simply change require "php-sdk/src/temboo.php" to require "temboo.php". If my assumption is incorrect, just adjust the include path accordingly.

Custom Cartridge

I want to create a cartridge for OpenERP, i create one for Python 2.6.6, it's work, and i try to modifie the setup to execute "openerp-server" but i dont know where i can put the openERP code ? Where i puting him in the "Template" folder it gives my this error :
Unable to complete the requested operation due to: The server
ex-std-node295.prod.rhcloud.com that your application is running on
failed to respond in time. This may be due to a system restart..
Reference ID: 377355d1a4f3f9cc0d1914cca77dace9
Also I modified the /bin/setup like this :
Call openerp-server
exec $OPENSHIFT_PYTHON_DIR/cdk/Template/openerp-server
Also when I connect in SSH I don't find my template folder.
How do I fix this?
Openshift Origin has annoying timeout hardcoded in one gem of itself.
Find line 1006 in the following file:
/opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-console-1.26.3.1/app/models/rest_api/base.rb
The default timeout is set in the following line (line 1006):
self.read_timeout = 240
Other timeouts can be setuped due to documentation.
I have a working quickstart here: https://github.com/caruccio/openshift-openerp-quickstart/blob/master/README_en.md
You could use this code to your template dir. Please not it is "template", not "Template".