I'm on mac.
Following the guide here: https://docs.sencha.com/extjs/7.0.0-CE/guides/getting_started/mobile_desktop_application/getting_started_with_npm.html
I signed up for to the community edition, received the mail, created my sencha.myget.org account, and did the following commands successfully in a terminal:
step 1: login to npm repo
npm login --registry=https://sencha.myget.org/F/community/npm/ --scope=#sencha
step 2: install app generator cli
npm install -g #sencha/ext-gen
step 3: generate the app
ext-gen app -a
Now step 4 (run the new application) is where I have a problem:
cd my-app
npm start
Gives me this error:
If I open the log I can see the exception message:
/Users//Desktop/test/extjs/my-app/node_modules/#sencha/cmd/dist/plugin.xml:378: The following error occurred while executing this line:
/Users/me/Desktop/test/extjs/my-app/build.xml:15: Unable to create javax script engine for javascript
What am I doing wrong?
So this is how I did it on mac 10.14.
Ok, so reading about javax, apparently it was used in java se8 (https://docs.oracle.com/javase/8/docs/api/javax/script/ScriptEngine.html).
So, I downloaded it using this website: https://adoptopenjdk.net/,
and more precisely this page: https://adoptium.net/?variant=openjdk8.
Once downloaded, I had multiple versions of java installed on my computer and so I had to switch to that one.
So I learned how to switch to any java versions.
First to display the existing versions, type this in the terminal:
/usr/libexec/java_home -V
Then to change version:
export JAVA_HOME=`/usr/libexec/java_home -v 1.8`
(notice that for the version number you just type the first two digits, not the whole version number )
To check that it worked:
java -version
Once java 1.8 (apparently that's the version name for jdk8) was running, the npm start command worked without errors.
You need to downgrade Java to any version less than 15, because the Nashorn JavaScript Engine had been removed, which it depends upon. Downgrading Java as far as version 8 probably isn't the optimum (in particular, when also using it for Java development).
Related
I have tried to get wagtail up and running twice: once using the guide in https://engineertodeveloper.com/wagtail-developer-portfolio/ and this time using: https://docs.wagtail.io/en/v2.12.4/support.html. Both times the error comes after:
python manage.py migrate
pip freeze shows:
anyascii==0.2.0
asgiref==3.3.4
beautifulsoup4==4.8.2
certifi==2020.12.5
chardet==4.0.0
Django==3.1.8
django-filter==2.4.0
django-modelcluster==5.1
django-taggit==1.4.0
django-treebeard==4.5.1
djangorestframework==3.12.4
draftjs-exporter==2.1.7
et-xmlfile==1.0.1
html5lib==1.1
idna==2.10
l18n==2020.6.1
openpyxl==3.0.7
Pillow==8.2.0
pytz==2021.1
requests==2.25.1
six==1.15.0
soupsieve==2.2.1
sqlparse==0.4.1
tablib==3.0.0
urllib3==1.26.4
wagtail==2.12.4
webencodings==0.5.1
Willow==1.4
xlrd==2.0.1
XlsxWriter==1.3.9
xlwt==1.3.0
So I have installed wagtail (latest version)
As pointed out by Tibor at Slack, python sometimes becomes confused. Solution was to use
python -m pip
instead of just
pip
I'm a motivated beginner working my way through Python Crash Course. I created a project and an app using Django. I'm unable to get the python manage.py run server command to work. This is the header of the long error message:
"Watching for file changes with StatReloader
Exception in thread Django-main-thread".
The middle includes several lines of "".
At the end, it says "from models import Activity"
"ModuleNotFoundError: No module named 'models''
There IS a module named models in the directory. This is my second exercise using Django, and the program worked earlier. I've searched the net and read everything remotely similar, but have been unable to find a solution. How can I make the program recognize a module that is there?
I think the problem was that the version of pip in the virtual environment was the python 2.7 version instead of the 3.9 version I used to create the project. It had to be upgraded using:
python3 -m pip install --upgrade pip
I also used python3 for the manage.py runserver command instead of just python.
I attempted to upgrade my tcms-api library from 5.0 to 5.3 using:
pip install tcms-api --upgrade
on a Windows 10 machine, I saw a lot of errors when trying to install the dependent package of kerberos. Even though this is old, I saw a similar set of errors. The package installation failed since the kerberos package isn't supported on Windows and I was left at tcms-api 5.0.
Please file a bug against https://github.com/kiwitcms/tcms-api.
We can do a quick fix by providing 2 package names:
tcms-api and tcms-api[kerberos]
The first one will not install the kerberos package.
The proposed workaround makes sense but changing the underlying kerberos implementation needs careful testing which isn't a quick job.
OTOH https://github.com/kiwitcms/python-social-auth-kerberos uses gssapi which seems to be the latest and most actively maintained implementation of Kerberos for Python. There is an open issue to migrate to that in tcms-api so you can contribute if you want.
As a workaround, I was able to do the following (caveat: I haven't extensively tested my installation yet):
Clone the tcms-api repo from GitHub
Edit setup.py to change the install_requires line to use 'kerberos-sspi' rather than 'kerberos'
Install the following pip packages: Setuptools, Wheel, Twine
CD to repo folder and run: python setup.py bdist_wheel
That creates a package under the dist folder
Run pip install dist\tcms_api-5.3-py3-none-any.whl
Celebrate successful package install
The steps were modified from this page.
Update:
I confirmed the things I need the API to do work with my custom package (create and update test runs). However, I'm in a situation where I don't need to specifically harden my Kiwi instance using kerberos authentication.
Am getting the following error - Missing required dependencies ['numpy']
Standalone and via Django, without Apache2 integration - the code work likes charm, however things start to fall when used with Apache2. It refuses to import pandas or numpy giving one error after another.
I am using Apache2, libapache2-mod-wsgi-py3, Python 3.5 and Anaconda 2.3.0
Request Method: GET
Request URL: http://127.0.0.1/api/users/0/
Django Version: 1.10.5
Exception Type: ImportError
Exception Value:
Missing required dependencies ['numpy']
Exception Location: /home/fractaluser/anaconda3/lib/python3.4/site-packages/pandas/__init__.py in <module>, line 18
Python Executable: /usr/bin/python3
Python Version: 3.5.2
Python Path:
['/home/fractaluser/anaconda3/lib/python3.4/site-packages',
'/home/fractaluser/anaconda3/lib/python3.4/site-packages/Sphinx-1.3.1-py3.4.egg',
'/home/fractaluser/anaconda3/lib/python3.4/site-packages/setuptools-27.2.0-py3.4.egg',
'/usr/lib/python35.zip',
'/usr/lib/python3.5',
'/usr/lib/python3.5/plat-x86_64-linux-gnu',
'/usr/lib/python3.5/lib-dynload',
'/usr/local/lib/python3.5/dist-packages',
'/usr/lib/python3/dist-packages',
'/var/www/html/cgmvp']
Server time: Fri, 9 Jun 2017 11:12:37 +0000
You can't force mod_wsgi built with the system Python version to use a Python virtual environment built for a different Python version, nor different Python installation. That is what it appears you are doing. You would need to uninstall mod_wsgi and install it from source code, compiling it against the Anaconda Python distribution. Best to use the pip install method and follow steps to integrate it into existing Apache installation. See:
https://pypi.python.org/pypi/mod_wsgi
Also see the following documentation for setting up a Python virtual environment with mod_wsgi, as it appears you aren't doing that in the recommended way either.
http://modwsgi.readthedocs.io/en/develop/user-guides/virtual-environments.html
First task though is to reinstall mod_wsgi.
I had the same problem using apache2 with mod_wsgi python 3.6 envinronmet 64, the version numpy used was 1.13, only change the version with previous and worked !!.
pip3 install numpy==1.12
I've installed gcloud by following the instructions on:
https://cloud.google.com/sdk/docs/quickstart-debian-ubuntu
gcloud is in my path at /usr/bin/gcloud, but the package doesn't seem to have dev_appserver.py in my path. Is it installed? How do I run it?
Platform: Ubuntu 16.04
Edit: By running dpkg -L google-cloud-sdk I've found it at /usr/lib/google-cloud-sdk/bin/dev_appserver.py but when I try to run it I get:
This action requires the installation of components: [app-engine-
python]
You cannot perform this action because this Cloud SDK installation is
managed by an external package manager. If you would like to get the
Also not sure why it wasn't added to my path.
I know the original question concerns Ubuntu, but I just wanted to share some notes for macOS/OS X in case it's helpful for someone else.
I installed the google-cloud-sdk via Homebrew-Cask and overlooked the caveats note:
brew cask install google-cloud-sdk
After installing the SDK cask, I installed the Python App Engine component, as #Rodney Jonace mentioned:
gcloud components install -q app-engine-python
Going back to the caveats note mentioned above, I appended the following the my ~/.zshrc file:
source $(brew --prefix)/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/path.zsh.inc
source $(brew --prefix)/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/completion.zsh.inc
Opening a new terminal tab, I was able to call the extra Python App Engine scripts (e.g., dev_appserver.py) and use the Zsh completions. Hope that helps!
The following articles were also useful:
http://www.javatronic.fr/tips/2014/10/17/installing_google_cloud_sdk_on_ubuntu_with_oh-my-zsh.html
http://www.rainbowbreeze.it/how-to-setup-a-google-app-engine-python-environment-on-mac-osx-using-homebrew/
The google-cloud-sdk deb package comes with the built-in component manager disabled, which is preventing that copy of dev_appserver.py from working through gcloud. If you update your apt-cache, you can install the google-cloud-sdk-app-engine-python and/or google-cloud-sdk-app-engine-java packages that have just started to be published. Directions here:
https://cloud.google.com/sdk/downloads#apt-get