How to config the environment variable path to ensure that it opening the python from anaconda - numpy

I install Anconda3 on my pc (win10). And when I try to us numpy I get this Error: "ModuleNotFoundError: No module named 'numpy'".
I edit my environment variables and add this:
PYTON_HOME (C:\Users\User_name\anaconda3)
And add this also to the path.
But when I run "where python3" I still get :
"C:\Users\WIN10\AppData\Local\Microsoft\WindowsApps\python3.exe"
how to solve this problem?

Please try the following step:
In the Control Panel => System and Security => System => Edit the System Environment Variable
In the new window System Properties => Advanced => Environment Variables, set Path as "C:\Users\User_name\anaconda3"

Related

Geb/Spock Error- No reports dir has been configured, you need to set in the config file or via the build adapter

I have trouble running my functional test from IntelliJ IDE. When I run the functional test, I got the following error message:
java.lang.IllegalStateException: No reports dir has been configured, you need to set in the config file or via the build adapter.
at geb.Browser.getReportGroupDir(Browser.groovy:899)
at geb.Browser.cleanReportGroupDir(Browser.groovy:932)
at geb.spock.GebSpec.methodMissing(GebSpec.groovy:56)
at geb.spock.GebReportingSpec.setupSpec(GebReportingSpec.groovy:37)
Based on my research, all I need to do is to add the following code in GebConfig.groovy:
reportsDir = new File("target/runtime_reports_dir")
I added the line to GebConfig.groovy and rebuild the project, but still running into the same issue. Is there any other fix to this error?
Adding reportsDir = 'target/geb-reports' to your GebConfig shoud fix this, can you show me your GebConfig file?
There is also another fix for it, your test class extends GebReportingSpec, you can chage it to GebSpec and it should also work.
I had this same issue, while having the reportsDir correctly configured in the GebConfig
Adding the resources folder (where my GebConfig is located) as "Test Sources Root" did the trick for me
To mark the folder as "Test Sources Root":
Right click in the folder
Mark Directory as
Test Sources Root
Happy testing!

Why am I unable to locate and install OpenEduCat Timetable in Apps?

I have managed to install OpenEduCat Core in my local 9.0c Odoo platform. However, now I am still looking for ways on how to install OpenEduCat Timetable in the platform.
I tried to hit "Update Apps List" then search "Timetable" in the search bar in "Apps" however it gives me no result. What am I missing here?
Searching for "OpenEduCat" gives me only this
My Access Rights
Track the following:
find the path of addons module
is your module is at same place or path?
give read/write/execute permission for that module
restart your server
Go to browser, from GUI, Setting => Modules => Update Modules List => and Click on Update button
Now go to Setting => Modules => Local Modules => remove Apps filter on right hand side and type your module name
I hope after do these you will find your module.
EDIT
Active debugging mode. Open logged User form view and checked related access right.

Composer needs a proxy to install laravel apparently, where do I get that? can I set it up myself using apache?

I was trying to get started with Laravel just last night, so I tried to install it with composer but it wouldn't go through and kept sayin The "https://packagist.org/packages.json" file could not be downloaded: SSL operation failed with code 1. , so I looked around and found out that you need to tell composer to use a proxy.(q1 q2 q3).
Well now this might sound silly but honestly I had no idea what a proxy was until last night, so I went and studied it a bit and I got this far:
"Proxy means to act on behalf of another. In the context of a Web server, this means
one server fetching content from another server, then returning it to the client"
and apparently there's 2 kinds of proxy: forward proxy and reverse proxy.
In those 3 pages that I just showed, they were saying before runing php bin\composer global require "laravel/installer=~1.1" you have to set an env var like this: set http_proxy=username:password#proxy_server:port
So now my question is: I still don't know where can I get a proxy like that, should I set it up myself with apache? is that gonna even work? what do I do?
Your thoughts would be appreciated, thank you.
Edit: Environment info:
I'm on windows 7
installed xampp-win32-5.6.14-0-VC11-installer
all of those 5 important extensions are all enabled in phpinfo()
the path= C:\Users\UserName\AppData\Roaming\Composer\vendor\bin is set in environment variables
here's a picture of the whole error
here's the result of php -m i.stack.imgur.com/wz030.png
Some stuff that I tried:
I went into these sites: proxy4free.com us-proxy.org proxylist.hidemyass.com ultraproxies.com,
I tried this: set https_proxy=https://xteamweb.com:xteam#75.55.165.86:8088 and this one: set http_proxy=http://1proxy.space and many others from those sites: i.stack.imgur.com/6YWyp.png
but no matter what, this is the result of all of them: i.stack.imgur.com/mqOrP.png
Still nothing...
Ok here's the solution, if you're having the same problem:
1:
Make sure these are all uncommented in php.ini:
extension=php_openssl.dll
extension=php_curl.dll
extension=php_sockets.dll
extension_dir="E:\xampp\php\ext"
browscap="E:\xampp\php\extras\browscap.ini"
Add these 2 lines at the end of php.ini
curl.cainfo=c:\openssl-1.0.2d-win32\ssl\cert.pem
openssl.cafile=c:\openssl-1.0.2d-win32\ssl\cert.pem
2:
Run this: php -r "print_r(openssl_get_cert_locations());"
and you'll get:
Array
(
[default_cert_file] => c:/openssl-1.0.2d-win32/ssl/cert.pem
[default_cert_file_env] => SSL_CERT_FILE
[default_cert_dir] => c:/openssl-1.0.2d-win32/ssl/certs
[default_cert_dir_env] => SSL_CERT_DIR
[default_private_dir] => c:/openssl-1.0.2d-win32/ssl/private
[default_default_cert_area] => c:/openssl-1.0.2d-win32/ssl
[ini_cafile] => c:\openssl-1.0.2d-win32\ssl\cert.pem
[ini_capath] =>
)
3:
Make these folders:
c:\openssl-1.0.2d-win32
c:\openssl-1.0.2d-win32\ssl
c:\openssl-1.0.2d-win32\ssl\certs
c:\openssl-1.0.2d-win32\ssl\private
Download this: http://curl.haxx.se/ca/cacert.pem.
Rename it to cert.pem and put it in c:\openssl-1.0.2d-win32\ssl\.
Rename it to cert.crt and put it in c:\openssl-1.0.2d-win32\ssl\certs\.
So:
c:\openssl-1.0.2d-win32\ssl\cert.pem
c:\openssl-1.0.2d-win32\ssl\certs\cert.crt
4:
Download https://getcomposer.org/Composer-Setup.exe and install it, It will no longer gives u the ERR_CONNECTION error.
Go to c:\users\YOURUSERNAME.
composer.bat should be there, if not create it yourself.
Add c:\users\YOURUSERNAME to your path.
Edit composer.bat and delete what's in it and put this in #php "%~dp0composer.phar" %*.
Download https://getcomposer.org/composer.phar.
Place composer.phar in c:\users\YOURUSERNAME.
5:
Done.
Composer will now install laravel using: composer global require "laravel/installer=~1.1" with no problem.
(Plus: now composer command is available globally instead of using it like: php composer.phar or php bin\composer).

I can't find my module in Odoo

I have created a module in Odoo 8 following a tutorial. I activated the technical features in Users then I've updated the module list but it doesn't appear in the list.
What should I do ?
Track the following:
checkout __init__.py, __openerp__.py files
weather any server track-back appear or not
find the path of addons module
is your module is at same place or path?
give read/write/execute permission for that module
restart your server
Go to browser, from GUI, Setting => Modules => Update Modules List => and Click on Update button
Now go to Setting => Modules => Local Modules => remove Apps filter on right hand side and type your module name
I hope after do these you will find your module.
After tried everything in #Odedra's answer, It worked when I created a new DB -> restarted the server -> Updated the App List.

Buildr JVM properties for JUnit set inside the JVM rather than outside

When using JUnit we pass the directory used for logging as a JVM property. This works fine on the command line and in Eclipse. However, it doesn't work when we pass the same property to the Buildr test task.
test.using :properties => { :"server.name" => "tester", :"log.dir" => log_dir}
We know why this happening. The property is being set from inside the JVM rather than outside. This means that at run time (when the static logging class is loaded) the property is not yet set. If we query the property later (say from within a unit test) then we see that it is set correctly.
Does anyone know of a workaround?
BTW, we're using log4J but the question is applicable to any static class that needs access to a JVM property set by Buildr.
Assuming that you are using JUnit, you can ensure that the tests run in a forked JVM via
test.using :fork => :once
However I thought that was the default behaviour? Are you overriding this somehow? (See http://buildr.apache.org/languages.html)
this code defines the log.dir in the log4j.properties file and sets it in the buildfile via
test.using :properties => { :"log.dir" => '/tmp'}
my setup is
buildr 1.4.7
ruby 1.9.3
hth