Comments (9)
Thank you for the issue report. In the environment you're trying to use, could you please run and attach the output of: pip list
Secondly, how did you (directly, or indirectly) attempt to install py-ubjson?
from py-ubjson.
I just tried the following under Windows 10, and it works fine for me:
- Download & install Python 3.8.5
- Installed for all users, with PYTHONPATH updated
- In a new command line window
python -mvenv myenv
myenv\Scripts\activate
pip install py-ubjson
python -c "import ubjson; print(ubjson.__version__)"
Since you're talking about crossbar - it sounds to me like some other problem, but given the lack of information it's difficult to tell.
from py-ubjson.
Sorry for late reply!!!
NOTE: I do all the set-up manually and avoid using Microsoft Package Installer(.msi) because this give me more clarity on both the environment windows as well as Linux.
If you want to try this set-up do following steps
1.Just Download binary package(zip file) of Python not executable Installer and extract the package where you want to put it on your Hard Disk.
2. set two location in your PATH variable one point pythen rood directory and second point 'scripts' directory within the root folder.
3. Now download get-pip.py script as: 'curl https://bootstrap.pypa.io/get-pip.py -o get-pip.pythen' and run this python script. This will download pip, wheel and setuptools for you.
4.There is one modification to work pip in manual set-up. There is a file in root folder as 'python38._pth' . (file name will be as your downloaded python version no) Just open the fiel in notepad and uncomment this line : '#import site' save and close. now pip will work for you.
So i try with above setup and get the problem and resolve as mention in the issue.
I also try with package installer(.msi) as your recommendation and you are right, there is no issue, so if you want to test my issue following is my steps from issue arise to resolve it. Thank you.
As i told, try to install Crossbar and the problem arise, Prompting me as a message:'ModuleNotFoundError: No module named ubjson'
So i try to install 'ubjson' manually by downloading zip file, extract the zip and go inside the folder where is 'setup.py' script file present. in my case: 'D:\WEB_SERVERS\PyTHON\WORKSPACE\AuthobahnPyClient\py-ubjson-0.16.1.tar\dist\py-ubjson-0.16.1\py-ubjson-0.16.1'
Now i try to install it manually as: 'python setup.py install' and this give me error as:
Traceback (most recent call last):
File "setup.py", line 36, in
from ubjson import version as version
ModuleNotFoundError: No module named 'ubjson'
So for this problem I just make a little modification in 'setup.py' script file at line no 36: 'From from ubjson import version as version' to 'from json import version as version'
and now i run: 'python setup.py install' Now this install the 'py-ubjson' package.
$pip list
before installation
Package Version
pip 20.2.2
setuptools 49.6.0
wheel 0.35.1
After Installation
Package Version
pip 20.2.2
py-ubjson 2.0.9
setuptools 49.6.0
wheel 0.35.1
from py-ubjson.
So i try to install 'ubjson' manually by downloading zip file, extract the zip and go inside the folder where is 'setup.py' script file present.
The problem here is that normally, during a Python package installation, the setup.py
can import the modules being installed (in this case ubjson
). Due to how you've (manually) set up your PATH/PYTHONPATH/etc, it evidently is not in the PYTHONPATH.
It doesn't make sense to modify it to import from the json package. Why? Because it is a completely unrelated package which is part of the Python standard library. So the version defined by json.__version__
has nothing to do with ubjson.__version__
.
This is visible in your pip list
output - 2.0.9
is not the current py-ubjson release (0.16.1
).
Note that importing the package to get its version during install is common practice: See point 6 in this guide. In other words: It can't be right that all packages that have adopted this approach must be changed.
from py-ubjson.
Definitely this is not the issue with ubjson package because when i go with installer package(.msi) setup of python then no issue occur in ubjson installation.
So i can this is the problem with my setup of pythen environment. I will experiment with this, so now i want to close the issue.
from py-ubjson.
But this is also true, with the same setup other packages installed successful, but why ubjosn not? Like pygame successfully install and work.
D:>pip list
Package Version
pip 20.2.2
pygame 1.9.6
setuptools 49.6.0
wheel 0.35.1
from py-ubjson.
Like pygame successfully install and work.
That's because in that project they hard-code the version inside setup.py
itself.
from py-ubjson.
Not only pygame many package installed in my setup with pip install, but ubjson not. If hard-code work then why not ubjson do the same.
from py-ubjson.
If hard-code work then why not ubjson do the same.
Because this enables for the version to interrogated during runtime with from ubjson import __version__
. In the end maybe it's not that useful - but that's how it started.
I'm sorry you've had frustrating problems with getting this to work. But right now I don't have the time to change it.
from py-ubjson.
Related Issues (11)
- sys.stdin.buffer not always available - causes exception HOT 4
- DecoderException does not include offset (extension only) HOT 1
- src/encoder.c:271: _encode_PyDecimal: Assertion `PyBytes_Check(str)' failed. HOT 8
- Understanding why my binary extension was not installed for a derived module (bjdata) HOT 1
- Test failures with Python 3.12 HOT 1
- Option to disable cython HOT 8
- Please bump the version with 3.5 python support HOT 4
- Support no-op ("N") in the decoder. HOT 3
- 0.11.0 fails floating type test on i686-linux-gnu HOT 4
- Decoding from file-like object reads too much data (C extension only) HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from py-ubjson.