no module named setuptools_rust - python

hellow i'm new to python and django. Currently i'm trying to run a project made in django 1.10.2 and python 2.7 in ubuntu 16.04. The project uses a module called python-social-auth, which causes me the following error when I try to install.
Hopefully you can help me in detail to solve this problem because as I told you I am new to using these tools.

Related

Python Perforce module Error: No module named 'P4'

I got the P4 python module for win10 via the installer on their page: https://www.perforce.com/downloads/helix-core-api-python
Its for python 3.9, though I have tested it with both Python 3.10 and 3.9 and it always throws the error: No module named 'P4' when I try to use it inside visual code.
Interpreter is set up correctly (tried 310 and 39).
Im a bit lost here and would love some help.
The installer package installed the following files into site-packages:
P4.py
P4API.cp39-win_amd64.pyd
and a folder with 4 metadata files in it
P4.py on itself looks good, no errors.
Edit: Im trying to use it with Blender. Currently shipped python version within that is 3.10.2. Also tried a older blender version which uses 3.9.7.
Both wont work.
Visual studio code is known for it's bugs with python. You could try using "PyCharm". Make sure to install the modules from Pycharm's settings instead of terminal.
(I'm not sure if this is the reason, but it's worth the try. Had the same issue and the mentioned way solved it.)

Pcbnew for Kicad cannot be imported in python3.5

I just started learning to customize my foorprint in Kicad via python scripts. I got stuck on “import pcbnew” because it gave me the error “no module name pcbnew” all the time. I checked my Kicad folder and found all the py examples for script foorprint wizard, but there’s no file named “pcbnew.py”.
I’m wondering if it’s because I’m using python3.5 rather than python2.7 and how can I fix this problem. Should I download the pcbnew script from somewhere like Kicad Github (I searched a lot but didn’t find any really helpful solutions…)? Or should I re-install my Kicad or python? My Kicad version is 5.0.
Thanks a lot!
Kicad includes it own version of Python (Version 2.7.13 at time of writing for Kicad 5.1 but moving to python 3 shortly). You can access Kicad python via the Pcbnew python terminal Tools > Scripting console.
If you wish to run a script you have a couple of options.
Run it using the inbuilt python 2.7 using either the scripting console or specifying the Kicad python version in the shebang line (you will have to search for this but, in macOS, for instance it is found in /Applications/Kicad/kicad.app/Contents/Frameworks/Python.framework/Versions/Current/bin/python)
Import the kicad site-packages into the python environment you are using.
import sys
sys.path.insert(0,"/Applications/Kicad/kicad.app/Contents/Frameworks/python/site-packages/")
import pcbnew

Error when running tensorflow [duplicate]

When I run django project, I came across a strange problem as listed:
ImportError: /usr/local/lib/python2.7/site-packages/numpy/core/multiarray.so: undefined symbol: PyUnicodeUCS2_AsASCIIString
If I I run this project in dev mode(python manage.py runserver 0.0.0.0:8000), it doesn't occur. But when I deploy this project in apache and then this problem occurs.
In this project, I use nltk package and mongodb, and numpy is a dependency.
My OS is CentOS 6.3 and I upgraded python from 2.6.6 to 2.7.3 which is compiled by myself.
Following some instructions, I recompile and rebuild python with ./configure --enable-unicode=ucs2. But that seems didn't work.
So any guys know the reason or solutions? Thanks a lot!
Rebuild NumPy against a Python built as UCS-4.

How to correctly import a Python library into a Django project (hosted on Heroku)?

I need to include the Recurly API library into a Django project.
The library is on GitHub, and the project is deployed to Heroku.
Currently, I have the following added to requirements.txt:
-e git://github.com/recurly/recurly-client-python.git#egg=recurly-client-python
This may work once the app is on heroku (?) but it's not getting picked up when developing locally (running local server via foreman). In my test app's views.py, I have:
import recurly
I get:
Exception Type: ImportError
Exception Value:
No module named recurly
Exception Location: /Users/pete/Documents/code/django/simpleblog/subscriptions/views.py in <module>, line 7
Python Executable: /Users/pete/.virtualenvs/django/bin/python
I'm pretty new to Django/Python, as well as working with APIs in this environment. How should I install & include it, so it works both locally and once deployed? I tried searching online to no avail.
First method:
What you can do is clone the code on your desktop :
git clone https://github.com/recurly/recurly-client-python.git
and then from this new directory run
python setup.py install
(This is how you can install any reusable python app into your environment)
EDIT1:
Second method:
simply change requirement.txt
"-e git://github.com/recurly/recurly-client-python.git#egg=recurly-client-python" to "recurly"
If you are new to python and want easy and fast implementation use second one. If you are new to python and want to learn how things work in python use first one, it will help.
EDIT2:
Wanna learn more? Check which version you got installed by these two different methods. ("pip list|grep recurly")

Python: No module named core.exceptions

I'm trying to get Google AppEngine to work on my Debian box and am getting the following error when I try to access my page:
<type 'exceptions.ImportError'>: No module named core.exceptions
The same app works fine for me when I run it on my other Ubuntu box, so I know it's not a problem with the app itself. However, I need to get it working on this Debian box. It originally had python 2.4 but after AppEngine complained about it I installed the python2.5 and python2.5-dev packages (to no avail).
I saw on this Google Group post that it may be due to the version of AppEngine and just to reinstall it, but that didn't work. Any ideas?
Edit 1: Also tried uninstalling python2.4 and 2.5 then reinstalling 2.5, which also didn't work.
Edit 2: Turns out when I made AppEngine into a CVS project it didn't add the core directory into my project, so when I checked it out there literally was no module named core.exceptions. Re-downloading that folder resolved the problem.
core.exceptions is part of django; what version of django do you have installed? The AppEngine comes with the appropriate version for whatever release you've downloaded (in the lib/django directory). It can be installed by going to that directory and running python setup.py install

Categories

Resources